]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 years ago[3.12] gh-105017: Include CRLF lines in strings and column numbers (GH-105030) (...
Miss Islington (bot) [Sun, 28 May 2023 14:16:43 +0000 (07:16 -0700)] 
[3.12] gh-105017: Include CRLF lines in strings and column numbers (GH-105030) (#105041)

gh-105017: Include CRLF lines in strings and column numbers (GH-105030)
(cherry picked from commit 96fff35325e519cc76ffacf22e57e4c393d4446f)

Co-authored-by: Marta Gómez Macías <mgmacias@google.com>
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
2 years ago[3.12] gh-105013: Fix inspect.getsource with parenthesized multiline lambdas (GH...
Miss Islington (bot) [Sun, 28 May 2023 11:18:43 +0000 (04:18 -0700)] 
[3.12] gh-105013: Fix inspect.getsource with parenthesized multiline lambdas (GH-105021) (#105032)

gh-105013: Fix inspect.getsource with parenthesized multiline lambdas (GH-105021)
(cherry picked from commit 3a5be878be6f89ee98d0ef9a1274e6a9d9ccbc37)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2 years ago[3.12] gh-104992: [What's New in 3.12] Document unittest.TestProgram.usageExit's...
Miss Islington (bot) [Sun, 28 May 2023 08:12:30 +0000 (01:12 -0700)] 
[3.12] gh-104992: [What's New in 3.12] Document unittest.TestProgram.usageExit's deprecation (GH-104995) (#105036)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years ago[3.12] gh-104497: Make tkinter test pass with tk 8.7 (GH-104789) (#105028)
Miss Islington (bot) [Sat, 27 May 2023 21:51:05 +0000 (14:51 -0700)] 
[3.12] gh-104497: Make tkinter test pass with tk 8.7 (GH-104789) (#105028)

For test_widgets.MenuTest.test_configure_type, the options
in the error message change to alphabetical order.
---------

(cherry picked from commit 897e716d03d559a10dd5015ecb501ceb98955f3a)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.12] gh-105017: Fix including additional NL token when using CRLF (GH-105022) ...
Miss Islington (bot) [Sat, 27 May 2023 17:24:30 +0000 (10:24 -0700)] 
[3.12] gh-105017: Fix including additional NL token when using CRLF (GH-105022) (#105023)

Co-authored-by: Marta Gómez Macías <mgmacias@google.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2 years ago[3.12] CI: Precompute hash for config cache key in check_source job (GH-105008) ...
Miss Islington (bot) [Sat, 27 May 2023 10:10:03 +0000 (03:10 -0700)] 
[3.12] CI: Precompute hash for config cache key in check_source job (GH-105008) (#105014)

Co-authored-by: Itamar Ostricher <itamarost@gmail.com>
2 years ago[3.12] gh-104992: [What's New in 3.11] Document unittest.TestProgram.usageExit's...
Miss Islington (bot) [Sat, 27 May 2023 02:17:09 +0000 (19:17 -0700)] 
[3.12] gh-104992: [What's New in 3.11] Document unittest.TestProgram.usageExit's deprecation (GH-104994) (#105009)

gh-104992: [What's New in 3.11] Document unittest.TestProgram.usageExit's deprecation (GH-104994)

Document unittest.TestProgram.usageExit's pending removal in 3.13
(cherry picked from commit 7df861c23cd61e7c55943d4036ea5c6b1df5cb49)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years ago[3.12] gh-104839: Prevent test_venv AddressSanitizer spam (GH-105005) (#105006)
Miss Islington (bot) [Sat, 27 May 2023 01:41:21 +0000 (18:41 -0700)] 
[3.12] gh-104839: Prevent test_venv AddressSanitizer spam (GH-105005) (#105006)

gh-104839: Prevent test_venv AddressSanitizer spam (GH-105005)

Pass any ASAN_OPTIONS environment variable through to the child process
so that leak sanitizer being disabled on our CI and buildbots stays
true in the children.
(cherry picked from commit a17f160376955d369c8d332e1b1a90a6e18c852a)

Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>
2 years ago[3.12] gh-104976: Ensure trailing dedent tokens are emitted as the previous tokenizer...
Miss Islington (bot) [Fri, 26 May 2023 22:14:45 +0000 (15:14 -0700)] 
[3.12] gh-104976: Ensure trailing dedent tokens are emitted as the previous tokenizer (GH-104980) (#105000)

2 years ago[3.12] GH-101588: Deprecate pickle/copy/deepcopy support in itertools (GH-104965...
Miss Islington (bot) [Fri, 26 May 2023 21:02:42 +0000 (14:02 -0700)] 
[3.12] GH-101588: Deprecate pickle/copy/deepcopy support in itertools (GH-104965) (GH-104997)

2 years ago[3.12] GH-103631: Fix `PurePosixPath(PureWindowsPath(...))` separator handling (GH...
Miss Islington (bot) [Fri, 26 May 2023 18:42:36 +0000 (11:42 -0700)] 
[3.12] GH-103631: Fix `PurePosixPath(PureWindowsPath(...))` separator handling (GH-104949) (GH-104991)

For backwards compatibility, accept backslashes as path separators in
`PurePosixPath` if an instance of `PureWindowsPath` is supplied.
This restores behaviour from Python 3.11.

(cherry picked from commit 328422ce6162eb18735a2c0de12f8a696be97d0c)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2 years ago[3.12] GH-104947: Make pathlib.PureWindowsPath comparisons consistent across platform...
Miss Islington (bot) [Fri, 26 May 2023 18:33:09 +0000 (11:33 -0700)] 
[3.12] GH-104947: Make pathlib.PureWindowsPath comparisons consistent across platforms (GH-104948) (GH-104990)

Use `str.lower()` rather than `ntpath.normcase()` to normalize case of
Windows paths. This restores behaviour from Python 3.11.

(cherry picked from commit ad0be361c9922a918c7c3eaf83e1d8f2b019279c)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2 years ago[3.12] gh-103921: Document PEP 695 (GH-104642) (#104989)
Miss Islington (bot) [Fri, 26 May 2023 18:19:34 +0000 (11:19 -0700)] 
[3.12] gh-103921: Document PEP 695 (GH-104642) (#104989)

(cherry picked from commit 060277d96bf4ba86df8e4d65831a8cbdfeb51fc5)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years ago[3.12] gh-104984: remove kwargs and starargs from Call & ClassDef (GH-104986) (#104987)
Miss Islington (bot) [Fri, 26 May 2023 17:12:41 +0000 (10:12 -0700)] 
[3.12] gh-104984: remove kwargs and starargs from Call & ClassDef (GH-104986) (#104987)

gh-104984: remove kwargs and starargs from Call & ClassDef (GH-104986)

These fields are removed in https://github.com/python/cpython/commit/025e9ebd0a0a19f50ca83af6ada0ac65be1fa2a1
(cherry picked from commit 61c1d6760facbc172a58512cad46148f587b4da1)

Co-authored-by: Shaygan Hooshyari <sh.hooshyari@gmail.com>
2 years ago[3.12] CI: Cache config.cache across runs to speed up build (GH-104800) (#104967)
Hugo van Kemenade [Fri, 26 May 2023 16:02:51 +0000 (19:02 +0300)] 
[3.12] CI: Cache config.cache across runs to speed up build (GH-104800) (#104967)

2 years ago[3.12] gh-104972: Ensure that line attributes in tokens in the tokenize module are...
Miss Islington (bot) [Fri, 26 May 2023 15:25:46 +0000 (08:25 -0700)] 
[3.12] gh-104972: Ensure that line attributes in tokens in the tokenize module are correct (GH-104975) (#104982)

gh-104972: Ensure that line attributes in tokens in the tokenize module are correct (GH-104975)
(cherry picked from commit 3fdb55c48291a459fb1e33edb5140ec0383222df)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2 years ago[3.12] Remove raw asserts in test_typing.py (GH-104951) (#104978)
Miss Islington (bot) [Fri, 26 May 2023 14:35:35 +0000 (07:35 -0700)] 
[3.12] Remove raw asserts in test_typing.py (GH-104951) (#104978)

Remove raw asserts in test_typing.py (GH-104951)
(cherry picked from commit 2cb445635e99d4401949cabebd373288cfdd0138)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2 years ago[3.12] gh-104955: Fix __release_buffer__ signature (GH-104956) (#104973)
Miss Islington (bot) [Fri, 26 May 2023 13:15:08 +0000 (06:15 -0700)] 
[3.12] gh-104955: Fix __release_buffer__ signature (GH-104956) (#104973)

(cherry picked from commit 6e1eccdcce5ea3bf1ef9d326d20ef9df21262c6b)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2 years ago[3.12] gh-104924: Fix `read()able` in `http.client` log messages (gh-104926) (gh...
Miss Islington (bot) [Fri, 26 May 2023 12:08:58 +0000 (05:08 -0700)] 
[3.12] gh-104924: Fix `read()able` in `http.client` log messages (gh-104926) (gh-104970)

gh-104924: Fix `read()able` in `http.client` log messages (gh-104926)
(cherry picked from commit 6c81d7572edbe3a5800b1128e55a2dcef03cc13c)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2 years ago[3.12] Fix typo in the tokenizer (GH-104950) (#104953)
Miss Islington (bot) [Fri, 26 May 2023 10:33:45 +0000 (03:33 -0700)] 
[3.12] Fix typo in the tokenizer (GH-104950) (#104953)

(cherry picked from commit 705e387dd81b971cb1ee5727da54adfb565f61d0)

Co-authored-by: Stepfen Shawn <m18824909883@163.com>
2 years ago[3.12] gh-104943: Remove mentions of old Python versions (GH-104945) (#104963)
Miss Islington (bot) [Fri, 26 May 2023 07:15:56 +0000 (00:15 -0700)] 
[3.12] gh-104943: Remove mentions of old Python versions (GH-104945) (#104963)

(cherry picked from commit 46857d0b2a2ac6aeb6dcce2bf2c92ddf4abe7496)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2 years ago[3.12] gh-104479: Update outdated tutorial floating-point reference (GH-104681) ...
Miss Islington (bot) [Fri, 26 May 2023 06:30:12 +0000 (23:30 -0700)] 
[3.12] gh-104479: Update outdated tutorial floating-point reference (GH-104681) (#104960)

(cherry picked from commit 2cf04e455d8f087bd08cd1d43751007b5e41b3c5)

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
2 years ago[3.12] gh-102024: Reduced _idle_semaphore.release calls (GH-102025) (#104959)
Miss Islington (bot) [Fri, 26 May 2023 06:21:15 +0000 (23:21 -0700)] 
[3.12] gh-102024: Reduced _idle_semaphore.release calls (GH-102025) (#104959)

gh-102024: Reduced _idle_semaphore.release calls (GH-102025)

Reduced _idle_semaphore.release calls in concurrent.futures.thread._worker
_idle_semaphore.release() is now only called if only work_queue is empty.

---------

(cherry picked from commit 0242e9a57aa87ed0b5cac526f65631c654a39054)

Co-authored-by: Andrii Kuzmin <jack.cvr@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2 years ago[3.12] gh-104372: Drop the GIL around the vfork() call. (GH-104782) (#104942)
Miss Islington (bot) [Thu, 25 May 2023 20:44:29 +0000 (13:44 -0700)] 
[3.12] gh-104372: Drop the GIL around the vfork() call. (GH-104782) (#104942)

gh-104372: Drop the GIL around the vfork() call. (GH-104782)

On Linux where the `subprocess` module can use the `vfork` syscall for
faster spawning, prevent the parent process from blocking other threads
by dropping the GIL while it waits for the vfork'ed child process `exec`
outcome.  This prevents spawning a binary from a slow filesystem from
blocking the rest of the application.

Fixes GH-104372.
(cherry picked from commit d08679212d9af52dd074cd4a6abb440edb944c9c)

Co-authored-by: Gregory P. Smith <gps@python.org>
2 years ago[3.12] gh-104935: typing: Fix interactions between `@runtime_checkable` and `Generic...
Miss Islington (bot) [Thu, 25 May 2023 17:15:48 +0000 (10:15 -0700)] 
[3.12] gh-104935: typing: Fix interactions between `@runtime_checkable` and `Generic` (GH-104939) (#104941)

gh-104935: typing: Fix interactions between `@runtime_checkable` and `Generic` (GH-104939)

---------

(cherry picked from commit 2b7027d0b2ee2e102a24a0da27d01b8221f9351c)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years agoImproves the Windows MSI test run on PR (GH-104929)
Miss Islington (bot) [Thu, 25 May 2023 15:49:46 +0000 (08:49 -0700)] 
Improves the Windows MSI test run on PR (GH-104929)

Correctly set the exit code when builds fail
Also build docs as part of the test
(cherry picked from commit 569b2b8d612354062b8679d2d3f44f7ee03e66c2)

Co-authored-by: Steve Dower <steve.dower@python.org>
2 years ago[3.12] Fix indentation in `json.AttrDict` REPL example (GH-104930) (#104931)
Miss Islington (bot) [Thu, 25 May 2023 13:16:20 +0000 (06:16 -0700)] 
[3.12] Fix indentation in `json.AttrDict` REPL example (GH-104930) (#104931)

Fix indentation in `json.AttrDict` REPL example (GH-104930)

This is causing the docs to be rendered incorrectly.
(cherry picked from commit 38539ef1267f26a8b3508fcc8c6199cf46fc300b)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years ago[3.12] Misc improvements to the itertools docs (GH-104916) (GH-104917)
Miss Islington (bot) [Thu, 25 May 2023 03:39:41 +0000 (20:39 -0700)] 
[3.12] Misc improvements to the itertools docs (GH-104916) (GH-104917)

2 years ago[3.12] Misc updates to Whatsnew 3.12 (GH-104912) (GH-104915)
Miss Islington (bot) [Thu, 25 May 2023 02:14:11 +0000 (19:14 -0700)] 
[3.12] Misc updates to Whatsnew 3.12 (GH-104912) (GH-104915)

2 years ago[3.12] Fix test_importlib.test_side_effect_import() (GH-104840) (#104842)
Miss Islington (bot) [Thu, 25 May 2023 00:36:13 +0000 (17:36 -0700)] 
[3.12] Fix test_importlib.test_side_effect_import() (GH-104840) (#104842)

Fix test_importlib.test_side_effect_import() (GH-104840)

Wait until the thread spawn by the import completes to avoid dangling
threads. With this fix, the following command no longer fails:

./python -m test --fail-env-changed test_importlib -m test_side_effect_import -F -j20
(cherry picked from commit 426950993f6a39cdf3f6a3333ac8b518833c7e61)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.12] gh-104874: Document NewType.__supertype__ (GH-104875) (#104906)
Miss Islington (bot) [Wed, 24 May 2023 23:33:52 +0000 (16:33 -0700)] 
[3.12] gh-104874: Document NewType.__supertype__ (GH-104875) (#104906)

gh-104874: Document NewType.__supertype__ (GH-104875)
(cherry picked from commit 41768a2bd3a8f57e6ce4e4ae9cab083b69817ec1)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2 years ago[3.12] gh-99108: Refresh HACL* (GH-104808) (#104893)
Miss Islington (bot) [Wed, 24 May 2023 20:55:37 +0000 (13:55 -0700)] 
[3.12] gh-99108: Refresh HACL* (GH-104808) (#104893)

gh-99108: Refresh HACL* (GH-104808)

Refresh HACL* from upstream to improve SHA2 performance and fix a 32-bit issue in SHA3.
(cherry picked from commit 160321e5304b962a162eb023472aa2bc8307ae15)

Co-authored-by: Jonathan Protzenko <protz@microsoft.com>
2 years ago[3.12] gh-104879: Fix TypeAliasType.__module__ in exec() (GH-104881) (#104890)
Miss Islington (bot) [Wed, 24 May 2023 19:30:57 +0000 (12:30 -0700)] 
[3.12] gh-104879: Fix TypeAliasType.__module__ in exec() (GH-104881) (#104890)

(cherry picked from commit fe77a99fc8b549a8bf9ccbc5485fe5ea9bcf47b9)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2 years ago[3.12] Improve test coverage for is_typeddict (GH-104884) (#104889)
Miss Islington (bot) [Wed, 24 May 2023 19:21:28 +0000 (12:21 -0700)] 
[3.12] Improve test coverage for is_typeddict (GH-104884) (#104889)

Improve test coverage for is_typeddict (GH-104884)

In particular, it's important to test that is_typeddict(TypedDict)
returns False.
(cherry picked from commit 1497607a8e99f1103c40368dd5f9057f0146a520)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2 years ago[3.12] gh-104866: Tokenize should emit NEWLINE after exiting block with comment ...
Miss Islington (bot) [Wed, 24 May 2023 18:41:58 +0000 (11:41 -0700)] 
[3.12] gh-104866: Tokenize should emit NEWLINE after exiting block with comment (GH-104870) (#104872)

gh-104866: Tokenize should emit NEWLINE after exiting block with comment (GH-104870)
(cherry picked from commit c90a862cdcf55dc1753c6466e5fa4a467a13ae24)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2 years agogh-103207: The macOS 13 Ventura Installer.app permission problem is fixed by Apple...
Ned Deily [Wed, 24 May 2023 18:32:50 +0000 (14:32 -0400)] 
gh-103207: The macOS 13 Ventura Installer.app permission problem is fixed by Apple in macOS 13.4. (GH-104883)

2 years ago[3.12] gh-104825: add omitted idlelib text fix (#104880)
Terry Jan Reedy [Wed, 24 May 2023 17:41:50 +0000 (13:41 -0400)] 
[3.12] gh-104825: add omitted idlelib text fix (#104880)

Order of events:
Terry merged new idlelib test into main.
Ms. I. made a 3.12 backport; tests passed.
Pablo merged the tokenize change with idlelib test fix into main.
Pablo merged a 3.12 backport without the idle test fix
as the backport of the latter had not yet been been merged.
Terry merged the idlelib test backport.  The new test failed
on at least 4 3.12 buildbots because of the tokenize change.
This PR backports the now needed idlelib test fix.

(cherry picked from commit c8cf9b4)

2 years ago[3.12] gh-102856: Update "Formatted string literals" docs section after PEP701 (GH...
Miss Islington (bot) [Wed, 24 May 2023 13:40:31 +0000 (06:40 -0700)] 
[3.12] gh-102856: Update "Formatted string literals" docs section after PEP701 (GH-104861) (#104865)

(cherry picked from commit 8e5b3b90c83d9aaca1dc2299da696b994780bcc0)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2 years ago[3.12] gh-104719: IDLE - test existence of all tokenize references. (GH-104767) ...
Miss Islington (bot) [Wed, 24 May 2023 12:46:22 +0000 (05:46 -0700)] 
[3.12] gh-104719: IDLE - test existence of all tokenize references. (GH-104767) (#104844)

gh-104719: IDLE - test existence of all tokenize references. (GH-104767)

Class editor.IndentSearcher contains all editor references to tokenize module.
Module io tokenize reference cover those other modules.

(cherry picked from commit e561c09975bf67ad8bb67c56a81e30a9165bcc84)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2 years ago[3.12] gh-101282: Enclose BOLT_APPLY_FLAGS value in double quotes (gh… (gh-104853)
Dong-hee Na [Wed, 24 May 2023 10:47:07 +0000 (19:47 +0900)] 
[3.12] gh-101282: Enclose BOLT_APPLY_FLAGS value in double quotes (gh… (gh-104853)

[3.12] gh-101282: Enclose BOLT_APPLY_FLAGS value in double quotes (gh-104752)
(cherry picked from commit c43785192c97698a0217a680b30baae22106ed3e)

2 years ago[3.12] gh-104825: Remove implicit newline in the line attribute in tokens emitted...
Pablo Galindo Salgado [Wed, 24 May 2023 10:40:51 +0000 (11:40 +0100)] 
[3.12] gh-104825: Remove implicit newline in the line attribute in tokens emitted in the tokenize module (GH-104846). (#104850)

(cherry picked from commit c8cf9b42eb2bfbd4c3e708ec28d32430248a1d7a)

2 years ago[3.12] gh-102856: Add missing quote to fix doctest (GH-104852) (#104854)
Miss Islington (bot) [Wed, 24 May 2023 10:21:59 +0000 (03:21 -0700)] 
[3.12] gh-102856: Add missing quote to fix doctest (GH-104852) (#104854)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years ago[3.12] gh-102856: Add changes related to PEP 701 in 3.12 What's New docs (GH-104824...
Miss Islington (bot) [Wed, 24 May 2023 10:00:34 +0000 (03:00 -0700)] 
[3.12] gh-102856: Add changes related to PEP 701 in 3.12 What's New docs (GH-104824) (#104847)

gh-102856: Add changes related to PEP 701 in 3.12 What's New docs (GH-104824)
(cherry picked from commit c45701e9ef004a523ebb28f3be902b3cf2cf7a9b)

Co-authored-by: Marta Gómez Macías <mgmacias@google.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2 years ago[3.12] gh-104797: Allow Protocols to inherit from collections.abc.Buffer (GH-104827...
Miss Islington (bot) [Wed, 24 May 2023 09:05:34 +0000 (02:05 -0700)] 
[3.12] gh-104797: Allow Protocols to inherit from collections.abc.Buffer (GH-104827) (#104841)

gh-104797: Allow Protocols to inherit from collections.abc.Buffer (GH-104827)
(cherry picked from commit c0ab7d401c736c37bf4462eef7c7d69fef8fab93)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2 years ago[3.12] gh-104372: use == -1 before PyErr_Occurred (GH-104831) (#104833)
Miss Islington (bot) [Wed, 24 May 2023 04:40:21 +0000 (21:40 -0700)] 
[3.12] gh-104372: use == -1 before PyErr_Occurred (GH-104831) (#104833)

gh-104372: use == -1 before PyErr_Occurred (GH-104831)

The ideal pattern for this.  (already in the 3.11 backport)
(cherry picked from commit 7f963bfc79a515dc9822ebddbfb1b5927d2dda09)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2 years ago[3.12] gh-103295: fix stack overwrite on 32-bit in perf map test harness (GH-104811...
Miss Islington (bot) [Tue, 23 May 2023 22:34:50 +0000 (15:34 -0700)] 
[3.12] gh-103295: fix stack overwrite on 32-bit in perf map test harness (GH-104811) (#104823)

gh-103295: fix stack overwrite on 32-bit in perf map test harness (GH-104811)
(cherry picked from commit e0b3078705b271ff278dfbc788c2b061c92a9aa3)

Co-authored-by: Carl Meyer <carl@oddbird.net>
2 years ago[3.12] Remove gh-103207 changelog item as it was never part of any release. (GH-104815)
Miss Islington (bot) [Tue, 23 May 2023 20:04:44 +0000 (13:04 -0700)] 
[3.12] Remove gh-103207 changelog item as it was never part of any release. (GH-104815)

(cherry picked from commit 08b4eb83aadcbdb389b5970b51cac9be95146c2a)

Co-authored-by: Ned Deily <nad@python.org>
2 years ago[3.12] gh-104271: Fix auto() fallback in case of mixed type Enum (GH-104279)
Itamar Ostricher [Tue, 23 May 2023 18:11:35 +0000 (11:11 -0700)] 
[3.12] gh-104271: Fix auto() fallback in case of mixed type Enum (GH-104279)

gh-104271: Fix auto() fallback in case of mixed type Enum

2 years ago[3.12] gh-99108: Release the GIL around hashlib built-in computation (GH-104675)...
Miss Islington (bot) [Tue, 23 May 2023 11:24:02 +0000 (04:24 -0700)] 
[3.12] gh-99108: Release the GIL around hashlib built-in computation (GH-104675) (#104776)

gh-99108: Release the GIL around hashlib built-in computation (GH-104675)

This matches the GIL releasing behavior of our existing `_hashopenssl`
module, extending it to the HACL* built-ins.

Includes adding comments to better describe the ENTER/LEAVE macros
purpose and explain the lock strategy in both existing and new code.
(cherry picked from commit 2e5d8a90aa633ff0bebc9b2b8e21eea389937b19)

Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>
2 years ago[3.12] GH-101291: Avoid using macros with casts in low-level long API. (GH-104742...
Miss Islington (bot) [Tue, 23 May 2023 09:28:04 +0000 (02:28 -0700)] 
[3.12] GH-101291: Avoid using macros with casts in low-level long API. (GH-104742) (#104759)

(cherry picked from commit e295d8605699ad3d8ec46c8d55a5e47da05b20c6)

Co-authored-by: Mark Shannon <mark@hotpy.org>
2 years ago[3.12] GH-104668: Don't call PyOS_* hooks in subinterpreters (GH-104760)
Miss Islington (bot) [Tue, 23 May 2023 09:24:28 +0000 (02:24 -0700)] 
[3.12] GH-104668: Don't call PyOS_* hooks in subinterpreters (GH-104760)

GH-104668: Don't call PyOS_* hooks in subinterpreters (GH-104674)
(cherry picked from commit 357bed0bcd3c5d7c4a8caad451754a9a172aca3e)

Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
2 years ago[3.12] howto/urllib2: remove link to an outdated french translation (GH-104193) ...
Miss Islington (bot) [Tue, 23 May 2023 08:57:52 +0000 (01:57 -0700)] 
[3.12] howto/urllib2: remove link to an outdated french translation (GH-104193) (#104758)

We now have our own translation and it's not outdated
(cherry picked from commit 151b6bfb5d9a15b6e2682e5a3008a3f9ec3086ae)

Co-authored-by: Mathieu Dupuy <deronnax@gmail.com>
2 years ago[3.12] gh-87891: Add ABI check to CI (#104793)
Petr Viktorin [Tue, 23 May 2023 08:56:14 +0000 (10:56 +0200)] 
[3.12] gh-87891: Add ABI check to CI (#104793)

Backport the workflow change and fix-ups:
- GH-92442 (e89c01eac7731d7cb54d43252dbc3d3f3a040c53)
- GH-94129 (0dadb2249a8bafa7c5877daa08c9452f2248958a)
- GH-98556 (194588decc05fa12f04cd90c3b78cc081151b19e)

Co-Authored-By: sterliakov <50529348+sterliakov@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2 years ago[3.12] Add the 3.12 branch to the github workflows. (GH-104768) (#104769)
Miss Islington (bot) [Mon, 22 May 2023 23:20:05 +0000 (16:20 -0700)] 
[3.12] Add the 3.12 branch to the github workflows. (GH-104768) (#104769)

Add the 3.12 branch to the github workflows. (GH-104768)
(cherry picked from commit 4194d8f2c40f478eb0fc9b6fa9b913baaff229da)

Co-authored-by: T. Wouters <thomas@python.org>
2 years agoPost 3.12.0b1
Thomas Wouters [Mon, 22 May 2023 19:11:08 +0000 (21:11 +0200)] 
Post 3.12.0b1

2 years agoPython 3.12.0b1 v3.12.0b1
Thomas Wouters [Mon, 22 May 2023 12:01:29 +0000 (14:01 +0200)] 
Python 3.12.0b1

2 years agogh-101282: Apply BOLT optimizations to libpython for shared builds (#104709)
Gregory Szorc [Mon, 22 May 2023 11:45:20 +0000 (04:45 -0700)] 
gh-101282: Apply BOLT optimizations to libpython for shared builds (#104709)

Apply BOLT optimizations to libpython for shared builds. Most of the C
code is in libpython so it is critical to apply BOLT there fully realize
BOLT benefits.

This change also reworks how BOLT instrumentation is applied. It
effectively removes the readelf based logic added in gh-101525 and
replaces it with a mechanism that saves a copy of the pre-bolt binary
and restores that copy when necessary. This allows us to perform BOLT
optimizations without having to manually delete the output binary to
force a new bolt run.

Also:
- add a clean-bolt target for purging BOLT files and hook that up to the
  clean target
- .gitignore BOLT related files

Before and after this refactor, `make` will no-op after a previous run.
Both versions should also share common make DAG deficiencies where
targets fail to trigger as often as they need to or can trigger
prematurely in certain scenarios. e.g. after this change you may need to
`rm profile-bolt-stamp` to force a BOLT run because there aren't
appropriate non-phony targets for BOLT's make target to depend on.

To make it easier to iterate on custom BOLT settings, the flags to pass
to instrumentation and application are now defined in configure and can
be overridden by passing BOLT_INSTRUMENT_FLAGS and BOLT_APPLY_FLAGS.

2 years agogh-104741: Add line number attribute to indentation error exception (#104743)
Marta Gómez Macías [Mon, 22 May 2023 11:30:18 +0000 (13:30 +0200)] 
gh-104741: Add line number attribute to indentation error exception (#104743)

2 years agogh-102856: Allow comments inside multi-line f-string expresions (#104006)
Cristián Maureira-Fredes [Mon, 22 May 2023 10:30:07 +0000 (12:30 +0200)] 
gh-102856: Allow comments inside multi-line f-string expresions (#104006)

2 years agogh-94473: Flatten arguments in tkinter.Canvas.coords() (GH-98479)
Serhiy Storchaka [Mon, 22 May 2023 08:54:41 +0000 (11:54 +0300)] 
gh-94473: Flatten arguments in tkinter.Canvas.coords() (GH-98479)

It now accepts not only "x1, y1, x2, y2, ..." and "[x1, y1, x2, y2, ...]",
but also "(x1, y1), (x2, y2), ..." and "[(x1, y1), (x2, y2), ...]".

2 years agoUpdate macOS installer ReadMe and Welcome screens for 3.12.0b1. (GH-104739)
Ned Deily [Mon, 22 May 2023 06:43:43 +0000 (02:43 -0400)] 
Update macOS installer ReadMe and Welcome screens for 3.12.0b1. (GH-104739)

2 years agogh-99834: Update macOS installer to Tcl/Tk 8.6.13. (GH-104738)
Ned Deily [Mon, 22 May 2023 06:33:50 +0000 (02:33 -0400)] 
gh-99834: Update macOS installer to Tcl/Tk 8.6.13. (GH-104738)

2 years agogh-104656: Rename typeparams AST node to type_params (#104657)
Jelle Zijlstra [Mon, 22 May 2023 04:25:09 +0000 (21:25 -0700)] 
gh-104656: Rename typeparams AST node to type_params (#104657)

2 years agogh-104536: Improve `multiprocessing.process._cleanup` logic (#104537)
Luccccifer [Mon, 22 May 2023 03:48:57 +0000 (11:48 +0800)] 
gh-104536: Improve `multiprocessing.process._cleanup` logic (#104537)

Fix a race condition in the internal `multiprocessing.process` cleanup
logic that could manifest as an unintended `AttributeError` when calling
`BaseProcess.close()`.

---------

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2 years agoGH-103092: isolate `_ssl` (#104725)
Kumar Aditya [Mon, 22 May 2023 00:44:48 +0000 (06:14 +0530)] 
GH-103092: isolate `_ssl` (#104725)

2 years agogh-102856: Tokenize performance improvement (#104731)
Marta Gómez Macías [Mon, 22 May 2023 00:29:04 +0000 (02:29 +0200)] 
gh-102856: Tokenize performance improvement (#104731)

2 years agogh-104683: clinic.py: Modernise `parse_converter()` using pattern-matching (#104696)
Alex Waygood [Sun, 21 May 2023 23:29:43 +0000 (00:29 +0100)] 
gh-104683: clinic.py: Modernise `parse_converter()` using pattern-matching (#104696)

2 years agogh-104686: Fix tracing for decorated classes (#104708)
Jelle Zijlstra [Sun, 21 May 2023 23:20:19 +0000 (16:20 -0700)] 
gh-104686: Fix tracing for decorated classes (#104708)

2 years agogh-104683: `clinic.py`: Improve coverage for the `parse_converter` method (#104729)
Alex Waygood [Sun, 21 May 2023 23:00:47 +0000 (00:00 +0100)] 
gh-104683: `clinic.py`: Improve coverage for the `parse_converter` method (#104729)

2 years agogh-98836: Extend PyUnicode_FromFormat() (GH-98838)
Serhiy Storchaka [Sun, 21 May 2023 21:32:39 +0000 (00:32 +0300)] 
gh-98836: Extend PyUnicode_FromFormat() (GH-98838)

* Support for conversion specifiers o (octal) and X (uppercase hexadecimal).
* Support for length modifiers j (intmax_t) and t (ptrdiff_t).
* Length modifiers are now applied to all integer conversions.
* Support for wchar_t C strings (%ls and %lV).
* Support for variable width and precision (*).
* Support for flag - (left alignment).

2 years agogh-104050: Add more type annotations to Argument Clinic (#104631)
Erlend E. Aasland [Sun, 21 May 2023 21:24:26 +0000 (23:24 +0200)] 
gh-104050: Add more type annotations to Argument Clinic (#104631)

Annotate methods of the following classes:

- class Function
- class Parameter
- class LandMine

2 years agogh-104050: Add basic type hints to Argument Clinic clinic class (#104705)
Erlend E. Aasland [Sun, 21 May 2023 20:49:34 +0000 (22:49 +0200)] 
gh-104050: Add basic type hints to Argument Clinic clinic class (#104705)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years agogh-104050: Annotate Argument Clinic return converters (#104706)
Erlend E. Aasland [Sun, 21 May 2023 20:23:14 +0000 (22:23 +0200)] 
gh-104050: Annotate Argument Clinic return converters (#104706)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years agogh-103857: Document utcnow and utcfromtimestamp deprecations in What's New (#104542)
Hugo van Kemenade [Sun, 21 May 2023 19:45:44 +0000 (22:45 +0300)] 
gh-103857: Document utcnow and utcfromtimestamp deprecations in What's New (#104542)

Co-authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com>
2 years agogh-104719: IDLE - delete useless monkeypatch of tokenize (#104726)
Terry Jan Reedy [Sun, 21 May 2023 18:42:26 +0000 (14:42 -0400)] 
gh-104719: IDLE - delete useless monkeypatch of tokenize (#104726)

2 years agogh-104719: Restore Tokenize module constants (#104722)
Marta Gómez Macías [Sun, 21 May 2023 16:07:28 +0000 (18:07 +0200)] 
gh-104719: Restore Tokenize module constants (#104722)

2 years agoGH-101291: Add low level, unstable API for pylong (GH-101685)
Mark Shannon [Sun, 21 May 2023 13:45:48 +0000 (14:45 +0100)] 
GH-101291: Add low level, unstable API for pylong (GH-101685)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2 years agotyping docs: Move some classes out of the "Generics" section (#104707)
Jelle Zijlstra [Sun, 21 May 2023 13:00:50 +0000 (06:00 -0700)] 
typing docs: Move some classes out of the "Generics" section (#104707)

- AnyStr can be used in type annotations, contrary to the section header
- Unpack can also be used in annotations, and its use is not restricted
  to generics. It makes more sense with other building blocks like Required.
- Protocol is not necessarily generic.

Also fix the indentation for two notes associated with Concatenate.

Split off from #104642, but I think this change is independently an
improvement.

2 years agogh-104717: Add comment about manual loop unrolling (gh-104718)
Dong-hee Na [Sun, 21 May 2023 12:08:28 +0000 (21:08 +0900)] 
gh-104717: Add comment about manual loop unrolling (gh-104718)

2 years agogh-86275: improve Hypothesis configuration for CI and local runs (#104468)
Zac Hatfield-Dodds [Sun, 21 May 2023 11:52:29 +0000 (12:52 +0100)] 
gh-86275: improve Hypothesis configuration for CI and local runs (#104468)

2 years agogh-103295: expose API for writing perf map files (#103546)
gsallam [Sun, 21 May 2023 10:12:24 +0000 (03:12 -0700)] 
gh-103295: expose API for writing perf map files (#103546)

Co-authored-by: Aniket Panse <aniketpanse@fb.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Carl Meyer <carl@oddbird.net>
2 years agogh-104469: Convert _testcapi/exceptions to use AC (gh-104502)
Dong-hee Na [Sun, 21 May 2023 09:39:45 +0000 (18:39 +0900)] 
gh-104469: Convert _testcapi/exceptions to use AC (gh-104502)

2 years agoCorrected identifier (#104713)
William Sawyer [Sun, 21 May 2023 05:57:50 +0000 (15:57 +1000)] 
Corrected identifier (#104713)

2 years agogh-104698: Fix reference leak in mmapmodule.c (#104700)
Kirill Podoprigora [Sun, 21 May 2023 00:19:56 +0000 (03:19 +0300)] 
gh-104698: Fix reference leak in mmapmodule.c (#104700)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2 years agogh-74690: Make a typing test more resilient (#104691)
Alex Waygood [Sun, 21 May 2023 00:13:37 +0000 (01:13 +0100)] 
gh-74690: Make a typing test more resilient (#104691)

2 years agogh-102856: Python tokenizer implementation for PEP 701 (#104323)
Marta Gómez Macías [Sun, 21 May 2023 00:03:02 +0000 (02:03 +0200)] 
gh-102856: Python tokenizer implementation for PEP 701 (#104323)

This commit replaces the Python implementation of the tokenize module with an implementation
that reuses the real C tokenizer via a private extension module. The tokenize module now implements
a compatibility layer that transforms tokens from the C tokenizer into Python tokenize tokens for backward
compatibility.

As the C tokenizer does not emit some tokens that the Python tokenizer provides (such as comments and non-semantic newlines), a new special mode has been added to the C tokenizer mode that currently is only used via
the extension module that exposes it to the Python layer. This new mode forces the C tokenizer to emit these new extra tokens and add the appropriate metadata that is needed to match the old Python implementation.

Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
2 years agogh-61460: Stronger HMAC in multiprocessing (#20380)
Christian Heimes [Sat, 20 May 2023 23:33:09 +0000 (01:33 +0200)] 
gh-61460: Stronger HMAC in multiprocessing (#20380)

bpo-17258:  `multiprocessing` now supports stronger HMAC algorithms for inter-process connection authentication rather than only HMAC-MD5.

Signed-off-by: Christian Heimes <christian@python.org>
gpshead: I Reworked to be more robust while keeping the idea.

The protocol modification idea remains, but we now take advantage of the
message length as an indicator of legacy vs modern protocol version.  No
more regular expression usage.  We now default to HMAC-SHA256, but do so
in a way that will be compatible when communicating with older clients
or older servers. No protocol transition period is needed.

More integration tests to verify these claims remain true are required. I'm
unaware of anyone depending on multiprocessing connections between
different Python versions.

---------

Signed-off-by: Christian Heimes <christian@python.org>
Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>
2 years agogh-103606: raise RuntimeError if config file is invalid or empty (#104701)
Prince Roshan [Sat, 20 May 2023 22:26:49 +0000 (03:56 +0530)] 
gh-103606: raise RuntimeError if config file is invalid or empty (#104701)

(this adjusts new code) raise RuntimeError if provided config file is invalid or empty, not ValueError.

2 years agogh-104050: Add basic type hints to Argument Clinic DSL parser (#104704)
Erlend E. Aasland [Sat, 20 May 2023 21:55:02 +0000 (23:55 +0200)] 
gh-104050: Add basic type hints to Argument Clinic DSL parser (#104704)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years agogh-104683: Modernise Tools/clinic/ (#104684)
Alex Waygood [Sat, 20 May 2023 20:16:49 +0000 (21:16 +0100)] 
gh-104683: Modernise Tools/clinic/ (#104684)

- Make some string interpolations more readable using f-strings or
  explicit parametrisation
- Remove unneeded open() mode specifiers

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2 years agogh-49174: document that the effect of calling gc.collect() during a collection is...
Irit Katriel [Sat, 20 May 2023 20:12:10 +0000 (21:12 +0100)] 
gh-49174: document that the effect of calling gc.collect() during a collection is undefined (#104699)

2 years agogh-104372: Use non-Raw malloc for c_fds_to_keep in _posixsubprocess (#104697)
Gregory P. Smith [Sat, 20 May 2023 17:09:23 +0000 (10:09 -0700)] 
gh-104372: Use non-Raw malloc for c_fds_to_keep in _posixsubprocess (#104697)

Use non-Raw malloc for c_fds_to_keep as the code could ask for 0 length.

2 years agogh-56276: Add tests to test_compare (#3199)
Cheryl Sabella [Sat, 20 May 2023 16:07:40 +0000 (12:07 -0400)] 
gh-56276: Add tests to test_compare (#3199)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2 years agogh-104679 Fixed syntax highlighting in turtle docs (#104682)
han-solo [Sat, 20 May 2023 15:42:29 +0000 (21:12 +0530)] 
gh-104679 Fixed syntax highlighting in turtle docs (#104682)

2 years agogh-104658: Fix location of unclosed quote error for multiline f-strings (#104660)
Pablo Galindo Salgado [Sat, 20 May 2023 13:07:05 +0000 (14:07 +0100)] 
gh-104658: Fix location of unclosed quote error for multiline f-strings (#104660)

2 years agogh-104683: Modernise `clinic.py` using `str.removeprefix` and `str.removesuffix`...
Alex Waygood [Sat, 20 May 2023 11:08:28 +0000 (12:08 +0100)] 
gh-104683: Modernise `clinic.py` using `str.removeprefix` and `str.removesuffix` (#104685)

Both methods were new in Python 3.9.

2 years agogh-104146: Purge dead code from Argument Clinic (#104680)
Erlend E. Aasland [Sat, 20 May 2023 10:52:32 +0000 (12:52 +0200)] 
gh-104146: Purge dead code from Argument Clinic (#104680)

The following local variables were assigned but never used:

- line 551:  result
- line 1341: groups
- line 1431: default_return_converter
- line 1529: ignore_self
- line 1809: input_checksum
- line 4224: new'

---

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years agogh-104683: Argument clinic: use `dict` over `OrderedDict` (#104647)
Alex Waygood [Sat, 20 May 2023 10:24:00 +0000 (11:24 +0100)] 
gh-104683: Argument clinic: use `dict` over `OrderedDict` (#104647)

For code readability. Instances of `builtins.dict` have been ordered since 3.6, and have been guaranteed by the language to be ordered since Python 3.7. Argument Clinic now requires Python 3.10+.

2 years agoReplace "OS X" with "macOS" (#104653)
partev [Sat, 20 May 2023 08:25:52 +0000 (04:25 -0400)] 
Replace "OS X" with "macOS" (#104653)

2 years agogh-103987: fix several crashes in mmap module (#103990)
Prince Roshan [Sat, 20 May 2023 03:34:12 +0000 (09:04 +0530)] 
gh-103987: fix several crashes in mmap module (#103990)

Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>