Commit graph

117141 commits

Author SHA1 Message Date
Miss Islington (bot)
3f8d5d9ed6
[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 96fff35325)

Co-authored-by: Marta Gómez Macías <mgmacias@google.com>
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
2023-05-28 15:16:43 +01:00
Miss Islington (bot)
41b622b1e8
[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 3a5be878be)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2023-05-28 12:18:43 +01:00
Miss Islington (bot)
36a4227859
[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>
2023-05-28 08:12:30 +00:00
Miss Islington (bot)
5426ff1476
[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 897e716d03)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-05-27 17:51:05 -04:00
Miss Islington (bot)
2b176bc902
[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>
2023-05-27 18:24:30 +01:00
Miss Islington (bot)
edd0cb8e77
[3.12] CI: Precompute hash for config cache key in check_source job (GH-105008) (#105014)
Co-authored-by: Itamar Ostricher <itamarost@gmail.com>
2023-05-27 10:10:03 +00:00
Miss Islington (bot)
368d177da5
[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 7df861c23c)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-05-26 19:17:09 -07:00
Miss Islington (bot)
f625ec3603
[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 a17f160376)

Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>
2023-05-27 01:41:21 +00:00
Miss Islington (bot)
2c02c68867
[3.12] gh-104976: Ensure trailing dedent tokens are emitted as the previous tokenizer (GH-104980) (#105000) 2023-05-26 23:14:45 +01:00
Miss Islington (bot)
05189f3054
[3.12] GH-101588: Deprecate pickle/copy/deepcopy support in itertools (GH-104965) (GH-104997) 2023-05-26 16:02:42 -05:00
Miss Islington (bot)
305d78b714
[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 328422ce61)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-05-26 18:42:36 +00:00
Miss Islington (bot)
eca102ddac
[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 ad0be361c9)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-05-26 18:33:09 +00:00
Miss Islington (bot)
dcee0aa911
[3.12] gh-103921: Document PEP 695 (GH-104642) (#104989)
(cherry picked from commit 060277d96b)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-05-26 18:19:34 +00:00
Miss Islington (bot)
bb1e57ee40
[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 025e9ebd0a
(cherry picked from commit 61c1d6760f)

Co-authored-by: Shaygan Hooshyari <sh.hooshyari@gmail.com>
2023-05-26 11:12:41 -06:00
Hugo van Kemenade
97509ca2bc
[3.12] CI: Cache config.cache across runs to speed up build (GH-104800) (#104967) 2023-05-26 16:02:51 +00:00
Miss Islington (bot)
8ca29573a8
[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 3fdb55c482)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2023-05-26 11:25:46 -04:00
Miss Islington (bot)
01af2b0e51
[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 2cb445635e)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-05-26 14:35:35 +00:00
Miss Islington (bot)
3158b4d2f9
[3.12] gh-104955: Fix __release_buffer__ signature (GH-104956) (#104973)
(cherry picked from commit 6e1eccdcce)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2023-05-26 13:15:08 +00:00
Miss Islington (bot)
83bdfa4320
[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 6c81d7572e)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2023-05-26 12:08:58 +00:00
Miss Islington (bot)
b31cfd276e
[3.12] Fix typo in the tokenizer (GH-104950) (#104953)
(cherry picked from commit 705e387dd8)

Co-authored-by: Stepfen Shawn <m18824909883@163.com>
2023-05-26 12:33:45 +02:00
Miss Islington (bot)
6324458bef
[3.12] gh-104943: Remove mentions of old Python versions (GH-104945) (#104963)
(cherry picked from commit 46857d0b2a)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2023-05-26 07:15:56 +00:00
Miss Islington (bot)
bd2cc41d38
[3.12] gh-104479: Update outdated tutorial floating-point reference (GH-104681) (#104960)
(cherry picked from commit 2cf04e455d)

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
2023-05-25 23:30:12 -07:00
Miss Islington (bot)
8010cefc45
[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 0242e9a57a)

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>
2023-05-26 06:21:15 +00:00
Miss Islington (bot)
5c2971b78f
[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 d08679212d)

Co-authored-by: Gregory P. Smith <gps@python.org>
2023-05-25 20:44:29 +00:00
Miss Islington (bot)
930efde4c7
[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 2b7027d0b2)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-05-25 17:15:48 +00:00
Miss Islington (bot)
d176f78ec2
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 569b2b8d61)

Co-authored-by: Steve Dower <steve.dower@python.org>
2023-05-25 16:49:46 +01:00
Miss Islington (bot)
b328ba1941
[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 38539ef126)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-05-25 14:16:20 +01:00
Miss Islington (bot)
1a47d11f35
[3.12] Misc improvements to the itertools docs (GH-104916) (GH-104917) 2023-05-24 22:39:41 -05:00
Miss Islington (bot)
4833f621b3
[3.12] Misc updates to Whatsnew 3.12 (GH-104912) (GH-104915) 2023-05-24 21:14:11 -05:00
Miss Islington (bot)
51eb009cef
[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 426950993f)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-05-25 02:36:13 +02:00
Miss Islington (bot)
a064233886
[3.12] gh-104874: Document NewType.__supertype__ (GH-104875) (#104906)
gh-104874: Document NewType.__supertype__ (GH-104875)
(cherry picked from commit 41768a2bd3)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-05-25 00:33:52 +01:00
Miss Islington (bot)
c4bc97a0aa
[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 160321e530)

Co-authored-by: Jonathan Protzenko <protz@microsoft.com>
2023-05-24 20:55:37 +00:00
Miss Islington (bot)
b670214636
[3.12] gh-104879: Fix TypeAliasType.__module__ in exec() (GH-104881) (#104890)
(cherry picked from commit fe77a99fc8)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-05-24 19:30:57 +00:00
Miss Islington (bot)
3d91d034a0
[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 1497607a8e)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-05-24 19:21:28 +00:00
Miss Islington (bot)
ddc29c8fdb
[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 c90a862cdc)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2023-05-24 14:41:58 -04:00
Ned Deily
45b88e0653
gh-103207: The macOS 13 Ventura Installer.app permission problem is fixed by Apple in macOS 13.4. (GH-104883) 2023-05-24 18:32:50 +00:00
Terry Jan Reedy
2b54ea5ba2
[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)
2023-05-24 17:41:50 +00:00
Miss Islington (bot)
25890ebbb8
[3.12] gh-102856: Update "Formatted string literals" docs section after PEP701 (GH-104861) (#104865)
(cherry picked from commit 8e5b3b90c8)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2023-05-24 15:40:31 +02:00
Miss Islington (bot)
5e1799ea2e
[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 e561c09975)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-05-24 08:46:22 -04:00
Dong-hee Na
b151660883
[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 c43785192c)
2023-05-24 10:47:07 +00:00
Pablo Galindo Salgado
3d2ed8991f
[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 c8cf9b42eb)
2023-05-24 10:40:51 +00:00
Miss Islington (bot)
2d685eca8a
[3.12] gh-102856: Add missing quote to fix doctest (GH-104852) (#104854)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-05-24 10:21:59 +00:00
Miss Islington (bot)
a5c0ef87a1
[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 c45701e9ef)

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>
2023-05-24 11:00:34 +01:00
Miss Islington (bot)
d10d1e3b10
[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 c0ab7d401c)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-05-24 09:05:34 +00:00
Miss Islington (bot)
b719dd8725
[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 7f963bfc79)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-05-24 04:40:21 +00:00
Miss Islington (bot)
22c45c49bb
[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 e0b3078705)

Co-authored-by: Carl Meyer <carl@oddbird.net>
2023-05-23 22:34:50 +00:00
Miss Islington (bot)
5c8418c5cc
[3.12] Remove gh-103207 changelog item as it was never part of any release. (GH-104815)
(cherry picked from commit 08b4eb83aa)

Co-authored-by: Ned Deily <nad@python.org>
2023-05-23 16:04:44 -04:00
Itamar Ostricher
f4e2049f14
[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
2023-05-23 11:11:35 -07:00
Miss Islington (bot)
9aea1f28e2
[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 2e5d8a90aa)

Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>
2023-05-23 11:24:02 +00:00
Miss Islington (bot)
e43fbbd928
[3.12] GH-101291: Avoid using macros with casts in low-level long API. (GH-104742) (#104759)
(cherry picked from commit e295d86056)

Co-authored-by: Mark Shannon <mark@hotpy.org>
2023-05-23 09:28:04 +00:00