]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
3 years agobpo-46048: Fix parsing of single character lines in getpath readlines() (GH-30048)
Steve Dower [Sat, 11 Dec 2021 13:43:40 +0000 (13:43 +0000)] 
bpo-46048: Fix parsing of single character lines in getpath readlines() (GH-30048)

3 years agobpo-19737: Improved the documentation for globals (GH-29823)
180909 [Sat, 11 Dec 2021 00:04:21 +0000 (08:04 +0800)] 
bpo-19737: Improved the documentation for globals (GH-29823)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
3 years agobuild(deps): bump actions/cache from 2.1.6 to 2.1.7 (GH-29875)
dependabot[bot] [Fri, 10 Dec 2021 23:46:49 +0000 (00:46 +0100)] 
build(deps): bump actions/cache from 2.1.6 to 2.1.7 (GH-29875)

Bumps [actions/cache](https://github.com/actions/cache) from 2.1.6 to 2.1.7.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.6...v2.1.7)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 years agobpo-37971: fix the position of decorator application (GH-30027)
Carl Friedrich Bolz-Tereick [Fri, 10 Dec 2021 23:45:02 +0000 (00:45 +0100)] 
bpo-37971: fix the position of decorator application (GH-30027)

The line numbers of actually calling the decorator functions of
functions and classes was wrong (as opposed to loading them, were they
have been correct previously too).

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
3 years agobpo-42918: Improve build-in function compile() in mode 'single' (GH-29934)
Weipeng Hong [Fri, 10 Dec 2021 23:44:26 +0000 (07:44 +0800)] 
bpo-42918: Improve build-in function compile() in mode 'single' (GH-29934)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
3 years agobpo-43795: Document stable_abi.txt format and contents (GH-29956)
Petr Viktorin [Fri, 10 Dec 2021 23:34:31 +0000 (00:34 +0100)] 
bpo-43795: Document stable_abi.txt format and contents (GH-29956)

Also mention that removals generally aren't allowed.

3 years agobpo-46014: Add ability to use typing.Union with singledispatch (GH-30017)
Yurii Karabas [Fri, 10 Dec 2021 23:27:55 +0000 (01:27 +0200)] 
bpo-46014: Add ability to use typing.Union with singledispatch (GH-30017)

3 years agobpo-27062: add `__all__` to inspect module (GH-30003)
Kumar Aditya [Fri, 10 Dec 2021 23:05:23 +0000 (04:35 +0530)] 
bpo-27062: add `__all__` to inspect module (GH-30003)

3 years agobpo-45635: refactor print_exception_recursive into smaller functions to standardize...
Irit Katriel [Fri, 10 Dec 2021 23:02:10 +0000 (23:02 +0000)] 
bpo-45635: refactor print_exception_recursive into smaller functions to standardize error handling (GH-30015)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
3 years agobpo-42114: ctypes documentation: fix winmode parameter default value (GH-29976)
Louis Sautier [Fri, 10 Dec 2021 23:00:02 +0000 (00:00 +0100)] 
bpo-42114: ctypes documentation: fix winmode parameter default value (GH-29976)

Signed-off-by: Louis Sautier <sautier.louis@gmail.com>
3 years agobpo-45654: No need to freeze types (GH-30028)
Christian Heimes [Fri, 10 Dec 2021 18:09:09 +0000 (20:09 +0200)] 
bpo-45654: No need to freeze types (GH-30028)

3 years agobpo-45582: Fix test_embed failure during a PGO build on Windows (GH-30014)
neonene [Fri, 10 Dec 2021 17:13:55 +0000 (02:13 +0900)] 
bpo-45582: Fix test_embed failure during a PGO build on Windows (GH-30014)

This defines VPATH differently in PGO instrumentation builds, to account for a different default output directory. It also adds sys._vpath on Windows to make the value available to sysconfig so that it can be used in tests.

3 years agobpo-46023: Fix makesetup handling of disabled rule (GH-30001)
Christian Heimes [Fri, 10 Dec 2021 13:11:55 +0000 (15:11 +0200)] 
bpo-46023: Fix makesetup handling of disabled rule (GH-30001)

3 years agobpo-45723: Normalise configure user communication (GH-30024)
Erlend Egeberg Aasland [Fri, 10 Dec 2021 11:27:38 +0000 (12:27 +0100)] 
bpo-45723: Normalise configure user communication (GH-30024)

3 years agobpo-46000: Improve NetBSD curses compatibility (GH-29947)
Thomas Klausner [Fri, 10 Dec 2021 09:41:47 +0000 (10:41 +0100)] 
bpo-46000: Improve NetBSD curses compatibility (GH-29947)

3 years agobpo-42182: stdtypes doc - update and fix links to several dunder methods (GH-27384)
andrei kulakov [Fri, 10 Dec 2021 09:40:06 +0000 (04:40 -0500)] 
bpo-42182: stdtypes doc - update and fix links to several dunder methods  (GH-27384)

3 years agoMove error test to the function that needs it. Improve error message. (GH-30008)
Raymond Hettinger [Fri, 10 Dec 2021 02:24:50 +0000 (20:24 -0600)] 
Move error test to the function that needs it.  Improve error message. (GH-30008)

3 years agobpo-43931: Export Python version as API data (GH-25577)
Gabriele N. Tornetta [Fri, 10 Dec 2021 01:52:05 +0000 (01:52 +0000)] 
bpo-43931: Export Python version as API data (GH-25577)

When Python is embedded in other applications, it is not easy to determine which version of Python is being used. This change exposes the Python version as part of the API data. Tools like Austin (https://github.com/P403n1x87/austin) can benefit from this data when targeting applications like uWSGI, as the Python version can then be inferred systematically by looking at the exported symbols rather than relying on unreliable pattern matching or other hacks (like remote code execution etc...).

Automerge-Triggered-By: GH:pablogsal
3 years agobpo-46016: GHA Doc job now also runs "make check" (GH-30009)
Victor Stinner [Thu, 9 Dec 2021 23:02:20 +0000 (00:02 +0100)] 
bpo-46016: GHA Doc job now also runs "make check" (GH-30009)

The GitHub Action documentation job now also runs "make check" to
check the documentation.

3 years agobpo-46008: Make runtime-global object/type lifecycle functions and state consistent...
Eric Snow [Thu, 9 Dec 2021 19:59:26 +0000 (12:59 -0700)] 
bpo-46008: Make runtime-global object/type lifecycle functions and state consistent. (gh-29998)

This change is strictly renames and moving code around.  It helps in the following ways:

* ensures type-related init functions focus strictly on one of the three aspects (state, objects, types)
* passes in PyInterpreterState * to all those functions, simplifying work on moving types/objects/state to the interpreter
* consistent naming conventions help make what's going on more clear
* keeping API related to a type in the corresponding header file makes it more obvious where to look for it

https://bugs.python.org/issue46008

3 years agoRemove an outdated comment. (GH-30010)
Serhiy Storchaka [Thu, 9 Dec 2021 18:44:36 +0000 (20:44 +0200)] 
Remove an outdated comment. (GH-30010)

3 years agobpo-46018: Ensure that math.expm1 does not raise on underflow (GH-29997)
Steve Dower [Thu, 9 Dec 2021 18:31:54 +0000 (18:31 +0000)] 
bpo-46018: Ensure that math.expm1 does not raise on underflow (GH-29997)

3 years agobpo-45654: Freeze the runpy module and stuff it imports (GH-29903)
Kumar Aditya [Thu, 9 Dec 2021 16:51:09 +0000 (22:21 +0530)] 
bpo-45654: Freeze the runpy module and stuff it imports (GH-29903)

3 years agobpo-45635: continue refactor of print_exception() to standardize error handling ...
Irit Katriel [Thu, 9 Dec 2021 14:38:00 +0000 (14:38 +0000)] 
bpo-45635: continue refactor of print_exception() to standardize error handling (GH-29996)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
3 years agobpo-46016: Fix rest syntax of GH-29993 (GH-30006)
Kumar Aditya [Thu, 9 Dec 2021 14:24:32 +0000 (19:54 +0530)] 
bpo-46016: Fix rest syntax of GH-29993 (GH-30006)

3 years agobpo-46025: Fix a crash in the atexit module for auto-unregistering functions (GH...
Pablo Galindo Salgado [Thu, 9 Dec 2021 13:53:44 +0000 (13:53 +0000)] 
bpo-46025: Fix a crash in the atexit module for auto-unregistering functions (GH-30002)

3 years agobpo-25066: Added repr for multiprocessing.Event (GH-29749)
Kumar Aditya [Thu, 9 Dec 2021 13:16:45 +0000 (18:46 +0530)] 
bpo-25066: Added repr for multiprocessing.Event (GH-29749)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
3 years agobpo-45391: mark UnionType as a class in documentation (GH-28757)
Bernát Gábor [Thu, 9 Dec 2021 12:56:14 +0000 (12:56 +0000)] 
bpo-45391: mark UnionType as a class in documentation (GH-28757)

Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
3 years agobpo-46007: Exclude PyUnicode_CHECK_INTERNED() from limited C API (GH-29987)
Victor Stinner [Thu, 9 Dec 2021 08:58:09 +0000 (09:58 +0100)] 
bpo-46007: Exclude PyUnicode_CHECK_INTERNED() from limited C API (GH-29987)

Exclude the PyUnicode_CHECK_INTERNED() macro from the limited C API,
because it uses the PyASCIIObject structure which is excluded from
the limited C API.

Automerge-Triggered-By: GH:encukou
3 years agobpo-45510: Check both types when specializing subtraction (GH-29995)
Brandt Bucher [Thu, 9 Dec 2021 01:17:16 +0000 (17:17 -0800)] 
bpo-45510: Check both types when specializing subtraction (GH-29995)

3 years agoMerge remote-tracking branch 'upstream/main'
Pablo Galindo [Wed, 8 Dec 2021 23:41:16 +0000 (23:41 +0000)] 
Merge remote-tracking branch 'upstream/main'

3 years agoPost 3.11.0a3
Pablo Galindo [Wed, 8 Dec 2021 23:40:52 +0000 (23:40 +0000)] 
Post 3.11.0a3

3 years agobpo-46016: fcntl module add FreeBSD's F_DUP2FD_CLOEXEC flag support (GH-29993)
David CARLIER [Wed, 8 Dec 2021 22:28:51 +0000 (22:28 +0000)] 
bpo-46016: fcntl module add FreeBSD's F_DUP2FD_CLOEXEC flag support (GH-29993)

3 years agoPython 3.11.0a3 v3.11.0a3
Pablo Galindo [Wed, 8 Dec 2021 22:23:08 +0000 (22:23 +0000)] 
Python 3.11.0a3

3 years agoFix some false positives of documentation syntax problems
Pablo Galindo [Tue, 7 Dec 2021 22:47:24 +0000 (22:47 +0000)] 
Fix some false positives of documentation syntax problems

3 years agobpo-45711: Remove unnecessary normalization of exc_info (GH-29922)
Irit Katriel [Wed, 8 Dec 2021 20:08:06 +0000 (20:08 +0000)] 
bpo-45711: Remove unnecessary normalization of exc_info (GH-29922)

3 years agobpo-46015: Fixes calculation of sys.path in a venv on Windows (GH-29992)
Steve Dower [Wed, 8 Dec 2021 19:25:58 +0000 (19:25 +0000)] 
bpo-46015: Fixes calculation of sys.path in a venv on Windows (GH-29992)

Also ensures that pybuilddir.txt is written early enough in the build to be picked up by later steps.

3 years agobpo-45359: Support TopologicalSorter type subscript (GH-28714)
Jacob Hayes [Wed, 8 Dec 2021 18:52:57 +0000 (13:52 -0500)] 
bpo-45359: Support TopologicalSorter type subscript (GH-28714)

* Support TopologicalSorter type subscript

* 📜🤖 Added by blurb_it.

* Add TopologicalSorter to GenericAlias tests

* Update Misc/NEWS.d/next/Library/2021-10-03-22-27-35.bpo-45359.LX_uxe.rst

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
3 years agobpo-45635: refactor print_exception() into smaller functions (GH-29981)
Irit Katriel [Wed, 8 Dec 2021 18:47:27 +0000 (18:47 +0000)] 
bpo-45635: refactor print_exception() into smaller functions (GH-29981)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
3 years agobpo-45813: Drop redundant assertion from frame.clear() (GH-29990)
Andrew Svetlov [Wed, 8 Dec 2021 16:05:00 +0000 (18:05 +0200)] 
bpo-45813: Drop redundant assertion from frame.clear() (GH-29990)

* bpo-45813: Drop redundant assertion from frame.clear()

* Move assertion to frame_dealloc()

3 years agobpo-46009: Do not exhaust generator when send() method raises (GH-29986)
Mark Shannon [Wed, 8 Dec 2021 12:09:26 +0000 (12:09 +0000)] 
bpo-46009: Do not exhaust generator when send() method raises (GH-29986)

3 years agodoc: Add link issue 44010 (GH-29454)
Rafael Fontenelle [Wed, 8 Dec 2021 10:55:39 +0000 (07:55 -0300)] 
doc: Add link issue 44010 (GH-29454)

3 years agobpo-45847: Don't override user overrides for CFLAGS/LIBS (GH-29967)
Christian Heimes [Wed, 8 Dec 2021 10:52:08 +0000 (12:52 +0200)] 
bpo-45847: Don't override user overrides for CFLAGS/LIBS (GH-29967)

3 years agoFix double-space in exception message (GH-29955)
Ned Batchelder [Wed, 8 Dec 2021 10:42:02 +0000 (02:42 -0800)] 
Fix double-space in exception message (GH-29955)

3 years agobpo-40222: update doc entry with respect to the change in WITH_EXCEPT_START (GH-29975)
Irit Katriel [Wed, 8 Dec 2021 09:41:28 +0000 (09:41 +0000)] 
bpo-40222: update doc entry with respect to the change in WITH_EXCEPT_START (GH-29975)

3 years agobpo-20751: Match variable name to the example. (GH-29980)
Raymond Hettinger [Wed, 8 Dec 2021 03:38:21 +0000 (21:38 -0600)] 
bpo-20751: Match variable name to the example. (GH-29980)

3 years agobpo-45582: Write empty pybuilddir.txt on Windows to allow relocatable build directori...
Steve Dower [Wed, 8 Dec 2021 02:18:21 +0000 (02:18 +0000)] 
bpo-45582: Write empty pybuilddir.txt on Windows to allow relocatable build directories (GH-29979)

3 years agobpo-46008: Move Py*State init into distinct functions. (gh-29977)
Eric Snow [Wed, 8 Dec 2021 01:59:49 +0000 (18:59 -0700)] 
bpo-46008: Move Py*State init into distinct functions. (gh-29977)

Previously, basic initialization of PyInterprterState happened in PyInterpreterState_New() (along with allocation and adding the new interpreter to the runtime state). This prevented us from initializing interpreter states that were allocated separately (e.g. statically or in a free list). We've addressed that here by factoring out a separate function just for initialization. We've done the same for PyThreadState. _PyRuntimeState was sorted out when we added it since _PyRuntime is statically allocated. However, here we update the existing init code to line up with the functions for PyInterpreterState and PyThreadState.

https://bugs.python.org/issue46008

3 years agobpo-46008: Add _PyInterpreterState_Main(). (gh-29978)
Eric Snow [Wed, 8 Dec 2021 01:56:06 +0000 (18:56 -0700)] 
bpo-46008: Add _PyInterpreterState_Main(). (gh-29978)

PyInterpreterState_Main() is a plain function exposed in the public C-API. For internal usage we can take the more efficient approach in this PR.

https://bugs.python.org/issue46008

3 years agobpo-46008: Stop calling _PyThreadState_Init() in new_threadstate(). (gh-29973)
Eric Snow [Wed, 8 Dec 2021 00:26:29 +0000 (17:26 -0700)] 
bpo-46008: Stop calling _PyThreadState_Init() in new_threadstate(). (gh-29973)

This simplifies new_threadstate().  We also rename _PyThreadState_Init() to _PyThreadState_SetCurrent() to reflect what it actually does.

https://bugs.python.org/issue46008

3 years agobpo-46008: Use PyMem_RawCalloc() to allocate PyThreadState. (GH-29972)
Eric Snow [Tue, 7 Dec 2021 21:37:51 +0000 (14:37 -0700)] 
bpo-46008: Use PyMem_RawCalloc() to allocate PyThreadState. (GH-29972)

Doing so allows us to stop assigning various fields to `NULL` and 0.  It also more closely matches the behavior of a static initializer.

Automerge-Triggered-By: GH:ericsnowcurrently
3 years agobpo-46008: Move thread-related interpreter state into a sub-struct. (gh-29971)
Eric Snow [Tue, 7 Dec 2021 21:03:47 +0000 (14:03 -0700)] 
bpo-46008: Move thread-related interpreter state into a sub-struct. (gh-29971)

This parallels _PyRuntimeState.interpreters.  Doing this helps make it more clear what part of PyInterpreterState relates to its threads.

https://bugs.python.org/issue46008

3 years agobpo-46008: Return void from _PyEval_InitState(). (gh-29970)
Eric Snow [Tue, 7 Dec 2021 21:02:17 +0000 (14:02 -0700)] 
bpo-46008: Return void from _PyEval_InitState(). (gh-29970)

This falls into the category of keep-allocation-and-initialization separate. It also allows us to use _PyEval_InitState() safely in functions that return void.

https://bugs.python.org/issue46008

3 years agobpo-45847: Revert Port _ctypes partly to PY_STDLIB_MOD (GH-29747) (GH-29969)
Christian Heimes [Tue, 7 Dec 2021 19:56:41 +0000 (21:56 +0200)] 
bpo-45847: Revert Port _ctypes partly to PY_STDLIB_MOD (GH-29747) (GH-29969)

3 years agobpo-45582: Fix framework path and bootstrap build (GH-29954)
Christian Heimes [Tue, 7 Dec 2021 18:09:53 +0000 (20:09 +0200)] 
bpo-45582: Fix framework path and bootstrap build (GH-29954)

* Check NS API return values for NULL to prevent segfault in
  ``_bootstrap_python``.
* Set modPathInitialized to 1 so the ``decode_to_dict`` path is used.

Signed-off-by: Christian Heimes <christian@python.org>
3 years agoFix leak when an exception is raised during generator creation. (GH-29960)
Mark Shannon [Tue, 7 Dec 2021 18:05:48 +0000 (18:05 +0000)] 
Fix leak when an exception is raised during generator creation. (GH-29960)

3 years agobpo-45635: standardize error handling in traceback.c (GH-29905)
Irit Katriel [Tue, 7 Dec 2021 16:17:22 +0000 (16:17 +0000)] 
bpo-45635: standardize error handling in traceback.c (GH-29905)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
3 years agobpo-45947: Place dict and values pointer at fixed (negative) offset just before GC...
Mark Shannon [Tue, 7 Dec 2021 16:02:53 +0000 (16:02 +0000)] 
bpo-45947: Place dict and values pointer at fixed (negative) offset just before GC header. (GH-29879)

* Place __dict__ immediately before GC header for plain Python objects.

* Fix up lazy dict creation logic to use managed dict pointers.

* Manage values pointer, placing them directly before managed dict pointers.

* Convert hint-based load/store attr specialization target managed dict classes.

* Specialize LOAD_METHOD for managed dict objects.

* Remove unsafe _PyObject_GC_Calloc function.

* Remove unsafe _PyObject_GC_Malloc() function.

* Add comment explaning use of Py_TPFLAGS_MANAGED_DICT.

3 years agobpo-35821: Fix restructuredtext code formatting in logging.rst (GH-29963)
Ken Jin [Tue, 7 Dec 2021 15:25:13 +0000 (23:25 +0800)] 
bpo-35821: Fix restructuredtext code formatting in logging.rst (GH-29963)

3 years agobpo-46004: Fix error location for loops with invalid targets (GH-29959)
Pablo Galindo Salgado [Tue, 7 Dec 2021 13:02:15 +0000 (13:02 +0000)] 
bpo-46004: Fix error location for loops with invalid targets (GH-29959)

3 years agoRevert "bpo-28533: Remove asyncore, asynchat, smtpd modules (GH-29521)" (GH-29951)
Victor Stinner [Tue, 7 Dec 2021 11:31:04 +0000 (12:31 +0100)] 
Revert "bpo-28533: Remove asyncore, asynchat, smtpd modules (GH-29521)" (GH-29951)

This reverts commit 9bf2cbc4c498812e14f20d86acb61c53928a5a57.

3 years agobpo-35821: Add an example to Logger.propagate documentation. (GH-29841)
Vinay Sajip [Tue, 7 Dec 2021 11:15:44 +0000 (11:15 +0000)] 
bpo-35821: Add an example to Logger.propagate documentation. (GH-29841)

3 years agobpo-45890: Add tests for tracing try-except-finally blocks (GH-29746)
Irit Katriel [Tue, 7 Dec 2021 10:50:37 +0000 (10:50 +0000)] 
bpo-45890: Add tests for tracing try-except-finally blocks (GH-29746)

3 years agobpo-46001: Change OverflowError to RecursionError in JSON library docstrings (GH...
James Gerity [Tue, 7 Dec 2021 09:58:40 +0000 (04:58 -0500)] 
bpo-46001: Change OverflowError to RecursionError in JSON library docstrings (GH-29943)

3 years agobpo-45798: Let libmpdec decide which archs to build on macOS as done previously....
Ned Deily [Tue, 7 Dec 2021 02:35:50 +0000 (21:35 -0500)] 
bpo-45798: Let libmpdec decide which archs to build on macOS as done previously. (GH-29949)

3 years agobpo-28953: Use `raise from` when raising new IncompleteRead (GH-29861)
180909 [Tue, 7 Dec 2021 00:10:49 +0000 (08:10 +0800)] 
bpo-28953: Use `raise from` when raising new IncompleteRead (GH-29861)

Automerge-Triggered-By: GH:asvetlov
3 years agobpo-45582: Ensure PYTHONHOME still overrides detected build prefixes (GH-29948)
Steve Dower [Tue, 7 Dec 2021 00:07:35 +0000 (00:07 +0000)] 
bpo-45582: Ensure PYTHONHOME still overrides detected build prefixes (GH-29948)

3 years agobpo-23819: asyncio: Replace AssertionError with TypeError where it makes sense (GH...
Kumar Aditya [Mon, 6 Dec 2021 23:40:35 +0000 (05:10 +0530)] 
bpo-23819: asyncio: Replace AssertionError with TypeError where it makes sense (GH-29894)

3 years agoremoval of duplicated text paragraph (#29666)
Taras Sereda [Mon, 6 Dec 2021 23:12:29 +0000 (01:12 +0200)] 
removal of duplicated text paragraph (#29666)

3 years agobpo-45847: Fix uuid detection on macOS (GH-29946)
Christian Heimes [Mon, 6 Dec 2021 20:43:44 +0000 (22:43 +0200)] 
bpo-45847: Fix uuid detection on macOS (GH-29946)

3 years agobpo-45582: framework build: modPath must not be const (GH-29944)
Christian Heimes [Mon, 6 Dec 2021 18:13:12 +0000 (20:13 +0200)] 
bpo-45582: framework build: modPath must not be const (GH-29944)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
3 years agobpo-45582: Fix getpath_isxfile() and test_embed on Windows (GH-29930)
neonene [Mon, 6 Dec 2021 17:25:19 +0000 (02:25 +0900)] 
bpo-45582: Fix getpath_isxfile() and test_embed on Windows (GH-29930)

3 years agobpo-45950: Fix macOS framework builds of _bootstrap_python (GH-29936)
Christian Heimes [Mon, 6 Dec 2021 16:13:53 +0000 (18:13 +0200)] 
bpo-45950: Fix macOS framework builds of _bootstrap_python (GH-29936)

3 years agobpo-44035: Check autoconf files thoroughly (GH-29935)
Christian Heimes [Mon, 6 Dec 2021 12:18:56 +0000 (14:18 +0200)] 
bpo-44035: Check autoconf files thoroughly (GH-29935)

Check that users don't push changes with outdated or patched autoconf.
The presence of runstatedir option and aclocal 1.16.3 are good markers.

Use my container image to regenerate autoconf files. "Check for changes"
will fail later when any file is regenerated.

Use ccache in check_generated_files to speed up testing.

3 years agobpo-45963: Make space for the InterpreterFrame of a generator in that generator....
Mark Shannon [Mon, 6 Dec 2021 10:13:49 +0000 (10:13 +0000)] 
bpo-45963: Make space for the InterpreterFrame of a generator in that generator. (GH-29891)

* Make generator, coroutine and async gen structs all the same size.

* Store interpreter frame in generator (and coroutine). Reduces the number of allocations neeeded for a generator from two to one.

3 years agobpo-45732: Update python.org macOS installer to use Tcl/Tk 8.6.12. (GH-29931)
Ned Deily [Mon, 6 Dec 2021 07:44:09 +0000 (02:44 -0500)] 
bpo-45732: Update python.org macOS installer to use Tcl/Tk 8.6.12. (GH-29931)

3 years agobpo-45840: Improve cross-references in the data model documentation (GH-29633)
Alex Waygood [Sun, 5 Dec 2021 20:49:36 +0000 (20:49 +0000)] 
bpo-45840: Improve cross-references in the data model documentation (GH-29633)

3 years agobpo-45664: Fix resolve_bases() and new_class() for GenericAlias instance as a base...
Serhiy Storchaka [Sun, 5 Dec 2021 20:44:01 +0000 (22:44 +0200)] 
bpo-45664: Fix resolve_bases() and new_class() for GenericAlias instance as a base (GH-29298)

3 years agobpo-45663: Fix is_dataclass() for dataclasses which are subclasses of types.GenericAl...
Serhiy Storchaka [Sun, 5 Dec 2021 20:42:50 +0000 (22:42 +0200)] 
bpo-45663: Fix is_dataclass() for dataclasses which are subclasses of types.GenericAlias (GH-29294)

3 years agobpo-45662: Fix the repr of InitVar with a type alias to the built-in class (GH-29291)
Serhiy Storchaka [Sun, 5 Dec 2021 20:41:58 +0000 (22:41 +0200)] 
bpo-45662: Fix the repr of InitVar with a type alias to the built-in class (GH-29291)

For example, InitVar[list[int]].

3 years agobpo-37295: Optimize math.comb() and math.perm() (GH-29090)
Serhiy Storchaka [Sun, 5 Dec 2021 20:26:10 +0000 (22:26 +0200)] 
bpo-37295: Optimize math.comb() and math.perm() (GH-29090)

For very large numbers use divide-and-conquer algorithm for getting
benefit of Karatsuba multiplication of large numbers.

Do calculations completely in C unsigned long long instead of Python
integers if possible.

3 years agobpo-45582: Fix signature of _Py_Get_Getpath_CodeObject (GH-29921)
Christian Heimes [Sun, 5 Dec 2021 17:41:46 +0000 (19:41 +0200)] 
bpo-45582: Fix signature of _Py_Get_Getpath_CodeObject (GH-29921)

3 years agoDelete orphaned comment (#29917)
Guido van Rossum [Sun, 5 Dec 2021 17:03:58 +0000 (09:03 -0800)] 
Delete orphaned comment (#29917)

(The function this described was deleted by PR #23743, the comment was accidentally retained.)

3 years agobpo-27946: Fix possible crash in ElementTree.Element (GH-29915)
Serhiy Storchaka [Sun, 5 Dec 2021 12:22:54 +0000 (14:22 +0200)] 
bpo-27946: Fix possible crash in ElementTree.Element (GH-29915)

Getting an attribute via attrib.get() simultaneously with replacing
the attrib dict can lead to access to deallocated dict.

3 years agobpo-13236: Flush the output stream more often in unittest (GH-29864)
Serhiy Storchaka [Sat, 4 Dec 2021 18:57:20 +0000 (20:57 +0200)] 
bpo-13236: Flush the output stream more often in unittest (GH-29864)

It can prevent some losses when output to buffered stream.

3 years agoFixed documentation typo in compileall.py (GH-29912)
Vishal Pandey [Sat, 4 Dec 2021 15:38:17 +0000 (21:08 +0530)] 
Fixed documentation typo in compileall.py (GH-29912)

3 years agobpo-45847: Update whatsnew and add place holder entries for missing extensions (GH...
Christian Heimes [Sat, 4 Dec 2021 14:14:48 +0000 (16:14 +0200)] 
bpo-45847: Update whatsnew and add place holder entries for missing extensions (GH-29914)

3 years agobpo-45847: Port _ctypes partly to PY_STDLIB_MOD (GH-29747)
Christian Heimes [Sat, 4 Dec 2021 10:21:43 +0000 (12:21 +0200)] 
bpo-45847: Port _ctypes partly to PY_STDLIB_MOD (GH-29747)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
3 years agobpo-45695: Test out-of-tree builds on GHA (GH-29904)
Christian Heimes [Sat, 4 Dec 2021 10:07:59 +0000 (12:07 +0200)] 
bpo-45695: Test out-of-tree builds on GHA (GH-29904)

3 years agobpo-20751: Replace method example with attribute example, matching the descriptor...
Raymond Hettinger [Sat, 4 Dec 2021 02:37:08 +0000 (20:37 -0600)] 
bpo-20751:  Replace method example with attribute example, matching the descriptor howto (GH-29909)

3 years agobpo-45582 Fix prototype of _Py_Get_Getpath_CodeObject. (GH-29907)
Benjamin Peterson [Fri, 3 Dec 2021 23:21:58 +0000 (15:21 -0800)] 
bpo-45582 Fix prototype of _Py_Get_Getpath_CodeObject. (GH-29907)

Automerge-Triggered-By: GH:tiran
3 years agobpo-45582: Add a NOT operator to the condition in getpath_isxfile (GH-29906)
neonene [Fri, 3 Dec 2021 22:04:11 +0000 (07:04 +0900)] 
bpo-45582: Add a NOT operator to the condition in getpath_isxfile (GH-29906)

3 years agobpo-45607: Make it possible to enrich exception displays via setting their __note__...
Irit Katriel [Fri, 3 Dec 2021 22:01:15 +0000 (22:01 +0000)] 
bpo-45607: Make it possible to enrich exception displays via setting their __note__ field (GH-29880)

3 years agobpo-45816: Support building with VS 2022 (v143 toolset) on Windows (GH-29577)
Crowthebird [Fri, 3 Dec 2021 19:47:38 +0000 (03:47 +0800)] 
bpo-45816: Support building with VS 2022 (v143 toolset) on Windows (GH-29577)

3 years agobpo-45711: [asyncio] Normalize exceptions immediately after Fetch, before they are...
Irit Katriel [Fri, 3 Dec 2021 19:05:14 +0000 (19:05 +0000)] 
bpo-45711: [asyncio] Normalize exceptions immediately after Fetch, before they are stored as StackItem, which should be normalized (GH-29890)

3 years agobpo-45950: Introduce Bootstrap Python again (#29859)
Christian Heimes [Fri, 3 Dec 2021 15:01:11 +0000 (17:01 +0200)] 
bpo-45950: Introduce Bootstrap Python again (#29859)

The build system now uses a :program:`_bootstrap_python` interpreter for
freezing and deepfreezing again. To speed up build process the build tools
:program:`_bootstrap_python` and :program:`_freeze_module` are no longer
build with LTO.

Cross building depends on a build Python interpreter, which must have same
version and bytecode as target host Python.

3 years agobpo-45582: Fix out-of-tree build issues with new getpath (GH-29902)
Christian Heimes [Fri, 3 Dec 2021 13:47:06 +0000 (15:47 +0200)] 
bpo-45582: Fix out-of-tree build issues with new getpath (GH-29902)

3 years agobpo-45885: Specialize COMPARE_OP (GH-29734)
Dennis Sweeney [Fri, 3 Dec 2021 11:29:12 +0000 (04:29 -0700)] 
bpo-45885: Specialize COMPARE_OP (GH-29734)

* Add COMPARE_OP_ADAPTIVE adaptive instruction.

* Add COMPARE_OP_FLOAT_JUMP, COMPARE_OP_INT_JUMP and COMPARE_OP_STR_JUMP specialized instructions.

* Introduce and use _PyUnicode_Equal

3 years agobpo-45582: Port getpath[p].c to Python (GH-29041)
Steve Dower [Fri, 3 Dec 2021 00:08:42 +0000 (00:08 +0000)] 
bpo-45582: Port getpath[p].c to Python (GH-29041)

The getpath.py file is frozen at build time and executed as code over a namespace. It is never imported, nor is it meant to be importable or reusable. However, it should be easier to read, modify, and patch than the previous code.

This commit attempts to preserve every previously tested quirk, but these may be changed in the future to better align platforms.

3 years agobpo-45916: Use HTTPS link for The Perils of Floating Point (GH-29896)
Zachary Ware [Thu, 2 Dec 2021 20:24:25 +0000 (14:24 -0600)] 
bpo-45916: Use HTTPS link for The Perils of Floating Point (GH-29896)