]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 years agogh-104773: PEP 594: Remove the audioop module (#104937)
Victor Stinner [Thu, 25 May 2023 15:59:00 +0000 (17:59 +0200)] 
gh-104773: PEP 594: Remove the audioop module (#104937)

2 years agogh-104773: PEP 594: Remove the aifc module (#104933)
Victor Stinner [Thu, 25 May 2023 15:20:48 +0000 (17:20 +0200)] 
gh-104773: PEP 594: Remove the aifc module (#104933)

* Remove .aifc and .aiff test files of Lib/test/audiodata/
* Remove Lib/test/Sine-1000Hz-300ms.aif test file

2 years agogh-84976: Add back UTC to datetime.__all__ (#104920)
Shantanu [Thu, 25 May 2023 15:18:56 +0000 (08:18 -0700)] 
gh-84976: Add back UTC to datetime.__all__ (#104920)

gh-84796: Add back UTC to datetime.__all__

This was mistakenly dropped in #103637

Noticed when updating typeshed for Python 3.12

2 years agoImproves the Windows MSI test run on PR (GH-104929)
Steve Dower [Thu, 25 May 2023 15:17:12 +0000 (16:17 +0100)] 
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

2 years agogh-104773: PEP 594: Remove the uu module (#104932)
Victor Stinner [Thu, 25 May 2023 14:25:27 +0000 (16:25 +0200)] 
gh-104773: PEP 594: Remove the uu module (#104932)

Doc/license.rst: Keep the UUencode and UUdecode license since it's
also used by the uu codec.

2 years agogh-104773: PEP 594: Remove the crypt module (#104908)
Victor Stinner [Thu, 25 May 2023 13:45:46 +0000 (15:45 +0200)] 
gh-104773: PEP 594: Remove the crypt module (#104908)

Remove the crypt module and its private _crypt extension, deprecated
in Python 3.11.

2 years agoFix indentation in `json.AttrDict` REPL example (#104930)
Alex Waygood [Thu, 25 May 2023 13:05:43 +0000 (14:05 +0100)] 
Fix indentation in `json.AttrDict` REPL example (#104930)

This is causing the docs to be rendered incorrectly.

2 years agoCI: Cache config.cache across runs to speed up build (#104800)
Hugo van Kemenade [Thu, 25 May 2023 11:09:57 +0000 (14:09 +0300)] 
CI: Cache config.cache across runs to speed up build (#104800)

2 years agoMisc improvements to the itertools docs (GH-104916)
Raymond Hettinger [Thu, 25 May 2023 03:31:02 +0000 (22:31 -0500)] 
Misc improvements to the itertools docs (GH-104916)

2 years agoMisc updates to Whatsnew 3.12 (#104912)
Raymond Hettinger [Thu, 25 May 2023 01:59:51 +0000 (20:59 -0500)] 
Misc updates to Whatsnew 3.12 (#104912)

2 years agogh-104773: Remove the msilib package (GH-104911)
Zachary Ware [Thu, 25 May 2023 01:06:00 +0000 (20:06 -0500)] 
gh-104773: Remove the msilib package (GH-104911)

2 years agogh-104874: Document NewType.__supertype__ (#104875)
Jelle Zijlstra [Wed, 24 May 2023 23:23:28 +0000 (16:23 -0700)] 
gh-104874: Document NewType.__supertype__ (#104875)

2 years agogh-104773: Fix PY_STDLIB_MOD_SET_NA() on macOS (#104901)
Victor Stinner [Wed, 24 May 2023 23:19:50 +0000 (01:19 +0200)] 
gh-104773: Fix PY_STDLIB_MOD_SET_NA() on macOS (#104901)

The _scproxy is available on macOS: fix configure script.

2 years agogh-104820: Fixes os.stat on Windows to better handle file systems that do not support...
Steve Dower [Wed, 24 May 2023 23:16:13 +0000 (00:16 +0100)] 
gh-104820: Fixes os.stat on Windows to better handle file systems that do not support FileIdInformation (GH-104892)

2 years agogh-104773: PEP 594: Remove the xdrlib module (#104900)
Victor Stinner [Wed, 24 May 2023 22:40:30 +0000 (00:40 +0200)] 
gh-104773: PEP 594: Remove the xdrlib module (#104900)

pickle documentation no longer mentions the XDR format.

2 years agogh-104773: PEP 594: Remove the nis module (#104897)
Victor Stinner [Wed, 24 May 2023 22:08:36 +0000 (00:08 +0200)] 
gh-104773: PEP 594: Remove the nis module (#104897)

2 years agogh-104835: Remove unittest's deprecated getTestCaseNames, makeSuite, findTestCases...
Hugo van Kemenade [Wed, 24 May 2023 21:16:43 +0000 (00:16 +0300)] 
gh-104835: Remove unittest's deprecated getTestCaseNames, makeSuite, findTestCases (#104836)

2 years agogh-104773: PEP 594: Remove the nntplib module (#104894)
Victor Stinner [Wed, 24 May 2023 21:15:43 +0000 (23:15 +0200)] 
gh-104773: PEP 594: Remove the nntplib module (#104894)

* socket_helper.transient_internet() no longer imports nntplib to
  catch nntplib.NNTPTemporaryError.
* ssltests.py no longer runs test_nntplib.
* "make quicktest" no longer runs test_nntplib.
* WASM: remove nntplib from OMIT_NETWORKING_FILES.
* Remove mentions to nntplib in the email documentation.

2 years agogh-104773: PEP 594: Remove the spwd module (#104871)
Victor Stinner [Wed, 24 May 2023 20:34:41 +0000 (22:34 +0200)] 
gh-104773: PEP 594: Remove the spwd module (#104871)

Remove spwd from the configure script and Modules/Setup.

2 years agogh-99108: Refresh HACL* (#104808)
Jonathan Protzenko [Wed, 24 May 2023 20:30:11 +0000 (13:30 -0700)] 
gh-99108: Refresh HACL* (#104808)

Refresh HACL* from upstream to improve SHA2 performance and fix a 32-bit issue in SHA3.

2 years agogh-104879: Fix TypeAliasType.__module__ in exec() (#104881)
Jelle Zijlstra [Wed, 24 May 2023 18:48:13 +0000 (11:48 -0700)] 
gh-104879: Fix TypeAliasType.__module__ in exec() (#104881)

2 years agoImprove test coverage for is_typeddict (#104884)
Jelle Zijlstra [Wed, 24 May 2023 18:46:00 +0000 (11:46 -0700)] 
Improve test coverage for is_typeddict (#104884)

In particular, it's important to test that is_typeddict(TypedDict)
returns False.

2 years agogh-104866: Tokenize should emit NEWLINE after exiting block with comment (#104870)
Lysandros Nikolaou [Wed, 24 May 2023 16:18:17 +0000 (19:18 +0300)] 
gh-104866: Tokenize should emit NEWLINE after exiting block with comment (#104870)

2 years agogh-104773: PEP 594: Remove the mailcap module (#104867)
Victor Stinner [Wed, 24 May 2023 14:16:55 +0000 (16:16 +0200)] 
gh-104773: PEP 594: Remove the mailcap module (#104867)

Remove Lib/test/mailcap.txt test file.

2 years agogh-104773: Remove OSSAUDIODEV_LIBS variable (#104864)
Victor Stinner [Wed, 24 May 2023 14:02:22 +0000 (16:02 +0200)] 
gh-104773: Remove OSSAUDIODEV_LIBS variable (#104864)

Update configure script for ossaudiodev removal: remove the
OSSAUDIODEV_LIBS variable.

2 years agoRtD docs previews: Cancel building PRs if no changes in Doc dir (#104100)
Hugo van Kemenade [Wed, 24 May 2023 13:54:15 +0000 (16:54 +0300)] 
RtD docs previews: Cancel building PRs if no changes in Doc dir (#104100)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Manuel Kaufmann <humitos@gmail.com>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2 years agogh-104773: PEP 594: Remove the sunau module (#104863)
Victor Stinner [Wed, 24 May 2023 13:51:59 +0000 (15:51 +0200)] 
gh-104773: PEP 594: Remove the sunau module (#104863)

* Remove Lib/test/audiodata/pluck-*.au files.
* Remove Lib/test/audiotest.au file.

2 years agogh-102856: Update "Formatted string literals" docs section after PEP701 (#104861)
Lysandros Nikolaou [Wed, 24 May 2023 13:38:37 +0000 (16:38 +0300)] 
gh-102856: Update "Formatted string literals" docs section after PEP701 (#104861)

2 years agogh-104773: PEP 594: Remove the ossaudiodev module (#104862)
Victor Stinner [Wed, 24 May 2023 13:00:51 +0000 (15:00 +0200)] 
gh-104773: PEP 594: Remove the ossaudiodev module (#104862)

* Remove ossaudiodev extension in configure.ac and regenerate
  the configure script.
* Remove ossaudiodev in Modules/Setup and Modules/Setup.stdlib.in.

2 years agogh-104773: PEP 594: Remove the pipes module (#104848)
Victor Stinner [Wed, 24 May 2023 11:11:29 +0000 (13:11 +0200)] 
gh-104773: PEP 594: Remove the pipes module (#104848)

2 years agogh-102856: Add missing quote to fix doctest (#104852)
Hugo van Kemenade [Wed, 24 May 2023 10:21:15 +0000 (13:21 +0300)] 
gh-102856: Add missing quote to fix doctest (#104852)

2 years agogh-101282: Enclose BOLT_APPLY_FLAGS value in double quotes (gh-104752)
Dong-hee Na [Wed, 24 May 2023 10:10:46 +0000 (19:10 +0900)] 
gh-101282: Enclose BOLT_APPLY_FLAGS value in double quotes (gh-104752)

2 years agogh-104825: Remove implicit newline in the line attribute in tokens emitted in the...
Pablo Galindo Salgado [Wed, 24 May 2023 09:59:18 +0000 (10:59 +0100)] 
gh-104825: Remove implicit newline in the line attribute in tokens emitted in the tokenize module (#104846)

2 years agogh-102856: Add changes related to PEP 701 in 3.12 What's New docs (#104824)
Marta Gómez Macías [Wed, 24 May 2023 09:36:50 +0000 (11:36 +0200)] 
gh-102856: Add changes related to PEP 701 in 3.12 What's New docs (#104824)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2 years agogh-104773: PEP 594: Remove the sndhdr module (#104774)
Victor Stinner [Wed, 24 May 2023 09:32:18 +0000 (11:32 +0200)] 
gh-104773: PEP 594: Remove the sndhdr module (#104774)

Remove the Lib/test/sndhdrdata/ directory.

2 years agogh-104773: PEP 594: Remove cgi and cgitb modules (#104775)
Victor Stinner [Wed, 24 May 2023 09:04:53 +0000 (11:04 +0200)] 
gh-104773: PEP 594: Remove cgi and cgitb modules (#104775)

* Replace "cgi" with "!cgi" in the Sphinx documentation to avoid
  warnings on broken references.
* test_pyclbr no longer tests the cgi module.

2 years agogh-104719: IDLE - test existence of all tokenize references. (#104767)
Terry Jan Reedy [Wed, 24 May 2023 08:43:56 +0000 (04:43 -0400)] 
gh-104719: IDLE - test existence of all tokenize references. (#104767)

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

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2 years agoFix test_importlib.test_side_effect_import() (#104840)
Victor Stinner [Wed, 24 May 2023 08:29:35 +0000 (10:29 +0200)] 
Fix test_importlib.test_side_effect_import() (#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

2 years agogh-104797: Allow Protocols to inherit from collections.abc.Buffer (#104827)
Jelle Zijlstra [Wed, 24 May 2023 08:24:53 +0000 (01:24 -0700)] 
gh-104797: Allow Protocols to inherit from collections.abc.Buffer (#104827)

2 years agogh-104837: Revert "gh-104341: Add a Separate "Running" Lock for Each Thread (gh-10475...
Gregory P. Smith [Wed, 24 May 2023 08:00:57 +0000 (01:00 -0700)] 
gh-104837: Revert "gh-104341: Add a Separate "Running" Lock for Each Thread (gh-104754) (#104838)

gh-104837: Revert "gh-104341: Add a Separate "Running" Lock for Each Thread (gh-104754)"

This reverts commit 097b7830cd67f039ff36ba4fa285d82d26e25e84.

2 years agogh-104372: use == -1 before PyErr_Occurred (#104831)
Gregory P. Smith [Wed, 24 May 2023 04:15:49 +0000 (21:15 -0700)] 
gh-104372: use == -1 before PyErr_Occurred (#104831)

The ideal pattern for this.  (already in the 3.11 backport)

2 years agogh-85934: Use getattr_static when adding mock spec (#22209)
melanie witt [Tue, 23 May 2023 23:10:34 +0000 (16:10 -0700)] 
gh-85934: Use getattr_static when adding mock spec (#22209)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2 years agoGH-83863: Drop support for using `pathlib.Path` objects as context managers (GH-104807)
Barney Gale [Tue, 23 May 2023 22:31:59 +0000 (23:31 +0100)] 
GH-83863: Drop support for using `pathlib.Path` objects as context managers (GH-104807)

In Python 3.8 and prior, `pathlib.Path.__exit__()` marked a path as closed;
some subsequent attempts to perform I/O would raise an IOError. This
functionality was never documented, and had the effect of making `Path`
objects mutable, contrary to PEP 428. In Python 3.9 we made `__exit__()` a
no-op, and in 3.11 `__enter__()` began raising deprecation warnings. Here
we remove both methods.

2 years agogh-103295: fix stack overwrite on 32-bit in perf map test harness (#104811)
Carl Meyer [Tue, 23 May 2023 22:04:31 +0000 (16:04 -0600)] 
gh-103295: fix stack overwrite on 32-bit in perf map test harness (#104811)

2 years agogh-104770: Let generator.close() return value (#104771)
Nicolas Tessore [Tue, 23 May 2023 20:51:56 +0000 (21:51 +0100)] 
gh-104770: Let generator.close() return value (#104771)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2 years agogh-102120: [TarFile] Add an iter function that doesn't cache (GH-102128)
Robert O'Shea [Tue, 23 May 2023 20:44:40 +0000 (21:44 +0100)] 
gh-102120: [TarFile] Add an iter function that doesn't cache (GH-102128)

2 years agogh-104341: Add a Separate "Running" Lock for Each Thread (gh-104754)
Eric Snow [Tue, 23 May 2023 20:29:30 +0000 (14:29 -0600)] 
gh-104341: Add a Separate "Running" Lock for Each Thread (gh-104754)

Having a separate lock means Thread.join() doesn't need to wait for the thread to be cleaned up first.  It can wait for the thread's Python target to finish running.  This gives us some flexibility in how we clean up threads.

(This is a minor cleanup as part of a fix for gh-104341.)

2 years agoRemove gh-103207 changelog item as it was never part of any release. (GH-104814)
Ned Deily [Tue, 23 May 2023 20:03:13 +0000 (16:03 -0400)] 
Remove gh-103207 changelog item as it was never part of any release. (GH-104814)

2 years agoFix missing/incomplete NULL checks in multiple source files (#104564)
chgnrdv [Tue, 23 May 2023 20:01:17 +0000 (23:01 +0300)] 
Fix missing/incomplete NULL checks in multiple source files (#104564)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2 years agogh-104780: Remove 2to3 program and lib2to3 module (#104781)
Victor Stinner [Tue, 23 May 2023 17:40:02 +0000 (19:40 +0200)] 
gh-104780: Remove 2to3 program and lib2to3 module (#104781)

* Remove the Tools/scripts/2to3 script.
* Remove the Lib/test/test_lib2to3/ directory.
* Doc/tools/extensions/pyspecific.py: remove the "2to3fixer" object
  type.
* Makefile and PC/layout/main.py no longer compile lib2to3 grammar
  files.
* Update Makefile for 2to3 removal.

2 years agogh-81005: Refactor str tests to reflect that str and unicode are merged in Python...
Daniel Fortunov [Tue, 23 May 2023 14:11:29 +0000 (15:11 +0100)] 
gh-81005: Refactor str tests to reflect that str and unicode are merged in Python 3 (#13172)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years agogh-104469: Convert _testcapi/long to use AC (gh-104720)
Dong-hee Na [Tue, 23 May 2023 13:52:36 +0000 (22:52 +0900)] 
gh-104469: Convert _testcapi/long to use AC (gh-104720)

2 years agogh-92871: Remove typing.{io,re} namespaces (#92873)
Sebastian Rittau [Tue, 23 May 2023 13:44:26 +0000 (15:44 +0200)] 
gh-92871: Remove typing.{io,re} namespaces (#92873)

Closes #92871

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2 years agogh-104773: PEP 594: Remove the telnetlib module (#104778)
Victor Stinner [Tue, 23 May 2023 07:09:02 +0000 (09:09 +0200)] 
gh-104773: PEP 594: Remove the telnetlib module (#104778)

2 years agogh-104764: [Enum] fix 3.13-specific tests (GH-104779)
Ethan Furman [Tue, 23 May 2023 01:59:40 +0000 (18:59 -0700)] 
gh-104764: [Enum] fix 3.13-specific tests (GH-104779)

2 years agogh-99108: Release the GIL around hashlib built-in computation (#104675)
Gregory P. Smith [Tue, 23 May 2023 00:06:41 +0000 (17:06 -0700)] 
gh-99108: Release the GIL around hashlib built-in computation (#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.

2 years agoAdd codeowners for the tokenizer module (#104753)
Pablo Galindo Salgado [Mon, 22 May 2023 23:27:10 +0000 (00:27 +0100)] 
Add codeowners for the tokenizer module (#104753)

2 years agogh-104764: Skip failing tests in test_enum that started failing. (#104765)
T. Wouters [Mon, 22 May 2023 23:17:06 +0000 (01:17 +0200)] 
gh-104764: Skip failing tests in test_enum that started failing. (#104765)

Skip failing tests in test_enum that started failing when the version was bumped to 3.13.

2 years agoAdd the 3.12 branch to the github workflows. (#104768)
T. Wouters [Mon, 22 May 2023 23:16:28 +0000 (01:16 +0200)] 
Add the 3.12 branch to the github workflows. (#104768)

2 years agogh-102304: Temporarily Bump Py_LIMITED_API for 2 New Functions (#104766)
Eric Snow [Mon, 22 May 2023 23:03:17 +0000 (17:03 -0600)] 
gh-102304: Temporarily Bump Py_LIMITED_API for 2 New Functions (#104766)

Quick and dirty.

2 years agoUpdate Windows library names for the Python version bump (#104755)
Kirill Podoprigora [Mon, 22 May 2023 22:20:06 +0000 (01:20 +0300)] 
Update Windows library names for the Python version bump (#104755)

2 years agoRegenerate configure after the Python version bump (#104757)
T. Wouters [Mon, 22 May 2023 21:50:26 +0000 (23:50 +0200)] 
Regenerate configure after the Python version bump (#104757)

Regenerate configure after the Python version bump.

2 years agoFix whatsnew for 3.13. (GH-104756)
Ned Deily [Mon, 22 May 2023 20:05:27 +0000 (16:05 -0400)] 
Fix whatsnew for 3.13. (GH-104756)

2 years agoGH-104668: Don't call PyOS_* hooks in subinterpreters (GH-104674)
Brandt Bucher [Mon, 22 May 2023 19:34:34 +0000 (12:34 -0700)] 
GH-104668: Don't call PyOS_* hooks in subinterpreters (GH-104674)

2 years agoMerge branch 'main' of https://github.com/python/cpython into main
Thomas Wouters [Mon, 22 May 2023 19:17:26 +0000 (21:17 +0200)] 
Merge branch 'main' of https://github.com/python/cpython into main

2 years agoPython 3.13.0a0
Thomas Wouters [Mon, 22 May 2023 19:15:32 +0000 (21:15 +0200)] 
Python 3.13.0a0

2 years agoGH-101291: Avoid using macros with casts in low-level long API. (#104742)
Mark Shannon [Mon, 22 May 2023 14:12:19 +0000 (15:12 +0100)] 
GH-101291: Avoid using macros with casts in low-level long API. (#104742)

2 years agohowto/urllib2: remove link to an outdated french translation (GH-104193)
Mathieu Dupuy [Mon, 22 May 2023 13:03:29 +0000 (15:03 +0200)] 
howto/urllib2: remove link to an outdated french translation (GH-104193)

We now have our own translation and it's not outdated

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>