Commit graph

117424 commits

Author SHA1 Message Date
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
Miss Islington (bot)
905d419cac
[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 357bed0bcd)

Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
2023-05-23 09:24:28 +00:00
Miss Islington (bot)
25b5ce72c9
[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 151b6bfb5d)

Co-authored-by: Mathieu Dupuy <deronnax@gmail.com>
2023-05-23 08:57:52 +00:00
Petr Viktorin
b44beac5e1
[3.12] gh-87891: Add ABI check to CI (#104793)
Backport the workflow change and fix-ups:
- GH-92442 (e89c01eac7)
- GH-94129 (0dadb2249a)
- GH-98556 (194588decc)

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>
2023-05-23 10:56:14 +02:00
Miss Islington (bot)
97f8547913
[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 4194d8f2c4)

Co-authored-by: T. Wouters <thomas@python.org>
2023-05-23 01:20:05 +02:00
Thomas Wouters
c2b127ed3a Post 3.12.0b1 2023-05-22 21:11:08 +02:00
Thomas Wouters
5612078f68 Python 3.12.0b1 2023-05-22 14:07:36 +02:00
Gregory Szorc
5360cb3d56
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.
2023-05-22 13:45:20 +02:00
Marta Gómez Macías
729b252241
gh-104741: Add line number attribute to indentation error exception (#104743) 2023-05-22 11:30:18 +00:00
Cristián Maureira-Fredes
0a7796052a
gh-102856: Allow comments inside multi-line f-string expresions (#104006) 2023-05-22 10:30:07 +00:00
Serhiy Storchaka
9bc80dac47
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), ...]".
2023-05-22 11:54:41 +03:00
Ned Deily
6fba031476
Update macOS installer ReadMe and Welcome screens for 3.12.0b1. (GH-104739) 2023-05-22 06:43:43 +00:00
Ned Deily
13e460086b
gh-99834: Update macOS installer to Tcl/Tk 8.6.13. (GH-104738) 2023-05-22 06:33:50 +00:00
Jelle Zijlstra
a5f244d627
gh-104656: Rename typeparams AST node to type_params (#104657) 2023-05-21 21:25:09 -07:00
Luccccifer
ef5d00a592
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>
2023-05-22 03:48:57 +00:00
Kumar Aditya
b9c807a260
GH-103092: isolate _ssl (#104725) 2023-05-22 06:14:48 +05:30
Marta Gómez Macías
8817886ae5
gh-102856: Tokenize performance improvement (#104731) 2023-05-22 00:29:04 +00:00
Alex Waygood
4b107d86f3
gh-104683: clinic.py: Modernise parse_converter() using pattern-matching (#104696) 2023-05-21 23:29:43 +00:00