]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
4 years agobpo-40692: Run more test_concurrent_futures tests (GH-20239)
Asheesh Laroia [Mon, 8 Feb 2021 03:15:51 +0000 (19:15 -0800)] 
bpo-40692: Run more test_concurrent_futures tests (GH-20239)

In the case of multiprocessing.synchronize() being missing, the
test_concurrent_futures test suite now skips only the tests that
require multiprocessing.synchronize().

Validate that multiprocessing.synchronize exists as part of
_check_system_limits(), allowing ProcessPoolExecutor to raise
NotImplementedError during __init__, rather than crashing with
ImportError during __init__ when creating a lock imported from
multiprocessing.synchronize.

Use _check_system_limits() to disable tests of
ProcessPoolExecutor on systems without multiprocessing.synchronize.

Running the test suite without multiprocessing.synchronize reveals
that Lib/compileall.py crashes when it uses a ProcessPoolExecutor.
Therefore, change Lib/compileall.py to call _check_system_limits()
before creating the ProcessPoolExecutor.

Note that both Lib/compileall.py and Lib/test/test_compileall.py
were attempting to sanity-check ProcessPoolExecutor by expecting
ImportError. In multiprocessing.resource_tracker, sem_unlink() is also absent
on platforms where POSIX semaphores aren't available. Avoid using
sem_unlink() if it, too, does not exist.

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
4 years agobpo-43147: Remove archaic terminology. (GH-24462)
Raymond Hettinger [Mon, 8 Feb 2021 00:44:42 +0000 (16:44 -0800)] 
bpo-43147:  Remove archaic terminology. (GH-24462)

4 years agobpo-43149: Improve error message for exception group without parentheses (GH-24467)
Pablo Galindo [Sun, 7 Feb 2021 18:42:21 +0000 (18:42 +0000)] 
bpo-43149: Improve error message for exception group without parentheses (GH-24467)

4 years agobpo-16781: In 'exec' doc, add 'nonlocal' to 'yield' and 'return' (GH-2446)
Terry Jan Reedy [Sun, 7 Feb 2021 05:28:50 +0000 (00:28 -0500)] 
bpo-16781: In 'exec' doc, add 'nonlocal' to 'yield' and 'return' (GH-2446)

These 3 statements cannot be used at module scope -- nor in exec with one namespace.

4 years agoSimple typo fix (GH-24448)
Andrew Tennikoff [Fri, 5 Feb 2021 18:17:01 +0000 (05:17 +1100)] 
Simple typo fix (GH-24448)

4 years agoFix a typo in a deprecation warning (GH-24423)
Zackery Spytz [Fri, 5 Feb 2021 13:09:17 +0000 (06:09 -0700)] 
Fix a typo in a deprecation warning (GH-24423)

4 years agobpo-43132: Fix incorrect handling of PyObject_RichCompareBool() in _zoneinfo (GH...
Zackery Spytz [Fri, 5 Feb 2021 08:25:30 +0000 (01:25 -0700)] 
bpo-43132: Fix incorrect handling of PyObject_RichCompareBool() in _zoneinfo (GH-24450)

PyObject_RichCompareBool() returns -1 on error, but this case is
not handled by the find_in_strong_cache() function.  Any exception
raised by PyObject_RichCompareBool() should be propagated.

4 years agoMinor readability improvements. Also note performance impact of __slots__. (GH-24456)
Raymond Hettinger [Fri, 5 Feb 2021 06:05:42 +0000 (22:05 -0800)] 
Minor readability improvements.  Also note performance impact of __slots__. (GH-24456)

4 years agoReduce overhead on random timings (GH-24455)
Raymond Hettinger [Fri, 5 Feb 2021 05:36:03 +0000 (21:36 -0800)] 
Reduce overhead on random timings (GH-24455)

4 years agobpo-35295: Remove outdated comment. (GH-24453)
Inada Naoki [Fri, 5 Feb 2021 04:21:28 +0000 (13:21 +0900)] 
bpo-35295: Remove outdated comment. (GH-24453)

4 years agobpo-43102: Set namedtuple __new__'s internal builtins to a dict. (GH-24439)
Raymond Hettinger [Thu, 4 Feb 2021 23:52:16 +0000 (15:52 -0800)] 
bpo-43102:  Set namedtuple __new__'s internal builtins to a dict. (GH-24439)

4 years agobpo-42882: Fix MSVC warnings in pystate.c (GH-24440)
Ken Jin [Thu, 4 Feb 2021 22:08:03 +0000 (06:08 +0800)] 
bpo-42882: Fix MSVC warnings in pystate.c (GH-24440)

_PyRuntimeState.unicode_ids.next_index type is Py_ssize_t.

4 years agoFix signed/unsigned comparison to avoid compilation warning (GH-24441)
Ken Jin [Thu, 4 Feb 2021 21:38:18 +0000 (05:38 +0800)] 
Fix signed/unsigned comparison to avoid compilation warning (GH-24441)

4 years agobuild(deps): bump actions/cache from v2.1.3 to v2.1.4 (#24446)
dependabot[bot] [Thu, 4 Feb 2021 20:57:10 +0000 (12:57 -0800)] 
build(deps): bump actions/cache from v2.1.3 to v2.1.4 (#24446)

Bumps [actions/cache](https://github.com/actions/cache) from v2.1.3 to v2.1.4.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.3...26968a09c0ea4f3e233fdddbafd1166051a095f6)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4 years agoFix dependabot.yml file (GH-24443)
Mariatta Wijaya [Thu, 4 Feb 2021 19:22:34 +0000 (11:22 -0800)] 
Fix dependabot.yml file (GH-24443)

The `target-branch` field doesn't seem to support array.
Since it defaults to the default branch anyway, we should just remove the `target-branch` field from the config.

4 years agobpo-43106: Add os.O_EVTONLY/O_FSYNC/O_SYMLINK/O_NOFOLLOW_ANY (GH-24428)
Dong-hee Na [Wed, 3 Feb 2021 23:32:55 +0000 (08:32 +0900)] 
bpo-43106: Add os.O_EVTONLY/O_FSYNC/O_SYMLINK/O_NOFOLLOW_ANY (GH-24428)

4 years agobpo-43121: Fix incorrect SyntaxError message for missing comma (GH-24436)
Pablo Galindo [Wed, 3 Feb 2021 23:29:26 +0000 (23:29 +0000)] 
bpo-43121: Fix incorrect SyntaxError message for missing comma (GH-24436)

4 years agoFix typo (GH-23019)
Harry [Wed, 3 Feb 2021 21:25:28 +0000 (21:25 +0000)] 
Fix typo (GH-23019)

Fixed possible typo in comment

4 years agobuild(deps): bump actions/upload-artifact from v2.2.1 to v2.2.2 (GH-24411)
dependabot[bot] [Wed, 3 Feb 2021 21:22:27 +0000 (13:22 -0800)] 
build(deps): bump actions/upload-artifact from v2.2.1 to v2.2.2 (GH-24411)

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from v2.2.1 to v2.2.2.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2.2.1...e448a9b857ee2131e752b06002bf0e093c65e571)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4 years agoPost 3.10.0a5
Pablo Galindo [Wed, 3 Feb 2021 06:15:44 +0000 (06:15 +0000)] 
Post 3.10.0a5

4 years agoMerge tag 'v3.10.0a5'
Pablo Galindo [Wed, 3 Feb 2021 06:14:25 +0000 (06:14 +0000)] 
Merge tag 'v3.10.0a5'

Python 3.10.0a5

4 years agobpo-43082: Remove redundant 'the' in Descriptor howto (GH-24394)
diegoe [Wed, 3 Feb 2021 03:28:36 +0000 (22:28 -0500)] 
bpo-43082: Remove redundant 'the' in Descriptor howto (GH-24394)

4 years agoAdd link to Microsoft docs for limitations in Windows Store package (GH-24422)
Steve Dower [Wed, 3 Feb 2021 01:13:43 +0000 (01:13 +0000)] 
Add link to Microsoft docs for limitations in Windows Store package (GH-24422)

4 years agobpo-8264: Document hasattr and getattr behavior for private attributes (GH-23513)
Ken Jin [Tue, 2 Feb 2021 21:06:57 +0000 (05:06 +0800)] 
bpo-8264: Document hasattr and getattr behavior for private attributes (GH-23513)

Clarify ``getattr`` and ``setattr`` requirements for accessing name-mangled attributes

Co-Authored-By: Catalin Iacob <iacobcatalin@gmail.com>
4 years agoFix Sphynx syntax in the memory.rst document v3.10.0a5
Pablo Galindo [Tue, 2 Feb 2021 20:43:11 +0000 (20:43 +0000)] 
Fix Sphynx syntax in the memory.rst document

4 years agoPython 3.10.0a5
Pablo Galindo [Tue, 2 Feb 2021 20:41:05 +0000 (20:41 +0000)] 
Python 3.10.0a5

4 years agobpo-43108: Fix a reference leak in the curses module (GH-24420)
Pablo Galindo [Tue, 2 Feb 2021 20:38:26 +0000 (20:38 +0000)] 
bpo-43108: Fix a reference leak in the curses module (GH-24420)

4 years agobpo-41149: Fix a bug in threading that causes fals-y threads callables to fail to...
BarneyStratford [Tue, 2 Feb 2021 20:24:24 +0000 (20:24 +0000)] 
bpo-41149: Fix a bug in threading that causes fals-y threads callables to fail to start. (GH-21201)

4 years agobpo-42997: Improve error message for missing : before suites (GH-24292)
Pablo Galindo [Tue, 2 Feb 2021 19:54:22 +0000 (19:54 +0000)] 
bpo-42997: Improve error message for missing : before suites (GH-24292)

* Add to the peg generator a new directive ('&&') that allows to expect
  a token and hard fail the parsing if the token is not found. This
  allows to quickly emmit syntax errors for missing tokens.

* Use the new grammar element to hard-fail if the ':' is missing before
  suites.

4 years agoOnly eliminate jumps to successor block if jump is unconditional. (GH-24417)
Mark Shannon [Tue, 2 Feb 2021 14:59:15 +0000 (14:59 +0000)] 
Only eliminate jumps to successor block if jump is unconditional. (GH-24417)

* Prevents elimination of the sole test of a value in statements like:
   if x or True: ...

4 years agobpo-41748: Handles unquoted attributes with commas (#24072)
Karl Dubost [Mon, 1 Feb 2021 20:32:50 +0000 (05:32 +0900)] 
bpo-41748: Handles unquoted attributes with commas (#24072)

* bpo-41748: Adds tests for unquoted attributes with comma

* bpo-41748: Handles unquoted attributes with comma

* bpo-41748: Addresses review comments

* bpo-41748: Addresses review comments

* Adds more test cases
* Simplifies the regex for handling spaces

* bpo-41748: Moves attributes tests under the right class

* bpo-41748: Addresses review about duplicate attributes

* bpo-41748: Adds NEWS.d entry for this patch

4 years agobpo-38307: Add end_lineno attribute to pyclbr Objects (GH-24348)
Aviral Srivastava [Mon, 1 Feb 2021 17:38:44 +0000 (09:38 -0800)] 
bpo-38307: Add end_lineno attribute to pyclbr Objects (GH-24348)

For back-compatibility, make the new constructor parameter for public classes Function and Class
keyword-only with a default of None.

Co-authored-by: Aviral Srivastava <aviralsrivastava@Avirals-MacBook-Air.local
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
4 years agobpo-42834: Fix _json internal caches for subinterpreters (GH-24121)
Ken Jin [Mon, 1 Feb 2021 16:26:56 +0000 (00:26 +0800)] 
bpo-42834: Fix _json internal caches for subinterpreters (GH-24121)

Make internal caches of the _json extension module
compatible with subinterpreters.

4 years agoFix typo in Lib/trace.py (GH-24309)
Yonatan Goldschmidt [Mon, 1 Feb 2021 15:46:38 +0000 (17:46 +0200)] 
Fix typo in Lib/trace.py (GH-24309)

4 years agobpo-42990: Further refactoring of PyEval_ functions. (GH-24368)
Mark Shannon [Mon, 1 Feb 2021 10:42:03 +0000 (10:42 +0000)] 
bpo-42990: Further refactoring of PyEval_ functions. (GH-24368)

* Further refactoring of PyEval_EvalCode and friends. Break into make-frame, and eval-frame parts.

* Simplify function vector call using new _PyEval_Vector.

* Remove unused internal functions: _PyEval_EvalCodeWithName and _PyEval_EvalCode.

* Don't use legacy function PyEval_EvalCodeEx.

4 years agobpo-42504: Ensure that get_config_var('MACOSX_DEPLOYMENT_TARGET') is a string (GH...
Ronald Oussoren [Mon, 1 Feb 2021 03:29:44 +0000 (04:29 +0100)] 
bpo-42504: Ensure that get_config_var('MACOSX_DEPLOYMENT_TARGET') is a string (GH-24341)

* bpo-42504: Ensure that get_config_var('MACOSX_DEPLOYMENT_TARGET') is a string

4 years agobpo-42927: Update the What's new entry for LOAD_ATTR optimizations (GH-24383)
Pablo Galindo [Sun, 31 Jan 2021 22:55:48 +0000 (22:55 +0000)] 
bpo-42927: Update the What's new entry for LOAD_ATTR optimizations (GH-24383)

4 years agobpo-43017: Improve error message for unparenthesised tuples in comprehensions (GH24314)
Pablo Galindo [Sun, 31 Jan 2021 22:52:56 +0000 (22:52 +0000)] 
bpo-43017: Improve error message for unparenthesised tuples in comprehensions (GH24314)

4 years agobpo-42986: Fix parser crash when reporting syntax errors in f-string with newlines...
Pablo Galindo [Sun, 31 Jan 2021 22:48:23 +0000 (22:48 +0000)] 
bpo-42986: Fix parser crash when reporting syntax errors in f-string with newlines (GH-24279)

4 years agobpo-43016: Fix test_curses on platform without cursesw (GH-24405)
Serhiy Storchaka [Sun, 31 Jan 2021 21:21:55 +0000 (23:21 +0200)] 
bpo-43016: Fix test_curses on platform without cursesw (GH-24405)

4 years agobpo-41604: Don't decrement the reference count of the previous user_ptr when set_pane...
Anonymous Maarten [Sun, 31 Jan 2021 17:55:15 +0000 (18:55 +0100)] 
bpo-41604: Don't decrement the reference count of the previous user_ptr when set_panel_usertpr fails (GH-21933)

4 years agobpo-43083: Fix error handling in _sqlite3 (GH-24395)
Serhiy Storchaka [Sun, 31 Jan 2021 15:42:38 +0000 (17:42 +0200)] 
bpo-43083: Fix error handling in _sqlite3 (GH-24395)

4 years agobpo-43016: Rewrite tests for curses (GH-24312)
Serhiy Storchaka [Sun, 31 Jan 2021 15:22:27 +0000 (17:22 +0200)] 
bpo-43016: Rewrite tests for curses (GH-24312)

4 years agobpo-43030: Fixed a compiler warning in Py_UNICODE_ISSPACE with signed wchar_t (GH...
Serhiy Storchaka [Sun, 31 Jan 2021 13:55:13 +0000 (15:55 +0200)] 
bpo-43030: Fixed a compiler warning in Py_UNICODE_ISSPACE with signed wchar_t (GH-24350)

4 years agoDoc: errors tutorial improvements (GH-16269)
Adorilson Bezerra [Sun, 31 Jan 2021 06:07:11 +0000 (03:07 -0300)] 
Doc: errors tutorial improvements (GH-16269)

Improvements:

- Improvements in how try clause works section
  This suggestion is because the execution continues after *except*, not after *try* but before *except*. I guess this form more clear.

- Surrounding some keywords with \*...\*
  For uniformity the highlighted terms

- Adjust the number of chars per line to 80

4 years agobpo-43059: Remove reference to legacy external sqlite3 repository (GH-24364)
L [Sun, 31 Jan 2021 05:19:07 +0000 (05:19 +0000)] 
bpo-43059: Remove reference to legacy external sqlite3 repository (GH-24364)

4 years agobpo-43077: Update bundled pip to 21.0.1 and setuptools to 52.0.0 (GH-24386)
Paul Moore [Sat, 30 Jan 2021 16:42:36 +0000 (16:42 +0000)] 
bpo-43077: Update bundled pip to 21.0.1 and setuptools to 52.0.0 (GH-24386)

Update bundled pip to 21.0.1 and setuptools to 52.0.0

4 years agobpo-40455: Fix gcc10+ warning about writing into a section of offset 0 (GH-24384)
Pablo Galindo [Sat, 30 Jan 2021 13:54:22 +0000 (13:54 +0000)] 
bpo-40455: Fix gcc10+ warning about writing into a section of offset 0 (GH-24384)

4 years agobpo-43047: logging.config formatters documentation update (GH-24358)
Ian Wienand [Sat, 30 Jan 2021 10:37:15 +0000 (21:37 +1100)] 
bpo-43047: logging.config formatters documentation update (GH-24358)

The documentation for some parts of the logging.config formatters has
fallen behind the code.  For example, the dictionary-schema section
does not list the "class" attribute, however it is discussed in the
file/ini discussion; and neither references the style argument which
has been added.

This modifies the dictionary-schema formatters documentation to list
the keys available and overall makes it clearer these are passed to
create a logging.Formatter object.

The logging.Formatter documentation describes the default values of
format/datefmt and the various formatting options.  Since we have now
more clearly described how the configuration is created via this type
of object, we remove the discussion in this document to avoid
duplication and rely on users reading the referenced logging.Formatter
documenation directly for such details.

Instead of duplicating the discussion for the two config types, the
file/ini section is modified to link back to the dictionary-schema
discussion, making it clear the same arguments are accepted.

Automerge-Triggered-By: GH:vsajip
4 years agobpo-42927: Inline cache for attributes defined with '__slots__' (#24216)
Guido van Rossum [Sat, 30 Jan 2021 02:02:29 +0000 (18:02 -0800)] 
bpo-42927: Inline cache for attributes defined with '__slots__' (#24216)

4 years agobpo-38631: Replace compiler fatal errors with exceptions (GH-24369)
Victor Stinner [Sat, 30 Jan 2021 00:46:44 +0000 (01:46 +0100)] 
bpo-38631: Replace compiler fatal errors with exceptions (GH-24369)

* Replace Py_FatalError() calls with regular SystemError exceptions.
* compiler_exit_scope() calls _PyErr_WriteUnraisableMsg() to log the
  PySequence_DelItem() failure.
* compiler_unit_check() uses _PyMem_IsPtrFreed().
* compiler_make_closure(): remove "(reftype == FREE)" comment since
  reftype can also be LOCAL or GLOBAL_EXPLICIT.

4 years agoFix a reference leak in the compiler for compiler_lambda() (GH-24382)
Pablo Galindo [Fri, 29 Jan 2021 22:40:59 +0000 (22:40 +0000)] 
Fix a reference leak in the compiler for compiler_lambda() (GH-24382)

4 years agobpo-42323: Fix math.nextafter() on AIX (GH-24381)
Victor Stinner [Fri, 29 Jan 2021 22:04:50 +0000 (23:04 +0100)] 
bpo-42323: Fix math.nextafter() on AIX (GH-24381)

math_nextafter_impl() must return a Python object, not a C double.

4 years agobpo-41282: Add deprecation warning and docs for distutils (PEP 632) (GH-24355)
Steve Dower [Fri, 29 Jan 2021 21:48:55 +0000 (21:48 +0000)] 
bpo-41282: Add deprecation warning and docs for distutils (PEP 632) (GH-24355)

4 years agoFixing typos in turtle.rst (GH-24376)
Jules Lasne [Fri, 29 Jan 2021 21:40:45 +0000 (22:40 +0100)] 
Fixing typos in turtle.rst (GH-24376)

Automerge-Triggered-By: GH:JulienPalard
4 years agobpo-43008: Add 'Patch by Ken Hilton' (GH-24370)
Terry Jan Reedy [Fri, 29 Jan 2021 18:02:05 +0000 (13:02 -0500)] 
bpo-43008: Add 'Patch by Ken Hilton' (GH-24370)

4 years agoFixed typo in turtle.rst (GH-24371)
Jules Lasne [Fri, 29 Jan 2021 17:46:39 +0000 (18:46 +0100)] 
Fixed typo in turtle.rst (GH-24371)

Found it while translating it to french 🤷

Automerge-Triggered-By: GH:JulienPalard
4 years agobpo-42979: Use _Py_CheckSlotResult() to check slots result (GH-24356)
Victor Stinner [Fri, 29 Jan 2021 15:53:03 +0000 (16:53 +0100)] 
bpo-42979: Use _Py_CheckSlotResult() to check slots result (GH-24356)

When Python is built in debug mode (with C assertions), calling a
type slot like sq_length (__len__() in Python) now fails with a fatal
error if the slot succeeded with an exception set, or failed with no
exception set. The error message contains the slot, the type name,
and the current exception (if an exception is set).

* Check the result of all slots using _Py_CheckSlotResult().
* No longer pass op_name to ternary_op() in release mode.
* Replace operator with dunder Python method name in error messages.
  For example, replace "*" with "__mul__".
* Fix compiler_exit_scope() when an exception is set.
* Fix bytearray.extend() when an exception is set: don't call
  bytearray_setslice() with an exception set.

4 years agobpo-42990: Introduce 'frame constructor' struct to simplify API for PyEval_CodeEval...
Mark Shannon [Fri, 29 Jan 2021 13:24:55 +0000 (13:24 +0000)] 
bpo-42990: Introduce 'frame constructor' struct to simplify API for PyEval_CodeEval and friends (GH-24298)

* Introduce 'frame constructor' to simplify API for frame creation

* Embed struct using a macro to conform to PEP 7

4 years agobpo-23544: Disable IDLE Stack Viewer when running user code (GH-17163)
Zackery Spytz [Thu, 28 Jan 2021 23:13:22 +0000 (16:13 -0700)] 
bpo-23544: Disable IDLE Stack Viewer when running user code (GH-17163)

Starting stack viewer when user code is running, including when Debugger is active, hangs or crashes IDLE.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
4 years agobpo-42955: Remove sub-packages from sys.stdlib_module_names (GH-24353)
Victor Stinner [Wed, 27 Jan 2021 23:03:23 +0000 (00:03 +0100)] 
bpo-42955: Remove sub-packages from sys.stdlib_module_names (GH-24353)

4 years agobpo-42979: Enhance abstract.c assertions checking slot result (GH-24352)
Victor Stinner [Wed, 27 Jan 2021 16:39:16 +0000 (17:39 +0100)] 
bpo-42979: Enhance abstract.c assertions checking slot result (GH-24352)

* bpo-42979: Enhance abstract.c assertions checking slot result

Add _Py_CheckSlotResult() function which fails with a fatal error if
a slot function succeeded with an exception set or failed with no
exception set: write the slot name, the type name and the current
exception (if an exception is set).

4 years agobpo-42979: _zoneinfo exec function checks for PyDateTime_IMPORT failure (GH-24333)
Hai Shi [Wed, 27 Jan 2021 10:23:33 +0000 (18:23 +0800)] 
bpo-42979: _zoneinfo exec function checks for PyDateTime_IMPORT failure (GH-24333)

Importing datetime can fail.

4 years agobpo-43031: Set a timeout when running tests in PGO build (GH-24339)
Victor Stinner [Wed, 27 Jan 2021 10:16:15 +0000 (11:16 +0100)] 
bpo-43031: Set a timeout when running tests in PGO build (GH-24339)

Pass --timeout=$(TESTTIMEOUT) option to the default profile task
"./python -m test --pgo" command.

4 years agobpo-43033: Fix the handling of PyObject_SetAttrString() in _zoneinfo.c (GH-24345)
Zackery Spytz [Wed, 27 Jan 2021 08:16:20 +0000 (01:16 -0700)] 
bpo-43033: Fix the handling of PyObject_SetAttrString() in _zoneinfo.c (GH-24345)

4 years agobpo-43008: Make IDLE respect sys.excepthook (GH-24302)
Ken [Tue, 26 Jan 2021 23:55:52 +0000 (07:55 +0800)] 
bpo-43008: Make IDLE respect sys.excepthook (GH-24302)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
4 years agobpo-38250: [Enum] only include .rst test if file available (GH-24342)
Ethan Furman [Tue, 26 Jan 2021 20:52:52 +0000 (12:52 -0800)] 
bpo-38250: [Enum] only include .rst test if file available (GH-24342)

* [Enum] only include .rst test if file available

In order to ensure the ReST documentation is up to date for Enum,
use doctest to check it -- but only if the .rst files have not
been stripped.

4 years agobpo-33387: update documentation for exception handling opcode changes (GH-24334)
Irit Katriel [Tue, 26 Jan 2021 10:17:13 +0000 (10:17 +0000)] 
bpo-33387: update documentation for exception handling opcode changes (GH-24334)

* bpo-33387: remove obsolete comment

* bpo-33387: update SETUP_WITH opcode documentation

4 years agoFix minor typo in the rest format in the enum docs (GH-24335)
Pablo Galindo [Mon, 25 Jan 2021 23:23:30 +0000 (23:23 +0000)] 
Fix minor typo in the rest format in the enum docs (GH-24335)

4 years agoDocument new parenthesized with statements (GH-24281)
Pablo Galindo [Mon, 25 Jan 2021 23:15:51 +0000 (23:15 +0000)] 
Document new parenthesized with statements (GH-24281)

4 years agoTypo in comment (GH-24199)
borispopoff [Mon, 25 Jan 2021 22:51:48 +0000 (23:51 +0100)] 
Typo in comment (GH-24199)

Automerge-Triggered-By: GH:Mariatta
4 years agobpo-38250: [Enum] single-bit flags are canonical (GH-24215)
Ethan Furman [Mon, 25 Jan 2021 22:26:19 +0000 (14:26 -0800)] 
bpo-38250: [Enum] single-bit flags are canonical (GH-24215)

Flag members are now divided by one-bit verses multi-bit, with multi-bit being treated as aliases. Iterating over a flag only returns the contained single-bit flags.

Iterating, repr(), and str() show members in definition order.

When constructing combined-member flags, any extra integer values are either discarded (CONFORM), turned into ints (EJECT) or treated as errors (STRICT). Flag classes can specify which of those three behaviors is desired:

>>> class Test(Flag, boundary=CONFORM):
...     ONE = 1
...     TWO = 2
...
>>> Test(5)
<Test.ONE: 1>

Besides the three above behaviors, there is also KEEP, which should not be used unless necessary -- for example, _convert_ specifies KEEP as there are flag sets in the stdlib that are incomplete and/or inconsistent (e.g. ssl.Options). KEEP will, as the name suggests, keep all bits; however, iterating over a flag with extra bits will only return the canonical flags contained, not the extra bits.

Iteration is now in member definition order.  If member definition order
matches increasing value order, then a more efficient method of flag
decomposition is used; otherwise, sort() is called on the results of
that method to get definition order.

``re`` module:

repr() has been modified to support as closely as possible its previous
output; the big difference is that inverted flags cannot be output as
before because the inversion operation now always returns the comparable
positive result; i.e.

   re.A|re.I|re.M|re.S is ~(re.L|re.U|re.S|re.T|re.DEBUG)

in both of the above terms, the ``value`` is 282.

re's tests have been updated to reflect the modifications to repr().

4 years agobpo-42955: Rename module_names to sys.stdlib_module_names (GH-24332)
Victor Stinner [Mon, 25 Jan 2021 22:12:50 +0000 (23:12 +0100)] 
bpo-42955: Rename module_names to sys.stdlib_module_names (GH-24332)

* Rename _Py_module_names to _Py_stdlib_module_names.
* Rename Python/module_names.h to Python/stdlib_module_names.h.

4 years agobpo-42383: pdb: do not fail to restart the target if the current directory changed...
Andrey Bienkowski [Mon, 25 Jan 2021 21:08:01 +0000 (21:08 +0000)] 
bpo-42383: pdb: do not fail to restart the target if the current directory changed (#23412)

This commit only adds tests and a news entry. The actual bug was fixed in the earlier commit.

4 years agobpo-37319: Improve documentation, code and tests of randrange. (GH-19112)
Serhiy Storchaka [Mon, 25 Jan 2021 21:02:04 +0000 (23:02 +0200)] 
bpo-37319: Improve documentation, code and tests of randrange. (GH-19112)

4 years agobpo-42869: Avoid an HTTP redirection. (GH-24174)
Julien Palard [Mon, 25 Jan 2021 14:50:14 +0000 (15:50 +0100)] 
bpo-42869: Avoid an HTTP redirection. (GH-24174)

4 years agobpo-42843: Keep Sphinx 1.8 and Sphinx 2 compatibility (GH-24282)
Julien Palard [Mon, 25 Jan 2021 14:46:06 +0000 (15:46 +0100)] 
bpo-42843: Keep Sphinx 1.8 and Sphinx 2 compatibility (GH-24282)

4 years agobpo-42955: Fix sys.module_names doc (GH-24329)
Victor Stinner [Mon, 25 Jan 2021 12:59:02 +0000 (13:59 +0100)] 
bpo-42955: Fix sys.module_names doc (GH-24329)

Replace versionchanged markup with versionadded.

4 years agobpo-42955: Add sys.modules_names (GH-24238)
Victor Stinner [Mon, 25 Jan 2021 12:24:42 +0000 (13:24 +0100)] 
bpo-42955: Add sys.modules_names (GH-24238)

Add sys.module_names, containing the list of the standard library
module names.

4 years agobpo-43013: Fix old tkinter module names in idlelib (GH-24326)
Terry Jan Reedy [Mon, 25 Jan 2021 11:33:18 +0000 (06:33 -0500)] 
bpo-43013: Fix old tkinter module names in idlelib (GH-24326)

Lowercase 'tkColorChooser', 'tkFileDialog', 'tkSimpleDialog', and
'tkMessageBox' and remove 'tk'.  Just lowercase 'tkFont' as 'font'
is already used.  Adjust import.

4 years agobpo-27772: Make preceding width with 0 valid in string format. (GH-11270)
Serhiy Storchaka [Mon, 25 Jan 2021 09:56:33 +0000 (11:56 +0200)] 
bpo-27772: Make preceding width with 0 valid in string format. (GH-11270)

Previously it was an error with confusing error message.

4 years ago bpo-43013: Update idlelib code to 3.x (GH-24315)
Terry Jan Reedy [Sun, 24 Jan 2021 19:08:50 +0000 (14:08 -0500)] 
 bpo-43013: Update idlelib code to 3.x  (GH-24315)

Remove 9 remaining '(object)' occurrences in class headers in idlelib
and 25 '()' occurrences in idlelib.idle_test class headers.

4 years agobpo-43014: Improve performance of tokenize.tokenize by 20-30%
Anthony Sottile [Sun, 24 Jan 2021 09:23:17 +0000 (01:23 -0800)] 
bpo-43014: Improve performance of tokenize.tokenize by 20-30%

4 years agoRemove full stop from a bytes-related SyntaxError message (GH-24300)
numbermaniac [Sat, 23 Jan 2021 22:56:57 +0000 (09:56 +1100)] 
Remove full stop from a bytes-related SyntaxError message (GH-24300)

4 years agocloses bpo-43011: Fix DeprecationWarnings in test_ctypes (GH-24305)
Zackery Spytz [Sat, 23 Jan 2021 16:34:01 +0000 (09:34 -0700)] 
closes bpo-43011: Fix DeprecationWarnings in test_ctypes (GH-24305)

4 years agobpo-42996: Update a reference to PKCS #5 in hashlib docs to version 2.1 (GH-24289) 12244/head
Illia Volochii [Fri, 22 Jan 2021 12:06:00 +0000 (14:06 +0200)] 
bpo-42996: Update a reference to PKCS #5 in hashlib docs to version 2.1 (GH-24289)

RFC 8018 superseded RFC 8018.

Automerge-Triggered-By: GH:tiran
4 years agobpo-41798: Allocate the _curses._C_API on the heap memory (GH-24186)
Hai Shi [Fri, 22 Jan 2021 10:06:43 +0000 (18:06 +0800)] 
bpo-41798: Allocate the _curses._C_API on the heap memory (GH-24186)

4 years agobpo-40304: Correct type(name, bases, dict) doc (GH-19553)
Борис Верховский [Fri, 22 Jan 2021 05:47:23 +0000 (00:47 -0500)] 
bpo-40304: Correct type(name, bases, dict) doc (GH-19553)

Co-authored-by: Éric Araujo <merwok@netwok.org>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Tal Einat <532281+taleinat@users.noreply.github.com>
4 years agobpo-42384: pdb: correctly populate sys.path[0] (GH-23338)
Andrey Bienkowski [Fri, 22 Jan 2021 01:19:51 +0000 (01:19 +0000)] 
bpo-42384: pdb: correctly populate sys.path[0] (GH-23338)

Automerge-Triggered-By: GH:gvanrossum
4 years agobpo-31904: setup.py: fix cross-compilation on VxWorks (GH-24191)
pxinwr [Fri, 22 Jan 2021 00:55:52 +0000 (08:55 +0800)] 
bpo-31904: setup.py: fix cross-compilation on VxWorks (GH-24191)

Add library search path by wr-cc in add_cross_compiling_paths().

4 years agobpo-33289: Return RGB triplet of ints instead of floats from tkinter.colorchooser...
Cheryl Sabella [Thu, 21 Jan 2021 19:14:04 +0000 (14:14 -0500)] 
bpo-33289: Return RGB triplet of ints instead of floats from tkinter.colorchooser (GH-6578)

4 years agoAdd a What's New entry for the new parser error improvements (GH-24280)
Pablo Galindo [Thu, 21 Jan 2021 17:36:35 +0000 (17:36 +0000)] 
Add a What's New entry for the new parser error improvements (GH-24280)

4 years agoFix typo in what's new. bidst_wheel -> bdist_wheel (GH-24234)
ravcio [Thu, 21 Jan 2021 10:23:46 +0000 (11:23 +0100)] 
Fix typo in what's new. bidst_wheel -> bdist_wheel (GH-24234)

bidst_wheel -> bdist_wheel

Automerge-Triggered-By: GH:Mariatta
4 years agobpo-42392: Mention loop removal in whatsnew for 3.10 (GH-24256)
Ken Jin [Thu, 21 Jan 2021 00:16:12 +0000 (16:16 -0800)] 
bpo-42392: Mention loop removal in whatsnew for 3.10 (GH-24256)

@vstinner [noticed on python-dev](https://mail.python.org/archives/list/python-dev@python.org/thread/O3T7SK3BGMFWMLCQXDODZJSBL42AUWTR/) that there is no what's new or porting entry for removal of asyncio ``loop`` parameter.

This patch adds a basic guide.

Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
4 years agobpo-40176: Improve error messages for unclosed string literals (GH-19346)
Batuhan Taskaya [Wed, 20 Jan 2021 21:38:47 +0000 (00:38 +0300)] 
bpo-40176: Improve error messages for unclosed string literals (GH-19346)

Automerge-Triggered-By: GH:isidentical
4 years agobpo-42864: Simplify the tokenizer exceptions after generic SyntaxError (GH-24273)
Pablo Galindo [Wed, 20 Jan 2021 19:11:56 +0000 (19:11 +0000)] 
bpo-42864: Simplify the tokenizer exceptions after generic SyntaxError (GH-24273)

Automerge-Triggered-By: GH:pablogsal
4 years agobpo-42856: Add --with-wheel-pkg-dir=PATH configure option (GH-24210)
Victor Stinner [Wed, 20 Jan 2021 16:07:21 +0000 (17:07 +0100)] 
bpo-42856: Add --with-wheel-pkg-dir=PATH configure option (GH-24210)

Add --with-wheel-pkg-dir=PATH option to the ./configure script. If
specified, the ensurepip module looks for setuptools and pip wheel
packages in this directory: if both are present, these wheel packages
are used instead of ensurepip bundled wheel packages.

Some Linux distribution packaging policies recommend against bundling
dependencies. For example, Fedora installs wheel packages in the
/usr/share/python-wheels/ directory and don't install the
ensurepip._bundled package.

ensurepip: Remove unused runpy import.

4 years agobpo-42323: Fix math.nextafter() for NaN on AIX (GH-24265)
Victor Stinner [Wed, 20 Jan 2021 14:20:13 +0000 (15:20 +0100)] 
bpo-42323: Fix math.nextafter() for NaN on AIX (GH-24265)

4 years agobpo-42780: Fix set_inheritable() for O_PATH file descriptors on Linux (GH-24172)
cptpcrd [Wed, 20 Jan 2021 14:05:51 +0000 (09:05 -0500)] 
bpo-42780: Fix set_inheritable() for O_PATH file descriptors on Linux (GH-24172)

4 years agoFix typos in unittest documentation (GH-24194)
Conchylicultor [Wed, 20 Jan 2021 13:08:37 +0000 (14:08 +0100)] 
Fix typos in unittest documentation (GH-24194)

* addCleanupClass  -> addClassCleanup
* doCleanupsClass -> doClassCleanups