]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Miss Islington (bot) [Thu, 3 Jul 2025 08:12:21 +0000 (10:12 +0200)]
[3.13] gh-135640: Adds more type checking to ElementTree (GH-135643) (GH-136226)
(cherry picked from commit
e0245c789f54b63d461717a91eec8ffccbe18966 )
Co-authored-by: Kira <kirawhoprograms@fastmail.com>
Miss Islington (bot) [Thu, 3 Jul 2025 04:31:43 +0000 (06:31 +0200)]
[3.13] gh-135836: Fix `IndexError` in `asyncio.create_connection()` (GH-135875) (#136222)
gh-135836: Fix `IndexError` in `asyncio.create_connection()` (GH-135875)
(cherry picked from commit
9084b151567d02936ea1374961809b69b4cd883d )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Thu, 3 Jul 2025 04:07:28 +0000 (06:07 +0200)]
[3.13] gh-135836: Fix `IndexError` in `asyncio.create_connection` with empty exceptions list (GH-135845) (#136168)
gh-135836: Fix `IndexError` in `asyncio.create_connection` with empty exceptions list (GH-135845)
(cherry picked from commit
0e19db653dfa1a6e750e9cede1f6922e5fd1e808 )
Co-authored-by: heliang666s <147408835+heliang666s@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Miss Islington (bot) [Thu, 3 Jul 2025 00:59:13 +0000 (02:59 +0200)]
[3.13] gh-136135: Doc: Fix some broken links (GH-136137) (GH-136219)
gh-136135: Doc: Fix some broken links (GH-136137)
(cherry picked from commit
135ba86212ad116af3cc4a6ba656bc8cfaab131a )
Co-authored-by: Weilin Du <108666168+LamentXU123@users.noreply.github.com>
Miss Islington (bot) [Wed, 2 Jul 2025 17:55:17 +0000 (19:55 +0200)]
[3.13] Replace `capi-sig` mailing list with `discuss.python.org` (GH-136211) (#136214)
Replace `capi-sig` mailing list with `discuss.python.org` (GH-136211)
(cherry picked from commit
7afe1adb0089d0f2df2add79bbc2300c2f236d90 )
Co-authored-by: sobolevn <mail@sobolevn.me>
Sergey B Kirpichev [Wed, 2 Jul 2025 12:37:06 +0000 (15:37 +0300)]
[3.13] gh-115119: Defer removal of bundled libmpdec to 3.16 (GH-133997) (#136201)
Rename libmpdecimal -> libmpdec
see https://www.bytereef.org/mpdecimal/doc/libmpdec/index.html
(cherry picked from commit
b19c9da401b9e81078103861f55e0762b93453f0 )
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Miss Islington (bot) [Tue, 1 Jul 2025 15:19:39 +0000 (17:19 +0200)]
[3.13] gh-87298: Add tests for find_in_strong_cache() bug in _zoneinfo (GH-24829) (GH-136182)
(cherry picked from commit
12ce16bc134a602d2ac8acde86ae69f70183cb9f )
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Paul Ganssle <p.ganssle@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Tue, 1 Jul 2025 13:30:49 +0000 (15:30 +0200)]
[3.13] gh-136169: Update parameter name in fractions.from_float method (GH-136172) (#136175)
gh-136169: Update parameter name in fractions.from_float method (GH-136172)
Update parameter name in fractions.from_float method
(cherry picked from commit
9c0cb5beb893284c5d49f947bbd81dfe081a5d71 )
Co-authored-by: Vladyslav Lazoryk <80263725+lazorikv@users.noreply.github.com>
Victor Stinner [Tue, 1 Jul 2025 09:26:52 +0000 (11:26 +0200)]
[3.13] gh-135607: remove null checking of weakref list in dealloc of extension modules and objects (#135614) (#136126)
gh-135607: remove null checking of weakref list in dealloc of extension modules and objects (#135614)
(cherry picked from commit
b1056c2a446b43452e457d5fd5f1bde66afd3883 )
Co-authored-by: Xuanteng Huang <44627253+xuantengh@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Miss Islington (bot) [Mon, 30 Jun 2025 22:19:14 +0000 (00:19 +0200)]
[3.13] gh-133982: Use implementation-specific `open` in `test_fileio.OtherFileTests` (GH-135364) (GH-136149)
gh-133982: Use implementation-specific `open` in `test_fileio.OtherFileTests` (GH-135364)
(cherry picked from commit
23caccf74ce2c8dc5d9c5eb6350d21ef20c6ea0b )
Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Miss Islington (bot) [Mon, 30 Jun 2025 16:31:45 +0000 (18:31 +0200)]
[3.13] gh-85702: Catch PermissionError in zoneinfo.load_tzdata() (GH-136117) (#136136)
gh-85702: Catch PermissionError in zoneinfo.load_tzdata() (GH-136117)
(cherry picked from commit
ee47670e8b8648b14fd4cb64a9d47d6ed3c5b6b7 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Miss Islington (bot) [Mon, 30 Jun 2025 16:16:27 +0000 (18:16 +0200)]
[3.13] gh-63207: Update `time.time` documentation after GH-116822 (GH-136068) (#136139)
gh-63207: Update `time.time` documentation after GH-116822 (GH-136068)
(cherry picked from commit
486587da42dc2beda1e7807c35678f181b57a60f )
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Miss Islington (bot) [Mon, 30 Jun 2025 15:00:56 +0000 (17:00 +0200)]
[3.13] gh-85702: Catch IsADirectoryError in zoneinfo (GH-131333) (#136130)
gh-85702: Catch IsADirectoryError in zoneinfo (GH-131333)
(cherry picked from commit
d22604a6d1237c42ec5f43df51dfa9aa58240ba4 )
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Mon, 30 Jun 2025 14:49:35 +0000 (16:49 +0200)]
[3.13] gh-136122: Fix video link for math.tau documentation (GH-136129) (#136132)
Co-authored-by: sedram <54665381+sedram@users.noreply.github.com>
Miss Islington (bot) [Mon, 30 Jun 2025 13:52:53 +0000 (15:52 +0200)]
[3.13] gh-48181: Document `codecs.charmap_build` (GH-135997) (#136124)
gh-48181: Document `codecs.charmap_build` (GH-135997)
(cherry picked from commit
2bdd50309f543f449d7d82b64ed6f60ae0aa80b9 )
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Miss Islington (bot) [Mon, 30 Jun 2025 13:38:49 +0000 (15:38 +0200)]
[3.13] gh-131885: Update documented signatures for `csv.{writer,reader}` (GH-136085) (GH-136121)
gh-131885: Update documented signatures for `csv.{writer,reader}` (GH-136085)
(cherry picked from commit
75f40595e555e7d016cf9d2da8aaddb78bb20b2f )
Co-authored-by: Adam Dangoor <adamdangoor@gmail.com>
Victor Stinner [Mon, 30 Jun 2025 09:40:06 +0000 (11:40 +0200)]
[3.13] gh-128051: Fix tests if sys.float_repr_style is 'legacy' (#135908) (#136026)
gh-128051: Fix tests if sys.float_repr_style is 'legacy' (#135908)
(cherry picked from commit
f3aec60d7a01c5f085a3ef2d6670d46b42b8ddd3 )
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Miss Islington (bot) [Mon, 30 Jun 2025 07:48:11 +0000 (09:48 +0200)]
[3.13] gh-132813: Fix the csv documentation for quoting and escaping (GH-133209) (#136114)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Mon, 30 Jun 2025 07:44:38 +0000 (09:44 +0200)]
[3.13] gh-136087: Remove `\r` from documented `os.linesep` values (GH-136088) (#136112)
gh-136087: Remove `\r` from documented `os.linesep` values (GH-136088)
(cherry picked from commit
980a56843bf631ea80c1486a367d41031dec6a7e )
Co-authored-by: sobolevn <mail@sobolevn.me>
Miss Islington (bot) [Sun, 29 Jun 2025 07:09:36 +0000 (09:09 +0200)]
[3.13] Doc: Fix duplicate words in idlelib (GH-136089) (#136091)
Doc: Fix duplicate words in idlelib (GH-136089)
(cherry picked from commit
f04d2b8819eb37d5439b7437f1e80a1e5c5c4f07 )
Co-authored-by: Weilin Du <108666168+LamentXU123@users.noreply.github.com>
Miss Islington (bot) [Sat, 28 Jun 2025 13:07:42 +0000 (15:07 +0200)]
[3.13] gh-76595: Add note on `PyCapsule_Import` behavior (GH-134022) (GH-136075)
gh-76595: Add note on `PyCapsule_Import` behavior (GH-134022)
(cherry picked from commit
579acf45629fa0b7787ec78fa4049fc6a6388b71 )
Co-authored-by: Nicolas Trangez <ikke@nicolast.be>
Bénédikt Tran [Sat, 28 Jun 2025 08:15:49 +0000 (10:15 +0200)]
[3.13] gh-135571: Guard `_hashlib` usage in `test_hashlib.py` (GH-135572) (#136041)
(cherry picked from commit
065194c1a971b59547f1bb2cc64760c4bf0ee674 )
Co-authored-by: Will Childs-Klein <willck93@gmail.com>
Miss Islington (bot) [Fri, 27 Jun 2025 15:39:18 +0000 (17:39 +0200)]
[3.13] gh-108765: fix comment about macro definitions in `_stat.c` post GH-108854 (GH-136027) (#136044)
gh-108765: fix comment about macro definitions in `_stat.c` post GH-108854 (GH-136027)
(cherry picked from commit
0141e7f9e66e5e5ac3949fb018dd6811cd630dca )
Co-authored-by: Lee Dogeon <dev.moreal@gmail.com>
Miss Islington (bot) [Fri, 27 Jun 2025 14:10:51 +0000 (16:10 +0200)]
[3.13] gh-136028: Fix parsing month names containing "İ" (U+0130) in strptime() (GH-136029) (GH-136038)
This affects locales az_AZ, ber_DZ, ber_MA and crh_UA.
(cherry picked from commit
731f5b8ab3970e344bfbc4ff86df767a0795f0fc )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Fri, 27 Jun 2025 13:27:12 +0000 (15:27 +0200)]
[3.13] gh-92266: Replace tabs with four spaces in Python files (GH-135983) (#136036)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Serhiy Storchaka [Fri, 27 Jun 2025 12:07:22 +0000 (15:07 +0300)]
[3.13] gh-78465: Fix error message for cls.__new__(cls, ...) where cls is not instantiable (GH-135981) (GH-136031)
Previous error message suggested to use cls.__new__(), which
obviously does not work. Now the error message is the same as for
cls(...).
(cherry picked from commit
c45f4f3ebe34529a8db3a7918e8dd2e9f7ce8e86 )
Miss Islington (bot) [Fri, 27 Jun 2025 08:12:58 +0000 (10:12 +0200)]
[3.13] gh-53203: Fix strptime() for %c, %x and %X formats on some locales (GH-135971) (GH-136020)
* Add detection of decimal non-ASCII alt digits.
* Add support of non-decimal alt digits on locale lzh_TW.
* Accept only numbers in correct range if alt digits are known.
* Fix bug in detecting the position of the week day name on locales byn_ER and wal_ET.
* Fix support of single-digit hour on locales ar_SA and bg_BG.
* Add support for %T, %R, %r, %C, %OC.
* Prepare code to use nl_langinfo().
(cherry picked from commit
07183ebce36462aaaea4d20e0502b20821dd2682 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Fri, 27 Jun 2025 05:38:27 +0000 (07:38 +0200)]
[3.13] gh-135968: Add iOS binary stubs for strip (GH-135970) (#136015)
Adds iOS binary stubs for invoking `strip`
(cherry picked from commit
0c6c09b7377e10dcf80844c961b578fbdc6f5375 )
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Russell Keith-Magee [Fri, 27 Jun 2025 05:37:05 +0000 (13:37 +0800)]
[3.13] gh-135966: Modify iOS testbed to make app_packages a site directory (GH-135967) (#136013)
The iOS testbed now treats the app_packages folder as a site folder. This ensures it is
on the path, but also ensures any .pth files are processed on app startup.
(cherry picked from commit
b38810bab76c11ea09260a817b3354aebc2af580 )
Brian Schubert [Fri, 27 Jun 2025 00:13:46 +0000 (20:13 -0400)]
[3.13] Docs: Fix duplicate word typos (GH-135958) (GH-136008)
(cherry picked from commit
34ce1920ca33c11ca2c379ed0ef30a91010bef4f )
Miss Islington (bot) [Thu, 26 Jun 2025 22:59:24 +0000 (00:59 +0200)]
[3.13] gh-135995: Fix missing char in palmos encoding (GH-135990) (#136002)
gh-135995: Fix missing char in palmos encoding (GH-135990)
0x8b correctly encodes to ‹, but 0x9b was mistakenly marked as a control character instead of ›.
---------
(cherry picked from commit
58a42dea97f4fa0df38ef4a95a2ede65e0549f71 )
Co-authored-by: Nathan Korth <nkorth@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Thu, 26 Jun 2025 20:42:29 +0000 (22:42 +0200)]
[3.13] IDLE: Update NEWS2x.txt with 2.7.0 release date (GH-129908) (#136000)
IDLE: Update NEWS2x.txt with 2.7.0 release date (GH-129908)
(cherry picked from commit
642e5dfc74310d15bb81f8e94167590380a5fbfb )
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Miss Islington (bot) [Thu, 26 Jun 2025 14:26:11 +0000 (16:26 +0200)]
[3.13] gh-91555: add warning to docs about possibility of deadlock/infinite recursion (GH-135954) (GH-135989)
(cherry picked from commit
a4625d597f9fc2d083fbb9c22d3ffcec73b2061a )
Miss Islington (bot) [Thu, 26 Jun 2025 13:34:11 +0000 (15:34 +0200)]
[3.13] gh-135110: Fix misleading `generator.close()` documentation (GH-135152) (GH-135986)
gh-135110: Fix misleading `generator.close()` documentation (GH-135152)
The documentation incorrectly stated that generator.close() 'raises' a
GeneratorExit exception. This was misleading because the method doesn't
raise the exception to the caller - it sends the exception internally
to the generator and returns None.
(cherry picked from commit
0d76dccc3b4376ba075a1737f58809e3d83aaaa3 )
Co-authored-by: Connor Denihan <188690869+cdenihan@users.noreply.github.com>
Miss Islington (bot) [Thu, 26 Jun 2025 11:47:47 +0000 (13:47 +0200)]
[3.13] gh-135965: Delete duplicate word in isolating-extensions howto (GH-135964) (#135978)
gh-135965: Delete duplicate word in isolating-extensions howto (GH-135964)
Change use use to use.
(cherry picked from commit
ffb2a02f98d904505c8a82d8540c36dee4c67eed )
Co-authored-by: Weilin Du <108666168+LamentXU123@users.noreply.github.com>
Miss Islington (bot) [Thu, 26 Jun 2025 04:08:17 +0000 (06:08 +0200)]
[3.13] gh-135956: Remove duplicate word in _pydatetime docstring (GH-135957) (#135963)
gh-135956: Remove duplicate word in _pydatetime docstring (GH-135957)
_pydatetime.isoformat docstring repeats 'giving'.
(cherry picked from commit
e3ea6f2b3b084700a34ce392f5cf897407469b3a )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Wed, 25 Jun 2025 18:24:55 +0000 (20:24 +0200)]
[3.13] gh-91555: Revert disabling of logger while handling log record. (GH-135858) (GH-135911)
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
Miss Islington (bot) [Wed, 25 Jun 2025 17:45:57 +0000 (19:45 +0200)]
[3.13] Docs: Fix indentation in `slice` class of `functions.rst` (GH-134393) (GH-135949)
Docs: Fix indentation in `slice` class of `functions.rst` (GH-134393)
Paragraph should not be under `slice.step`. It applies to the whole class.
(cherry picked from commit
6227662ff3bf838d31e9441eda935d24733d705a )
Co-authored-by: Rob Reynolds <13379223+reynoldsnlp@users.noreply.github.com>
Sam Gross [Wed, 25 Jun 2025 17:09:17 +0000 (13:09 -0400)]
[3.13] gh-135871: Fix needless spinning in `_PyMutex_LockTimed` with zero timeout (gh-135872) (gh-135947)
The free threading build could spin unnecessarily on `_Py_yield()` if the initial
compare and swap failed.
(cherry picked from commit
cbfaf41caf135b8598a560854cd59e992a2ccfed )
Co-authored-by: Joseph Tibbertsma <josephtibbertsma@gmail.com>
Miss Islington (bot) [Wed, 25 Jun 2025 14:31:25 +0000 (16:31 +0200)]
[3.13] Docs: Add cross-reference for `positional_item` in the `calls` productionlist (GH-129977) (GH-135941)
Docs: Add cross-reference for `positional_item` in the `calls` productionlist (GH-129977)
Add missing hyperlink for `positional_item`
(cherry picked from commit
d2154912b3b10823c138e904e74f2a1e7e7ca96c )
Co-authored-by: HarryLHW <123lhw321@gmail.com>
sobolevn [Wed, 25 Jun 2025 09:25:27 +0000 (12:25 +0300)]
[3.13] gh-135839: Fix `module_traverse` and `module_clear` in `_interpchannelsmodule` (GH-135840) (#135919)
(cherry picked from commit
dd59c786cfb1018eb5abe877bfa7265ea9a3c2b9 )
Miss Islington (bot) [Wed, 25 Jun 2025 08:51:58 +0000 (10:51 +0200)]
[3.13] gh-135755: Docs: C API: Document missing `PyFunction_GET*` macros (GH-135762) (GH-135917)
(cherry picked from commit
ca87a47b3d92aabaefbbe79c0493d66602184b41 )
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Brian Schubert [Tue, 24 Jun 2025 22:23:26 +0000 (18:23 -0400)]
[3.13] gh-135855: Raise TypeError When Passing Non-dict Object to `_interpreters.set___main___attrs` (gh-135903)
(cherry picked from commit
4e6f0d116e , AKA gh-135856)
Miss Islington (bot) [Tue, 24 Jun 2025 16:59:29 +0000 (18:59 +0200)]
[3.13] gh-135878: Fix crash in `types.SimpleNamespace.__repr__` (GH-135889) (#135895)
gh-135878: Fix crash in `types.SimpleNamespace.__repr__` (GH-135889)
(cherry picked from commit
b3ab94acd308591bbdf264f1722fedc7ee25d6fa )
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Miss Islington (bot) [Tue, 24 Jun 2025 12:00:14 +0000 (14:00 +0200)]
[3.13] gh-135487: fix `reprlib.Repr.repr_int` when given very large integers (GH-135506) (#135886)
gh-135487: fix `reprlib.Repr.repr_int` when given very large integers (GH-135506)
(cherry picked from commit
e5f03b94b6d4decbf433d385f692c1b8d9b7e88d )
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Victor Stinner [Tue, 24 Jun 2025 10:49:31 +0000 (12:49 +0200)]
[3.13] gh-135494: Fix python -m test --pgo -x test_re (#135713) (#135881)
gh-135494: Fix python -m test --pgo -x test_re (#135713)
Fix regrtest to support excluding tests from --pgo tests.
(cherry picked from commit
15c6d63fe6fc62c6d78d2fad81965a8e6f7b7b98 )
Hugo van Kemenade [Tue, 24 Jun 2025 07:20:55 +0000 (08:20 +0100)]
[3.13] Bump mypy to 1.16.1 (GH-135720) (#135849)
Co-authored-by: sobolevn <mail@sobolevn.me>
Miss Islington (bot) [Mon, 23 Jun 2025 22:59:17 +0000 (00:59 +0200)]
[3.13] Docs: Use `arguments` to replace `args` in `argparse.rst` (GH-135510) (GH-135867)
Docs: Use `arguments` to replace `args` in `argparse.rst` (GH-135510)
(cherry picked from commit
caad163b691b2343d823541cfbf741f481ee9f3e )
Co-authored-by: Yongzi Li <204532581+Yzi-Li@users.noreply.github.com>
Eric Snow [Mon, 23 Jun 2025 19:38:41 +0000 (13:38 -0600)]
[3.13] gh-135698: Fix Cross-interpreter Queue.full() With Negative/Default max_size (gh-135778)
We weren't handling non-positive maxsize values (including the default) properly
in Queue.full(). This change fixes that and adjusts an associated assert.
(cherry picked from commit
c5ea8e8 , AKA gh-135724)
Miss Islington (bot) [Mon, 23 Jun 2025 10:51:51 +0000 (12:51 +0200)]
[3.13] gh-134986: Catch PermissionError when trying to call perf in tests (GH-134987) (#135842)
gh-134986: Catch PermissionError when trying to call perf in tests (GH-134987)
Using Ubuntu 24.04 on the Windows Subsystem for Linux, perf will raise a
`PermissionError` instead of `FileNotFoundError`. This commit modifies
the tests to catch that.
(cherry picked from commit
6ab842fce50a6125797bcddfc4a4b2622aa6c6a9 )
Co-authored-by: Emma Smith <emma@emmatyping.dev>
Miss Islington (bot) [Mon, 23 Jun 2025 09:57:03 +0000 (11:57 +0200)]
[3.13] patchcheck: use URL paths to identify upstream remote (GH-135806) (#135809)
Co-authored-by: Kattni <kattni@kattni.com>
Miss Islington (bot) [Sun, 22 Jun 2025 20:12:20 +0000 (22:12 +0200)]
[3.13] gh-135815: skip `netrc` security checks if `os.getuid` is missing (GH-135816) (#135826)
gh-135815: skip `netrc` security checks if `os.getuid` is missing (GH-135816)
(cherry picked from commit
b57b619e34cdfc87b47943c988b0b4d69f8f1fe4 )
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Miss Islington (bot) [Fri, 20 Jun 2025 23:35:39 +0000 (01:35 +0200)]
[3.13] gh-135756: Fix nonexistent parameter in tkinter docs (GH-135770) (#135777)
gh-135756: Fix nonexistent parameter in tkinter docs (GH-135770)
Remove nonexistent color parameter from tkinter.commondialog.Dialog.show() method documentation.
(cherry picked from commit
4ddf505d9982dc8afead8f52f5754eea5ebde623 )
Co-authored-by: Marcell Perger <102254594+MarcellPerger1@users.noreply.github.com>
Miss Islington (bot) [Fri, 20 Jun 2025 14:03:10 +0000 (16:03 +0200)]
[3.13] Docs: Document `PyExceptionClass` functions in the C API (GH-135697) (GH-135758)
Docs: Document `PyExceptionClass` functions in the C API (GH-135697)
* Docs: Document `PyExceptionClass_Name`
`PyExceptionClass_Name` is an undocumented function in the limited API.
* Document `PyExceptionClass_Check`
(cherry picked from commit
59963e866a1bb8128a50cd53d1b13eeab03df06e )
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
Miss Islington (bot) [Thu, 19 Jun 2025 15:10:54 +0000 (17:10 +0200)]
[3.13] gh-135273: Unify `ZoneInfo.from_file` signatures (GH-135274) (#135715)
gh-135273: Unify `ZoneInfo.from_file` signatures (GH-135274)
Align `ZoneInfo.from_file` pure-Python signature with Argument Clinic signature.
(cherry picked from commit
7cc89496922b7edb033e2ed47550c7c9e2ae8525 )
Co-authored-by: Andrii Hrimov <andrew.hrimov@gmail.com>
Miss Islington (bot) [Thu, 19 Jun 2025 15:07:40 +0000 (17:07 +0200)]
[3.13] Docs: Add missing lines between regex and text (GH-134505) (GH-135719)
Docs: Add missing lines between regex and text (GH-134505)
(cherry picked from commit
754190287ece5a2e66684161aadafb18f5f44868 )
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Miss Islington (bot) [Thu, 19 Jun 2025 13:04:46 +0000 (15:04 +0200)]
[3.13] Docs: Emphasize parameter name in `pkgutil.iter_importers` (GH-135597) (GH-135711)
Docs: Emphasize parameter name in `pkgutil.iter_importers` (GH-135597)
(cherry picked from commit
ff639af8eee11e7ca09999b2724bc10652a00e5d )
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Miss Islington (bot) [Thu, 19 Jun 2025 10:04:48 +0000 (12:04 +0200)]
[3.13] gh-126112: Fix test_os.TimerfdTests: use 10 ms resolution (GH-135681) (#135705)
gh-126112: Fix test_os.TimerfdTests: use 10 ms resolution (GH-135681)
Use 10 ms for CLOCK_RES instead of 100 ms to tolerate slow buildbots.
(cherry picked from commit
5c25c884b93eb79f640c47d6dba20f11fdf0ade4 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Thu, 19 Jun 2025 07:18:00 +0000 (09:18 +0200)]
[3.13] Document that PyType_GetModuleByDef returns a borrowed reference (GH-135666) (GH-135702)
(cherry picked from commit
140731ff671395fb7a869c2784429c14dc83fb27 )
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Miss Islington (bot) [Wed, 18 Jun 2025 21:17:42 +0000 (23:17 +0200)]
gh-134538: Add link to shutil.rmtree example in function docs (GH-135540)
(cherry picked from commit
e9b647dd30d22cef465972d898a34c4b1bb6615d )
Co-authored-by: alexey semenyuk <alexsemenyuk88@gmail.com>
Miss Islington (bot) [Wed, 18 Jun 2025 18:47:59 +0000 (20:47 +0200)]
[3.13] gh-135641: Fix flaky `test_capi.test_lock_two_threads` test case (gh-135642) (gh-135688)
The mutex may have the `_Py_HAS_PARKED` bit set.
(cherry picked from commit
17ac3933c3c860e08f7963cf270116a39a063be7 )
Co-authored-by: Sam Gross <colesbury@gmail.com>
Miss Islington (bot) [Wed, 18 Jun 2025 17:44:43 +0000 (19:44 +0200)]
[3.13] Docs: Fix markups for emphasis (GH-135598) (GH-135686)
Docs: Fix markups for emphasis (GH-135598)
The word emphasis character `_` is not supported as sphinx markup, so changed to `*`.
(cherry picked from commit
46c60e0d0b716e8e6f0b74a0f9d0542605b1efd4 )
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
Miss Islington (bot) [Wed, 18 Jun 2025 12:40:21 +0000 (14:40 +0200)]
[3.13] gh-135335: flush stdout/stderr in forkserver after preloading modules (GH-135338) (#135671)
gh-135335: flush stdout/stderr in forkserver after preloading modules (GH-135338)
If a preloaded module writes to stdout or stderr, and the stream is buffered,
child processes will inherit the buffered data after forking. Attempt to
prevent this by flushing the streams after preload.
(cherry picked from commit
9877d191f441741fc27ae5e7a6dd7ab6d4bcc6b7 )
Co-authored-by: Duane Griffin <duaneg@dghda.com>
Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Tue, 17 Jun 2025 05:47:27 +0000 (07:47 +0200)]
[3.13] gh-135489: Show verbose output for failing tests during PGO profiling step with `--enable-optimizations` (#135600)
Co-authored-by: PuQing <me@puqing.work>
Miss Islington (bot) [Mon, 16 Jun 2025 22:17:21 +0000 (00:17 +0200)]
[3.13] Use replacements to update versions in "Using Python on macOS" (GH-130400) (#135587)
(cherry picked from commit
21bac3aecd03805ea74ca67a3a291a9eb347588f )
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Sam Gross [Mon, 16 Jun 2025 17:30:52 +0000 (13:30 -0400)]
[3.13] gh-132617: Fix `dict.update()` mutation check (gh-134815) (gh-135582)
Use `ma_used` instead of `ma_keys->dk_nentries` for modification check
so that we only check if the dictionary is modified, not if new keys are
added to a different dictionary that shared the same keys object.
(cherry picked from commit
d8994b0a77cc9821772d05db00a6ab23382fa17d )
Miss Islington (bot) [Mon, 16 Jun 2025 12:08:03 +0000 (14:08 +0200)]
[3.13] gh-132969: Fix error/hang when shutdown(wait=False) and task exited abnormally (GH-133222) (GH-135343)
gh-132969: Fix error/hang when shutdown(wait=False) and task exited abnormally (GH-133222)
When shutdown is called with wait=False, the executor thread keeps running
even after the ProcessPoolExecutor's state is reset. The executor then tries
to replenish the worker processes pool resulting in an error and a potential hang
when it comes across a worker that has died. Fixed the issue by having
_adjust_process_count() return without doing anything if the ProcessPoolExecutor's
state has been reset.
Added unit tests to validate two scenarios:
max_workers < num_tasks (exception)
max_workers > num_tasks (exception + hang)
(cherry picked from commit
598aa7cc98bc1b39f10ec41decddd8dd88799fe1 )
Co-authored-by: Ajay Kamdar <140011370+ogbiggles@users.noreply.github.com>
Miss Islington (bot) [Sun, 15 Jun 2025 20:02:43 +0000 (22:02 +0200)]
[3.13] gh-67022: Document bytes/str inconsistency in email.header.decode_header() and suggest email.headerregistry.HeaderRegistry as a sane alternative (GH-92900) (#135549)
gh-67022: Document bytes/str inconsistency in email.header.decode_header() and suggest email.headerregistry.HeaderRegistry as a sane alternative (GH-92900)
* gh-67022: Document bytes/str inconsistency in email.header.decode_header()
This function's possible return types have been surprising and error-prone
for the entirety of its Python 3.x history. It can return either:
1. `typing.List[typing.Tuple[bytes, typing.Optional[str]]]` of length >1
2. or `typing.List[typing.Tuple[str, None]]`, of length exactly 1
This means that any user of this function must be prepared to accept either
`bytes` or `str` for the first member of the 2-tuples it returns, which is a
very surprising behavior in Python 3.x, particularly given that the second
member of the tuple is supposed to represent the charset/encoding of the
first member.
This patch documents the behavior of this function, and adds test cases
to demonstrate it.
As discussed in bpo-22833, this cannot be changed in a backwards-compatible
way, and some users of this function depend precisely on the existing
behavior.
Add warnings about obsolescence of 'email.header.decode_header' and 'email.header.make_header' functions.
Recommend use of `email.headerregistry.HeaderRegistry` instead, as suggested
in https://github.com/python/cpython/pull/92900#discussion_r1112472177
(cherry picked from commit
60181f4ed0e48ff35dc296da6b51473bfc553d16 )
Co-authored-by: Dan Lenski <dlenski@gmail.com>
Miss Islington (bot) [Sun, 15 Jun 2025 00:38:52 +0000 (02:38 +0200)]
[3.13] gh-135171: Update documentation for the generator expression (GH-135351) (GH-135525)
gh-135171: Update documentation for the generator expression (GH-135351)
* gh-135171: Update documentation for the generator expression
Document that the iterator for the leftmost "for" clause is created
immediately.
* Update Doc/reference/expressions.rst
---------
(cherry picked from commit
8979d3afe376c67931665070a79f6939ebcd940b )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Brian Skinn <brian.skinn@gmail.com>
Miss Islington (bot) [Sat, 14 Jun 2025 16:49:13 +0000 (18:49 +0200)]
[3.13] gh-135497: fix `MAXLOGNAME` detection in `configure.ac` (GH-135508) (#135517)
gh-135497: fix `MAXLOGNAME` detection in `configure.ac` (GH-135508)
(cherry picked from commit
2e15a50851da66eb8227ec6ea07a9cc7ed08fbf3 )
Co-authored-by: Caleb Xu <calebcenter@live.com>
GiGaGon [Sat, 14 Jun 2025 08:00:14 +0000 (01:00 -0700)]
[3.13] gh-135496: Fix f string exclamation mark error typo (GH-135495) (#135501)
Mikhail Efimov [Fri, 13 Jun 2025 18:08:03 +0000 (21:08 +0300)]
[3.13] gh-125723: Fix crash with f_locals when generator frame outlive their generator (GH-135453)
Backport of
8e20e42cc63321dacc500d7670bfc225ca04e78b from GH-126956
Closes GH-125723
Tan Long [Fri, 13 Jun 2025 17:40:24 +0000 (01:40 +0800)]
[3.13] gh-133439: Fix dot commands with trailing spaces are mistaken for multi-line sqlite statements in the sqlite3 command-line interface (GH-133440) (GH-133765)
(cherry picked from commit
ebd4881db2e8448b238d8ca2f6fcf331826132dd )
Miss Islington (bot) [Fri, 13 Jun 2025 17:20:30 +0000 (19:20 +0200)]
[3.13] gh-135462: Fix quadratic complexity in processing special input in HTMLParser (GH-135464) (GH-135482)
End-of-file errors are now handled according to the HTML5 specs --
comments and declarations are automatically closed, tags are ignored.
(cherry picked from commit
6eb6c5dbfb528bd07d77b60fd71fd05d81d45c41 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Fri, 13 Jun 2025 16:53:52 +0000 (18:53 +0200)]
[3.13] doc: Remove what was essentially duplicate wording. (GH-135431) (GH-135441)
(cherry picked from commit
f273fd77d790300506c6443baa94d027b643f603 )
Miss Islington (bot) [Fri, 13 Jun 2025 15:50:53 +0000 (17:50 +0200)]
[3.13] gh-106318: Add example for `str.expandtabs()` (GH-134525) (#135477)
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Miss Islington (bot) [Fri, 13 Jun 2025 15:28:02 +0000 (17:28 +0200)]
gh-135455: Fix version and architecture detection in PC/layout script. (GH-135461)
(cherry picked from commit
afc5ab6cce9d7095b99c1410a6762bc4a96504dd )
Co-authored-by: Steve Dower <steve.dower@python.org>
Miss Islington (bot) [Fri, 13 Jun 2025 12:13:59 +0000 (14:13 +0200)]
[3.13] gh-106318: Add example for `str.endswith()` (GH-134523) (#135460)
gh-106318: Add example for `str.endswith()` (GH-134523)
(cherry picked from commit
eed827ed091c6e55f11164046d287a76e30fbc0e )
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Fri, 13 Jun 2025 11:46:14 +0000 (13:46 +0200)]
[3.13] gh-106318: Add example for `str.encode()` (GH-134520) (#135458)
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Thu, 12 Jun 2025 01:37:30 +0000 (03:37 +0200)]
[3.13] Fix presentation of dataclasses' `unsafe_hash` default value (GH-116532) (#135417)
Fix presentation of dataclasses' `unsafe_hash` default value (GH-116532)
(cherry picked from commit
71f5fafdfb2e509f59cd584d45949c6496f88d41 )
Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Thomas Wouters [Wed, 11 Jun 2025 21:32:50 +0000 (23:32 +0200)]
Post 3.13.5
Thomas Wouters [Wed, 11 Jun 2025 15:36:41 +0000 (17:36 +0200)]
Python 3.13.5
Miss Islington (bot) [Wed, 11 Jun 2025 15:32:42 +0000 (17:32 +0200)]
[3.13] gh-133264: Correct documentation of how Py_Main and Py_RunMain handle SystemExit (GH-135337) (#135395)
gh-133264: Correct documentation of how Py_Main and Py_RunMain handle SystemExit (GH-135337)
(cherry picked from commit
b706ff003c536c5bca24dfdd3a8917bffcfa3df1 )
Co-authored-by: Malcolm Smith <smith@chaquo.com>
T. Wouters [Wed, 11 Jun 2025 14:57:35 +0000 (16:57 +0200)]
[3.13] GH-135171: Roll back all fixes for GH-127682 as they are not suitable for 3.13 (#135390)
Miss Islington (bot) [Wed, 11 Jun 2025 14:55:14 +0000 (16:55 +0200)]
[3.13] gh-132415: Update vendored setuptools in ``Lib/test/wheeldata`` (GH-132887) (#135391)
(cherry picked from commit
c9f3f5b4ed52d7bed6073ffa39717ece47202558 )
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Miss Islington (bot) [Wed, 11 Jun 2025 14:13:37 +0000 (16:13 +0200)]
[3.13] Docs: Add note to tutorial clarifying scope (GH-134534) (#134535)
Co-authored-by: Kattni <kattni@kattni.com>
Miss Islington (bot) [Wed, 11 Jun 2025 11:00:59 +0000 (13:00 +0200)]
[3.13] gh-135321: Always raise a correct exception for BINSTRING argument > 0x7fffffff in pickle (GH-135322) (GH-135383)
(cherry picked from commit
2b8b4774d29a707330d463f226630185cbd3ceff )
Co-authored-by: Justin Applegate <70449145+Legoclones@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
stratakis [Wed, 11 Jun 2025 10:09:20 +0000 (12:09 +0200)]
[3.13] gh-128605: Add branch protections for x86_64 in asm_trampoline.S (#128606) (#135353)
Apply Intel Control-flow Technology for x86-64 on asm_trampoline.S.
Required for mitigation against return-oriented programming (ROP)
and Call or Jump Oriented Programming (COP/JOP) attacks.
Manual application is required for the assembly files.
See also: https://sourceware.org/annobin/annobin.html/Test-cf-protection.html
Miss Islington (bot) [Wed, 11 Jun 2025 09:43:38 +0000 (11:43 +0200)]
[3.13] gh-133967: Do not normalize locale name 'C.UTF-8' to 'en_US.UTF-8' (GH-135347) (GH-135350)
(cherry picked from commit
0f866cbfefd797b4dae25962457c5579bb90dde5 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Serhiy Storchaka [Tue, 10 Jun 2025 10:41:10 +0000 (13:41 +0300)]
[3.13] gh-135326: Restore support of __index__ in random.getrandbits() (#135332)
Bénédikt Tran [Tue, 10 Jun 2025 09:12:41 +0000 (11:12 +0200)]
[3.13] gh-133157: fix UBSan failures in `Parser/pegen.c` (GH-134048) (#135334)
[3.13] gh-133157: fix UBSan failures in `Parser/pegen.c` (GH-134048)
(cherry picked from commit
754e7c9b5187fcad22acf7555479603f173a4a09 )
Miss Islington (bot) [Mon, 9 Jun 2025 21:09:37 +0000 (23:09 +0200)]
[3.13] Heavily comment Python/perf_jit_trampoline.c to improve maintainability (GH-134527) (#135300)
Miss Islington (bot) [Mon, 9 Jun 2025 06:41:03 +0000 (08:41 +0200)]
[3.13] Use f-strings in csv docs example (GH-135245) (#135286)
Use f-strings in csv docs example (GH-135245)
(cherry picked from commit
2677dd017a033eaaad3b8e1e0eb5664a44e7e231 )
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Miss Islington (bot) [Sun, 8 Jun 2025 21:56:35 +0000 (23:56 +0200)]
[3.13] gh-135276: Refresh `zipfile.Path` from zipp 3.23 (GH-135277) (#135279)
* gh-135276: Refresh `zipfile.Path` from zipp 3.23 (GH-135277)
Apply changes from zipp 3.23
(cherry picked from commit
8d6eb0c26276c4013346622580072908d46d2341 )
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* Removed features slated for Python 3.15 only.
---------
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Miss Islington (bot) [Sun, 8 Jun 2025 21:55:12 +0000 (23:55 +0200)]
[3.13] gh-135263: Fix typo in token.NAME documentation (GH-135275) (#135281)
gh-135263: Fix typo in token.NAME documentation (GH-135275)
(cherry picked from commit
8d17a412da7e7d8412efc625d48dcb5eecea50b0 )
Co-authored-by: Vladyslav Lazoryk <80263725+lazorikv@users.noreply.github.com>
Miss Islington (bot) [Sun, 8 Jun 2025 17:13:34 +0000 (19:13 +0200)]
[3.13] Update tutorial for new "Copy" button (GH-135007) (#135271)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Miss Islington (bot) [Sun, 8 Jun 2025 12:37:55 +0000 (14:37 +0200)]
[3.13] gh-134976: document the exception type that can be raised by `s[i]` (GH-134977) (#135259)
gh-134976: document the exception type that can be raised by `s[i]` (GH-134977)
(cherry picked from commit
158e5162bfaa8a49178ce2c3f2455c3e03b60157 )
Co-authored-by: Yongzi Li <204532581+Yzi-Li@users.noreply.github.com>
Miss Islington (bot) [Sun, 8 Jun 2025 07:38:00 +0000 (09:38 +0200)]
[3.13] gh-134151 Fix `TypeError` in `email.utils.decode_params` when sorting RFC 2231 continuations (GH-134687) (#135248)
gh-134151 Fix `TypeError` in `email.utils.decode_params` when sorting RFC 2231 continuations (GH-134687)
- Fix sorting logic in `email.utils.decode_params` to handle None values.
- Update tests for RFC 2231 continuation sorting.
(cherry picked from commit
bcb6b45cb86a2f9f65b6c41f27c36059ba86a50b )
Co-authored-by: Jiucheng(Oliver) <git.jiucheng@gmail.com>
Miss Islington (bot) [Sat, 7 Jun 2025 09:03:32 +0000 (11:03 +0200)]
[3.13] gh-134160: Use PyModuleDef.m_free in the example module xxlimited (GH-135174) (GH-135214)
gh-134160: Use PyModuleDef.m_free in the example module xxlimited (GH-135174)
(cherry picked from commit
1adca08d658ee2d520f3193960eaf3ae2ead1cef )
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
Miss Islington (bot) [Fri, 6 Jun 2025 18:11:15 +0000 (20:11 +0200)]
[3.13] gh-134155: fix AttributeError in email._header_value_parser.get_address (GH-134194) (#135192)
gh-134155: fix AttributeError in email._header_value_parser.get_address (GH-134194)
Append the defect to defects instead of to the parse tree.
(cherry picked from commit
d9cad074d52fe31327429fd81e4d2eeea3dbe35b )
Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>