]> granicus.if.org Git - python/log
python
5 years agobpo-28292: Mark calendar.py helper functions as private. (GH-15113)
Raymond Hettinger [Sun, 4 Aug 2019 20:14:03 +0000 (13:14 -0700)]
bpo-28292: Mark calendar.py helper functions as private. (GH-15113)

5 years agobpo-36324: Update comments to include the target hash sums (GH-15110)
Raymond Hettinger [Sun, 4 Aug 2019 18:52:04 +0000 (11:52 -0700)]
bpo-36324: Update comments to include the target hash sums (GH-15110)

5 years agobpo-37706: IDLE - fix sidebar code bug and drag tests (GH-15103)
Tal Einat [Sun, 4 Aug 2019 16:25:27 +0000 (19:25 +0300)]
bpo-37706: IDLE - fix sidebar code bug and drag tests (GH-15103)

Convert mouse y to line number in the sidebar rather than the text.

5 years agobpo-37648: Fixed minor inconsistency in some __contains__. (GH-14904)
Serhiy Storchaka [Sun, 4 Aug 2019 11:12:48 +0000 (14:12 +0300)]
bpo-37648: Fixed minor inconsistency in some __contains__. (GH-14904)

The collection's item is now always at the left and
the needle is on the right of ==.

5 years agobpo-37685: Fixed comparisons of datetime.timedelta and datetime.timezone. (GH-14996)
Serhiy Storchaka [Sun, 4 Aug 2019 09:38:46 +0000 (12:38 +0300)]
bpo-37685: Fixed comparisons of datetime.timedelta and datetime.timezone. (GH-14996)

There was a discrepancy between the Python and C implementations.

Add singletons ALWAYS_EQ, LARGEST and SMALLEST in test.support
to test mixed type comparison.

5 years agoCorrect description of HTTP status code 308. (GH-15078)
Florian Wendelborn [Sat, 3 Aug 2019 18:16:34 +0000 (20:16 +0200)]
Correct description of HTTP status code 308. (GH-15078)

Permanent redirect was explained as a temporary redirect.

5 years agobpo-18049: Define THREAD_STACK_SIZE for AIX to pass default recursion limit test...
Michael Felt [Sat, 3 Aug 2019 06:12:26 +0000 (08:12 +0200)]
bpo-18049: Define THREAD_STACK_SIZE for AIX to pass default recursion limit test (GH-15081)

* Define THREAD_STACK_SIZE for AIX to pass default recursion limit test

5 years agobpo-37444: Update differing exception between builtins and importlib (GH-14869)
Ngalim Siregar [Sat, 3 Aug 2019 05:46:02 +0000 (12:46 +0700)]
bpo-37444: Update differing exception between builtins and importlib (GH-14869)

Imports now raise `TypeError` instead of `ValueError` for relative import failures. This makes things consistent between `builtins.__import__` and `importlib.__import__` as well as using a more natural import for the failure.

https://bugs.python.org/issue37444

Automerge-Triggered-By: @brettcannon
5 years agobpo-30974: Change os.path.samefile docstring to match docs (GH-7337)
Timo Furrer [Fri, 2 Aug 2019 22:44:25 +0000 (00:44 +0200)]
bpo-30974: Change os.path.samefile docstring to match docs (GH-7337)

5 years agobpo-20523: pdb searches for .pdbrc in ~ instead of $HOME (GH-11847)
Timothy Hopper [Fri, 2 Aug 2019 22:20:14 +0000 (18:20 -0400)]
bpo-20523: pdb searches for .pdbrc in ~ instead of $HOME (GH-11847)

Previously pdb checked the $HOME environmental variable
to find the user .pdbrc. If $HOME is not set, the user
.pdbrc would not be found.

Change pdb to use `os.path.expanduser('~')` to determine
the user's home directory. Thus, if $HOME is not set (as
in tox or on Windows), os.path.expanduser('~') falls
back on other techniques for locating the user's home
directory.

This follows pip's implementation for loading .piprc.

Co-authored-by: Dan Lidral-Porter <dlp@aperiodic.org>
5 years agobpo-36590: Add Bluetooth RFCOMM and support for Windows. (GH-12767)
Greg Bowser [Fri, 2 Aug 2019 20:29:52 +0000 (16:29 -0400)]
bpo-36590: Add Bluetooth RFCOMM and support for Windows. (GH-12767)

Support for RFCOMM, L2CAP, HCI, SCO is based on the BTPROTO_* macros
being defined. Winsock only supports RFCOMM, even though it has a
BTHPROTO_L2CAP macro. L2CAP support would build on windows, but not
necessarily work.

This also adds some basic unittests for constants (all of which existed
prior to this commit, just not on windows) and creating sockets.

pair: Nate Duarte <slacknate@gmail.com>

5 years agobpo-37742: Return the root logger when logging.getLogger('root') is c… (#15077)
Vinay Sajip [Fri, 2 Aug 2019 15:53:00 +0000 (16:53 +0100)]
bpo-37742: Return the root logger when logging.getLogger('root') is c… (#15077)

* bpo-37742: Return the root logger when logging.getLogger('root') is called.

* Added type check guard on logger name in logging.getLogger() and refined a test.

5 years agobpo-36487: Make C-API docs clear about what the main interpreter is. (gh-12666)
Joannah Nanjekye [Fri, 2 Aug 2019 15:50:22 +0000 (12:50 -0300)]
bpo-36487: Make C-API docs  clear about what the main interpreter is. (gh-12666)

5 years agobpo-37729: gc: write stats at once (GH-15050)
Inada Naoki [Fri, 2 Aug 2019 07:25:29 +0000 (16:25 +0900)]
bpo-37729: gc: write stats at once (GH-15050)

gc used several PySys_WriteStderr() calls to write stats.
It caused stats mixed up when stderr is shared by multiple
processes like this:

  gc: collecting generation 2...
  gc: objects in each generation: 0 0gc: collecting generation 2...
  gc: objects in each generation: 0 0 126077 126077
  gc: objects in permanent generation: 0

  gc: objects in permanent generation: 0
  gc: done, 112575 unreachable, 0 uncollectablegc: done, 112575 unreachable, 0 uncollectable, 0.2223s elapsed
  , 0.2344s elapsed

5 years agobpo-16970: Adding error message for invalid args (GH-14844)
tmblweed [Fri, 2 Aug 2019 04:57:13 +0000 (21:57 -0700)]
bpo-16970: Adding error message for invalid args (GH-14844)

BPO -16970: Adding error message for invalid args

Applied the patch argparse-v2 patch issue 16970, ran patch check and the test suite, test_argparse with 0 errors

https://bugs.python.org/issue16970

5 years agobpo-37726: Prefer argparse over getopt in stdlib tutorial (#15052)
mental [Thu, 1 Aug 2019 14:17:30 +0000 (15:17 +0100)]
bpo-37726: Prefer argparse over getopt in stdlib tutorial (#15052)

5 years agobpo-36302: Sort list of sources (GH-12341)
Bernhard M. Wiedemann [Thu, 1 Aug 2019 13:18:03 +0000 (15:18 +0200)]
bpo-36302: Sort list of sources (GH-12341)

When building packages (e.g. for openSUSE Linux)
(random) filesystem order of input files
influences ordering of functions in the output .so files.
Thus without the patch, builds (in disposable VMs) would usually differ.

Without this patch, all callers have to be patched individually
https://github.com/dugsong/libdnet/pull/42
https://github.com/sass/libsass-python/pull/212
https://github.com/tahoe-lafs/pycryptopp/pull/41
https://github.com/yt-project/yt/pull/2206
https://github.com/pyproj4/pyproj/pull/142
https://github.com/pytries/datrie/pull/49
https://github.com/Roche/pyreadstat/pull/37
but that is an infinite effort.

See https://reproducible-builds.org/ for why this matters.

5 years agobpo-18049: Sync thread stack size to main thread size on macOS (GH-14748)
Ronald Oussoren [Thu, 1 Aug 2019 05:43:07 +0000 (07:43 +0200)]
bpo-18049: Sync thread stack size to main thread size on macOS (GH-14748)

This changeset increases the default size of the stack
for threads on macOS to the size of the stack
of the main thread and reenables the relevant
recursion test.

5 years agobpo-37730: Fix usage of NotImplemented instead of NotImplementedError in docs. (GH...
David H [Wed, 31 Jul 2019 22:49:55 +0000 (23:49 +0100)]
bpo-37730: Fix usage of NotImplemented instead of NotImplementedError in docs. (GH-15062)

5 years agobpo-37723: Fix performance regression on regular expression parsing. (GH-15030)
yannvgn [Wed, 31 Jul 2019 18:50:39 +0000 (20:50 +0200)]
bpo-37723: Fix performance regression on regular expression parsing. (GH-15030)

Improve performance of sre_parse._uniq function.

5 years agobpo-34101: Add doc of PyBuffer_GetPointer (GH-14994)
Hai Shi [Wed, 31 Jul 2019 14:48:15 +0000 (09:48 -0500)]
bpo-34101: Add doc of PyBuffer_GetPointer (GH-14994)

5 years agobpo-37695: Correct unget_wch error message. (GH-14986)
Anthony Sottile [Wed, 31 Jul 2019 12:11:24 +0000 (05:11 -0700)]
bpo-37695: Correct unget_wch error message. (GH-14986)

5 years agobpo-37085: Expose SocketCAN bcm_msg_head flags (#13646)
karl ding [Wed, 31 Jul 2019 08:47:16 +0000 (01:47 -0700)]
bpo-37085: Expose SocketCAN bcm_msg_head flags (#13646)

Expose the CAN_BCM SocketCAN constants used in the bcm_msg_head struct
flags (provided by <linux/can/bcm.h>) under the socket library.

This adds the following constants with a CAN_BCM prefix:

  * SETTIMER
  * STARTTIMER
  * TX_COUNTEVT
  * TX_ANNOUNCE
  * TX_CP_CAN_ID
  * RX_FILTER_ID
  * RX_CHECK_DLC
  * RX_NO_AUTOTIMER
  * RX_ANNOUNCE_RESUME
  * TX_RESET_MULTI_IDX
  * RX_RTR_FRAME
  * CAN_FD_FRAME

The CAN_FD_FRAME flag was introduced in the 4.8 kernel, while the other
ones were present since SocketCAN drivers were mainlined in 2.6.25. As
such, it is probably unnecessary to guard against these constants being
missing.

5 years agoRefined Qt GUI example in the logging cookbook. (GH-15045)
Vinay Sajip [Wed, 31 Jul 2019 06:36:45 +0000 (07:36 +0100)]
Refined Qt GUI example in the logging cookbook. (GH-15045)

5 years agoIDLE: changelog correction and addition (GH-15042)
Terry Jan Reedy [Wed, 31 Jul 2019 05:35:30 +0000 (01:35 -0400)]
IDLE: changelog correction and addition (GH-15042)

5 years agobpo-33821: Update IDLE section of What's New 3.7 (#15036)
Terry Jan Reedy [Wed, 31 Jul 2019 05:04:29 +0000 (01:04 -0400)]
bpo-33821: Update IDLE section of What's New 3.7 (#15036)

* bpo-33821: Update IDLE section of What's New 3.7

* Fix roles.

5 years agobpo-33822: Add IDLE section of What's New 3.8 (#15035)
Terry Jan Reedy [Wed, 31 Jul 2019 05:03:53 +0000 (01:03 -0400)]
bpo-33822: Add IDLE section of What's New 3.8 (#15035)

* bpo-33822: Add IDLE section of What's New 3.8

* Fix role.

5 years agobpo-34162: Add missing items to idlelib/NEWS.txt. (GH-15034)
Terry Jan Reedy [Wed, 31 Jul 2019 04:58:45 +0000 (00:58 -0400)]
bpo-34162: Add missing items to idlelib/NEWS.txt. (GH-15034)

5 years agoFix typos in comments, docs and test names (#15018)
Min ho Kim [Tue, 30 Jul 2019 22:16:13 +0000 (08:16 +1000)]
Fix typos in comments, docs and test names (#15018)

* Fix typos in comments, docs and test names

* Update test_pyparse.py

account for change in string length

* Apply suggestion: splitable -> splittable

Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu>
* Apply suggestion: splitable -> splittable

Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu>
* Apply suggestion: Dealloccte -> Deallocate

Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu>
* Update posixmodule checksum.

* Reverse idlelib changes.

5 years agoFix idlelib typos discovered by min ho, pr 15018. (GH-15029)
Terry Jan Reedy [Tue, 30 Jul 2019 22:14:58 +0000 (18:14 -0400)]
Fix idlelib typos discovered by min ho, pr 15018. (GH-15029)

5 years agobpo-36084: Add threading Native ID information to What's New documentation (GH-14845)
Jake Tesler [Tue, 30 Jul 2019 21:41:46 +0000 (14:41 -0700)]
bpo-36084: Add threading Native ID information to What's New documentation (GH-14845)

5 years agoDon't skip pickle check_frame_opcodes() (GH-15025)
Neil Schemenauer [Tue, 30 Jul 2019 19:08:17 +0000 (12:08 -0700)]
Don't skip pickle check_frame_opcodes() (GH-15025)

This looks like the only place that proto 4 framing gets exercised
so leave it as part of the PGO task.

5 years agobpo-37707: Exclude expensive unit tests from PGO task (GH-15009)
Neil Schemenauer [Tue, 30 Jul 2019 18:08:18 +0000 (11:08 -0700)]
bpo-37707: Exclude expensive unit tests from PGO task (GH-15009)

Mark some individual tests to skip when --pgo is used.  The tests
marked increase the PGO task time significantly and likely don't
help improve optimization of the final executable.

5 years agobpo-37704: Remove Tools/scripts/h2py.py (GH-15000)
Victor Stinner [Tue, 30 Jul 2019 15:45:09 +0000 (17:45 +0200)]
bpo-37704: Remove Tools/scripts/h2py.py (GH-15000)

Use cffi to access a C API in Python.

5 years agobpo-37587: Make json.loads faster for long strings (GH-14752)
Marco Paolini [Tue, 30 Jul 2019 14:16:34 +0000 (15:16 +0100)]
bpo-37587: Make json.loads faster for long strings (GH-14752)

When scanning the string, most characters are valid, so
checking for invalid characters first means never needing
to check the value of strict on valid strings, and only
needing to check it on invalid characters when doing
non-strict parsing of invalid strings.

This provides a measurable reduction in per-character
processing time (~11% in the pre-merge patch testing).

5 years agobpo-37268: Add deprecation notice and a DeprecationWarning for the parser module...
Pablo Galindo [Tue, 30 Jul 2019 11:04:01 +0000 (12:04 +0100)]
bpo-37268: Add deprecation notice and a DeprecationWarning for the parser module (GH-15017)

Deprecate the parser module and add a deprecation warning triggered on import and a warning block in the documentation.

https://bugs.python.org/issue37268

Automerge-Triggered-By: @pablogsal
5 years agobpo-34162: Update idlelib/news.txt. (#15011)
Terry Jan Reedy [Mon, 29 Jul 2019 22:12:14 +0000 (18:12 -0400)]
bpo-34162: Update idlelib/news.txt. (#15011)

5 years agobpo-37706: Disable 3 IDLE scrollbar tests on Mac. (#15010)
Terry Jan Reedy [Mon, 29 Jul 2019 21:57:36 +0000 (17:57 -0400)]
bpo-37706: Disable 3 IDLE scrollbar tests on Mac. (#15010)

They pass with tk 8.5.9 (Azure) but fail with the 8.6.x we install.

5 years agoFix publishing of Windows release (GH-15006)
Steve Dower [Mon, 29 Jul 2019 18:22:27 +0000 (11:22 -0700)]
Fix publishing of Windows release (GH-15006)

5 years agoAdd additional test for multi-line SyntaxError (GH-15003)
Anthony Sottile [Mon, 29 Jul 2019 15:05:55 +0000 (08:05 -0700)]
Add additional test for multi-line SyntaxError (GH-15003)

5 years agoFix `SyntaxError` indicator printing too many spaces for multi-line strings (GH-14433)
Anthony Sottile [Mon, 29 Jul 2019 13:59:13 +0000 (06:59 -0700)]
Fix `SyntaxError` indicator printing too many spaces for multi-line strings (GH-14433)

5 years agobpo-36044: Avoid warnings in Windows PGO build and add lzma, bz2 and sqlite coverage...
Steve Dower [Mon, 29 Jul 2019 01:01:12 +0000 (18:01 -0700)]
bpo-36044: Avoid warnings in Windows PGO build and add lzma, bz2 and sqlite coverage (GH-14985)

https://bugs.python.org/issue36044

Automerge-Triggered-By: @zooba
5 years agobpo-37697: Sync with importlib_metadata 0.19 (#14993)
Jason R. Coombs [Sun, 28 Jul 2019 18:59:24 +0000 (14:59 -0400)]
bpo-37697: Sync with importlib_metadata 0.19 (#14993)

* bpo-37697: Sync with importlib_metadata 0.19

* Run make regen-importlib

* 📜🤖 Added by blurb_it.

5 years agobpo-37692: Improve highlight config sample (#14983)
Terry Jan Reedy [Sun, 28 Jul 2019 16:04:31 +0000 (12:04 -0400)]
bpo-37692: Improve highlight config sample (#14983)

Use an example shell interaction in the sample and better labels for shell elements.

5 years agoRemove trailing .0 from version changed note (GH-14987)
Nick Coghlan [Sun, 28 Jul 2019 11:40:47 +0000 (21:40 +1000)]
Remove trailing .0 from version changed note (GH-14987)

5 years agobpo-37691: Let math.dist() accept sequences and iterables for coordinates (GH-14975)
Raymond Hettinger [Sat, 27 Jul 2019 21:04:29 +0000 (14:04 -0700)]
bpo-37691: Let math.dist() accept sequences and iterables for coordinates (GH-14975)

5 years agobpo-37628: Fix IDLE config sample sizes (#14958)
Tal Einat [Sat, 27 Jul 2019 16:57:48 +0000 (19:57 +0300)]
bpo-37628: Fix IDLE config sample sizes (#14958)

The boxes for the font and highlight samples are now constrained by the overall config dialog size.  They gain scrollbars when the when a large font size makes the samples too large for the box.

5 years agoAdd Qt GUI example to the logging cookbook. (GH-14978)
Vinay Sajip [Sat, 27 Jul 2019 12:46:53 +0000 (13:46 +0100)]
Add Qt GUI example to the logging cookbook. (GH-14978)

5 years agobpo-17535: Increase line number horizontal padding by 2 pixels (GH-14959)
Tal Einat [Sat, 27 Jul 2019 03:24:37 +0000 (06:24 +0300)]
bpo-17535: Increase line number horizontal padding by 2 pixels (GH-14959)

5 years agobpo-32910: Remove implementation detail in venv documentation. (GH-14968)
Derek Keeler [Fri, 26 Jul 2019 21:57:11 +0000 (14:57 -0700)]
bpo-32910: Remove implementation detail in venv documentation. (GH-14968)

5 years agobpo-35524: Update Windows installer image in docs (GH-14966)
Steve Dower [Fri, 26 Jul 2019 20:03:58 +0000 (13:03 -0700)]
bpo-35524: Update Windows installer image in docs (GH-14966)

5 years agobpo-37664: Update regex for ignoring cache warning on some buildbots (GH-14960)
Steve Dower [Fri, 26 Jul 2019 16:06:04 +0000 (09:06 -0700)]
bpo-37664: Update regex for ignoring cache warning on some buildbots (GH-14960)

5 years agobpo-37340: remove free_list for bound method objects (GH-14232)
Inada Naoki [Fri, 26 Jul 2019 06:05:50 +0000 (15:05 +0900)]
bpo-37340: remove free_list for bound method objects (GH-14232)

5 years agobpo-29446: tkinter 'import *' only imports what it should (GH-14864)
Flavian Hautbois [Fri, 26 Jul 2019 01:30:33 +0000 (03:30 +0200)]
bpo-29446: tkinter 'import *' only imports what it should (GH-14864)

Add __all__ to tkinter.__init__ and submodules.  Replace 'import *'
with explicit imports in some submodules.

5 years agobpo-37641 preserve relative file location in embeddable zip (GH-14884)
Bill Collins [Thu, 25 Jul 2019 21:36:58 +0000 (22:36 +0100)]
bpo-37641 preserve relative file location in embeddable zip (GH-14884)

Previously, pyc files in the embeddable distribution reported their
location as <build path>/<file stem>.py. This causes a little confusion
when interpreting stack traces as the file is in a (almost certainly)
incorrect location, and lacks the full relative path to Lib (e.g.
email/mime/image.py will only show image.py).

This change preserves the Lib relative location of the source file as a
path so that stack traces are (hopefully) less misleading and more
informative.

Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
5 years agoSwap 'if' branches so content matches to condition in importlib example (GH-14947)
Tzu-ping Chung [Thu, 25 Jul 2019 17:20:33 +0000 (01:20 +0800)]
Swap 'if' branches so content matches to condition in importlib example (GH-14947)

Prior to this change the guard on an 'elif' used an assignment expression whose value was used in a later 'else' block, causing some confusion for people.

(Discussion on Twitter: https://twitter.com/brettsky/status/1153861041068994566.)

Automerge-Triggered-By: @brettcannon
5 years agobpo-37502: handle default parameter for buffers argument of pickle.loads correctly...
Markus Mohrhard [Thu, 25 Jul 2019 16:00:34 +0000 (00:00 +0800)]
bpo-37502: handle default parameter for buffers argument of pickle.loads correctly (GH-14593)

5 years agocloses bpo-37675: Use pkgutil.iter_modules to find fixers in a package rather than...
Benjamin Peterson [Wed, 24 Jul 2019 23:38:50 +0000 (16:38 -0700)]
closes bpo-37675: Use pkgutil.iter_modules to find fixers in a package rather than listdir. (14942)

5 years agobpo-37672: Switch Windows Store package to use pip.ini for user mode (GH-14939)
Steve Dower [Wed, 24 Jul 2019 22:13:22 +0000 (15:13 -0700)]
bpo-37672: Switch Windows Store package to use pip.ini for user mode (GH-14939)

5 years agoRemove duplicate call to strip method in Parser/pgen/token.py (GH-14938)
Hansraj Das [Wed, 24 Jul 2019 20:31:19 +0000 (02:01 +0530)]
Remove duplicate call to strip method in Parser/pgen/token.py (GH-14938)

5 years agobpo-37664: Update bundled pip to 19.2.1 and setuptools to 41.0.1 (GH-14934)
Pradyun Gedam [Wed, 24 Jul 2019 19:08:02 +0000 (00:38 +0530)]
bpo-37664: Update bundled pip to 19.2.1 and setuptools to 41.0.1 (GH-14934)

5 years agobpo-34160: explain how to deal with attribute order in ElementTree (GH-14867)
Stefan Behnel [Wed, 24 Jul 2019 18:22:50 +0000 (20:22 +0200)]
bpo-34160: explain how to deal with attribute order in ElementTree (GH-14867)

* Fix the formatting in the documentation of the tostring() functions.

* bpo-34160: Document that the tostring() and tostringlist() functions also preserve the attribute order now.

* bpo-34160: Add an explanation of how users should deal with the attribute order.

5 years agobpo-37399: Correctly attach tail text to the last element/comment/pi (GH-14856)
Stefan Behnel [Wed, 24 Jul 2019 18:08:02 +0000 (20:08 +0200)]
bpo-37399: Correctly attach tail text to the last element/comment/pi (GH-14856)

* bpo-37399: Correctly attach tail text to the last element/comment/pi, even when comments or pis are discarded.
Also fixes the insertion of PIs when "insert_pis=True" is configured for a TreeBuilder.

5 years agobpo-29548: deprecate PyEval_Call* functions (GH-14804)
Jeroen Demeyer [Wed, 24 Jul 2019 12:02:49 +0000 (14:02 +0200)]
bpo-29548: deprecate PyEval_Call* functions (GH-14804)

5 years agobpo-37667: Add regression test for regrtest. (GH-14929)
Gregory P. Smith [Wed, 24 Jul 2019 05:28:48 +0000 (22:28 -0700)]
bpo-37667: Add regression test for regrtest. (GH-14929)

Verify that it appears to find roughly the right number of tests in the stdlib's testsuite.

5 years agoOnly setup PGO tests when --pgo is enabled. (GH-14927)
Gregory P. Smith [Wed, 24 Jul 2019 04:33:48 +0000 (21:33 -0700)]
Only setup PGO tests when --pgo is enabled. (GH-14927)

5 years agoTouch up venv docs (GH-14922)
Brett Cannon [Tue, 23 Jul 2019 21:34:32 +0000 (14:34 -0700)]
Touch up venv docs (GH-14922)

5 years agobpo-29446: IDLE -- add explicit imports (GH-14919)
Terry Jan Reedy [Tue, 23 Jul 2019 20:14:59 +0000 (16:14 -0400)]
bpo-29446: IDLE -- add explicit imports (GH-14919)

Stop depending on tkinter import *.

5 years agobpo-37653: Fix libinstall target in Makefile (GH-14911)
Erlend Egeberg Aasland [Tue, 23 Jul 2019 16:11:50 +0000 (18:11 +0200)]
bpo-37653: Fix libinstall target in Makefile (GH-14911)

5 years agobpo-17535: IDLE editor line numbers (GH-14030)
Tal Einat [Tue, 23 Jul 2019 12:22:11 +0000 (15:22 +0300)]
bpo-17535: IDLE editor line numbers (GH-14030)

5 years agobpo-33610: validate non-negative integer inputs in IDLE's config (GH-14822)
Tal Einat [Tue, 23 Jul 2019 10:02:11 +0000 (13:02 +0300)]
bpo-33610: validate non-negative integer inputs in IDLE's config (GH-14822)

5 years agobpo-36044: Reduce number of unit tests run for PGO build (GH-14702)
Neil Schemenauer [Mon, 22 Jul 2019 19:54:25 +0000 (12:54 -0700)]
bpo-36044: Reduce number of unit tests run for PGO build (GH-14702)

Reduce the number of unit tests run for the PGO generation task.  This
speeds up the task by a factor of about 15x.  Running the full unit test
suite is slow.  This change may result in a slightly less optimized build
since not as many code branches will be executed.  If you are willing to
wait for the much slower build, the old behavior can be restored using
'./configure [..] PROFILE_TASK="-m test --pgo-extended"'.  We make no
guarantees as to which PGO task set produces a faster build.  Users who
care should run their own relevant benchmarks as results can depend on
the environment, workload, and compiler tool chain.

5 years agoUpdate logging cookbook to show multiple worker processes using the concurrent.future...
Vinay Sajip [Mon, 22 Jul 2019 11:14:50 +0000 (12:14 +0100)]
Update logging cookbook to show multiple worker processes using the concurrent.futures module. (#14905)

5 years agobpo-21478: Record calls to parent when autospecced objects are used as child with...
Xtreak [Mon, 22 Jul 2019 07:38:22 +0000 (13:08 +0530)]
bpo-21478: Record calls to parent when autospecced objects are used as child with attach_mock (GH 14688)

* Clear name and parent of mock in autospecced objects used with attach_mock

* Add NEWS entry

* Fix reversed order of comparison

* Test child and standalone function calls

* Use a helper function extracting mock to avoid code duplication and refactor tests.

5 years agoAdd examples to elucidate the formulas (GH-14898)
Raymond Hettinger [Sun, 21 Jul 2019 23:32:00 +0000 (16:32 -0700)]
Add examples to elucidate the formulas (GH-14898)

5 years agobpo-37627: Add acknowledgment (#14883)
Terry Jan Reedy [Sun, 21 Jul 2019 20:26:24 +0000 (16:26 -0400)]
bpo-37627: Add acknowledgment (#14883)

5 years agoFix typos in docs, comments and test assert messages (#14872)
Min ho Kim [Sun, 21 Jul 2019 20:12:33 +0000 (06:12 +1000)]
Fix typos in docs, comments and test assert messages (#14872)

5 years agoFix typo found by Min ho Kim (#14879)
Terry Jan Reedy [Sun, 21 Jul 2019 19:24:45 +0000 (15:24 -0400)]
Fix typo found by Min ho Kim (#14879)

5 years agoMinor whitespace, indentation, and quoting changes to improve internal consistency...
Raymond Hettinger [Sun, 21 Jul 2019 19:13:07 +0000 (12:13 -0700)]
Minor whitespace, indentation, and quoting changes to improve internal consistency and appease linters (GH-14888)

5 years agoBpo-37644: update suspicious.csv for distutils/examples (GH-14885)
Ned Deily [Sun, 21 Jul 2019 18:01:56 +0000 (20:01 +0200)]
Bpo-37644: update suspicious.csv for distutils/examples (GH-14885)

5 years agobpo-37627: Initialize IDLE Custom Run dialog with previous entries (#14870)
Ngalim Siregar [Sun, 21 Jul 2019 15:37:28 +0000 (22:37 +0700)]
bpo-37627: Initialize IDLE Custom Run dialog with previous entries (#14870)

Repeat the command line arguments most recently entered before so the user can edit them.

5 years agobpo-36324: Make internal attributes for statistics.NormalDist() private. (GH-14871)
Raymond Hettinger [Sun, 21 Jul 2019 07:34:47 +0000 (00:34 -0700)]
bpo-36324: Make internal attributes for statistics.NormalDist() private. (GH-14871)

* Make internals private

* Finish making mu and sigma private

* Add missing __hash__() method

* Add blurb

5 years agobpo-37476: Adding tests for asutf8 and asutf8andsize (GH-14531)
Hai Shi [Sat, 20 Jul 2019 07:56:23 +0000 (02:56 -0500)]
bpo-37476: Adding tests for asutf8 and asutf8andsize (GH-14531)

5 years agobpo-36546: Clean-up comments (GH-14857)
Raymond Hettinger [Fri, 19 Jul 2019 08:57:22 +0000 (01:57 -0700)]
bpo-36546:  Clean-up comments (GH-14857)

5 years agobpo-37624: Document weight assumptions for random.choices() (GH-14855)
Raymond Hettinger [Fri, 19 Jul 2019 08:56:42 +0000 (01:56 -0700)]
bpo-37624: Document weight assumptions for random.choices() (GH-14855)

5 years agobpo-37547: Fix a compiler warning in winconsoleio.c (GH-14785)
Zackery Spytz [Fri, 19 Jul 2019 06:07:06 +0000 (00:07 -0600)]
bpo-37547: Fix a compiler warning in winconsoleio.c (GH-14785)

The compiler warning was introduced in
59ad110d7a7784d53d0b502eebce0346597a6bef.

5 years agobpo-37610: improve Using Python doc wrt Editors & IDE (GH-14850)
aldwinaldwin [Fri, 19 Jul 2019 01:23:17 +0000 (09:23 +0800)]
bpo-37610: improve Using Python doc wrt Editors & IDE (GH-14850)

Move the Editors and IDE section out of the Unix section, to its own section.

https://bugs.python.org/issue37610

5 years agobpo-33610: IDLE's code-context always shows current context immediately (GH-14821)
Tal Einat [Thu, 18 Jul 2019 20:03:18 +0000 (23:03 +0300)]
bpo-33610: IDLE's code-context always shows current context immediately (GH-14821)

Eliminate delay of up to 100ms and accompanying visual artifact.
Fix bug of never showing context when hide and show.

5 years agobpo-34443: Use __qualname__ instead of __name__ in enum exception messages. (GH-14809)
Walter Dörwald [Thu, 18 Jul 2019 18:37:13 +0000 (20:37 +0200)]
bpo-34443: Use __qualname__ instead of __name__ in enum exception messages. (GH-14809)

* Use __qualname__ instead of __name__ in enum exception messages.

5 years agoAdjust builtins.zip() docstring to better communicate its signature (GH-14833)
Sergey Fedoseev [Thu, 18 Jul 2019 18:19:25 +0000 (23:19 +0500)]
Adjust builtins.zip() docstring to better communicate its signature (GH-14833)

5 years agobpo-37552: Skip failing tests in strptime/strftime with UCRT version 17763.615 (...
Paul Monson [Thu, 18 Jul 2019 13:56:59 +0000 (06:56 -0700)]
bpo-37552: Skip failing tests in strptime/strftime with UCRT version 17763.615 (#14460)

A bug in MSVC UCRT version 17763.615 (which has been fixed in newer versions) is causing test failures in some strptime/strftime tests when the default code page is c65001. This change selectively skips the tests affected by this.

5 years agobpo-36390: Gather IDLE Format menu functions into format.py (#14827)
Terry Jan Reedy [Thu, 18 Jul 2019 00:48:36 +0000 (20:48 -0400)]
bpo-36390: Gather IDLE Format menu functions into format.py (#14827)

Add two indent spec methods from editor and Rstrip to existing file.
Tests are not added for indent methods because they need change
in lights of 3.x's prohibition on mixing tabs and spaces.

5 years agobpo-34155: Dont parse domains containing @ (GH-13079)
jpic [Wed, 17 Jul 2019 21:54:25 +0000 (23:54 +0200)]
bpo-34155: Dont parse domains containing @ (GH-13079)

Before:

        >>> email.message_from_string('From: a@malicious.org@important.com', policy=email.policy.default)['from'].addresses
        (Address(display_name='', username='a', domain='malicious.org'),)

        >>> parseaddr('a@malicious.org@important.com')
        ('', 'a@malicious.org')

    After:

        >>> email.message_from_string('From: a@malicious.org@important.com', policy=email.policy.default)['from'].addresses
        (Address(display_name='', username='', domain=''),)

        >>> parseaddr('a@malicious.org@important.com')
        ('', 'a@')

https://bugs.python.org/issue34155

5 years agoFix IndexError when parsing unexpectedly ending quoted-string. (GH-14813)
Abhilash Raj [Wed, 17 Jul 2019 16:48:52 +0000 (09:48 -0700)]
Fix IndexError when parsing unexpectedly ending quoted-string. (GH-14813)

This exception was caused because the input ended unexpectedly with only one
single quote instead of a pair with some value inside it.

5 years agobpo-37461: Fix infinite loop in parsing of specially crafted email headers (GH-14794)
Abhilash Raj [Wed, 17 Jul 2019 16:44:27 +0000 (09:44 -0700)]
bpo-37461: Fix infinite loop in parsing of specially crafted email headers (GH-14794)

* bpo-37461: Fix infinite loop in parsing of specially crafted email headers.

Some crafted email header would cause the get_parameter method to run in an
infinite loop causing a DoS attack surface when parsing those headers. This
patch fixes that by making sure the DQUOTE character is handled to prevent
going into an infinite loop.

5 years agobpo-36390: IDLE: Combine region formatting methods. (GH-12481)
Cheryl Sabella [Wed, 17 Jul 2019 13:44:44 +0000 (09:44 -0400)]
bpo-36390: IDLE: Combine region formatting methods. (GH-12481)

Rename paragraph.py to format.py and add region formatting methods
from editor.py.  Add tests for the latter.

5 years agobpo-37543: optimize pymalloc (#14674)
Inada Naoki [Wed, 17 Jul 2019 12:23:57 +0000 (21:23 +0900)]
bpo-37543: optimize pymalloc (#14674)

PyObject_Malloc() and PyObject_Free() inlines pymalloc_alloc and
pymalloc_free partially.
But when PGO is not used, compiler don't know where is the hot part
in pymalloc_alloc and pymalloc_free.

5 years agobpo-37530: simplify, optimize and clean up IDLE code context (GH-14675)
Tal Einat [Wed, 17 Jul 2019 08:15:53 +0000 (11:15 +0300)]
bpo-37530: simplify, optimize and clean up IDLE code context (GH-14675)

* Only create CodeContext instances for "real" editors windows, but
  not e.g. shell or output windows.
* Remove configuration update Tk event fired every second, by having
  the editor window ask its code context widget to update when
  necessary, i.e. upon font or highlighting updates.
* When code context isn't being shown, avoid having a Tk event fired
  every 100ms to check whether the code context needs to be updated.
* Use the editor window's getlineno() method where applicable.
* Update font of the code context widget before the main text widget

5 years agoDocs: Correct formatting of a multiline code block (GH-13806)
Joseph Fox-Rabinovitz [Wed, 17 Jul 2019 08:13:01 +0000 (03:13 -0500)]
Docs: Correct formatting of a multiline code block (GH-13806)

5 years agobpo-27452: IDLE: Cleanup config.py code (GH-14577)
Cheryl Sabella [Tue, 16 Jul 2019 20:58:25 +0000 (16:58 -0400)]
bpo-27452: IDLE: Cleanup config.py code (GH-14577)