128782 Commits

Author SHA1 Message Date
Miss Islington (bot)
ac9e9e2c8f
[3.14] gh-80667: Fix case-sensitivity of some Unicode literal escapes (GH-107281) (GH-144753)
Lookup for CJK ideograms and Hangul syllables is now case-insensitive,
as is the case for other character names.
(cherry picked from commit e66f4a5a9c7ce744030d6352bf5575639b1096cc)

Co-authored-by: James <snoopjedi@gmail.com>
2026-02-12 17:22:05 +00:00
Miss Islington (bot)
7f5a3acded
[3.14] gh-57095: Add note about input splitting in datetime.*.strptime (GH-131049) (GH-144735)
(cherry picked from commit 2e3e76e5cde34786780f5b3723f495fdbdf37c84)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-02-12 11:44:32 +01:00
Serhiy Storchaka
4d3e8c1c85
[3.14] gh-84424: Use numeric_changed for UCD.numeric (GH-19457) (GH-144731)
This was causing ucd_3_2_0.numeric() to pick up only decimal
changes between Unicode 3.2.0 and the current version.
(cherry picked from commit 3e0322ff16f47caa3e273d453f007d3918b8ac80)

Co-authored-by: William Meehan <wmeehan@fb.com>
2026-02-12 08:38:27 +00:00
Hugo van Kemenade
bbd682d1f4
[3.14] gh-144639: Ruff: target Python 3.14 syntax in Lib/test (GH-144656) (#144710)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2026-02-11 17:33:51 +02:00
Miss Islington (bot)
3aef49417e
[3.14] gh-142518: Document thread-safety guarantees of dict operations (GH-144184) (#144708)
* Address feedback; move thread safety section below see-also
* Address feedback - don't mention equality comparison only
* Change admonition to rubric; cross-reference glossary

---------
(cherry picked from commit 35dc547ab5a6bb9be9748002d42d0d9e86f9cced)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-02-11 14:39:40 +01:00
Miss Islington (bot)
8c4ce4be26
[3.14] gh-142518: Define lock-free and per-object lock (GH-144548) (#144704)
gh-142518: Define lock-free and per-object lock (GH-144548)

- Add definitions of lock-free and per-object lock to the glossary
- Cross-reference these from list thread safety notes
- Change admonition to rubric
(cherry picked from commit 12dbae4c02dac197330d5bfa650b495e962aba6d)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2026-02-11 14:16:55 +01:00
Ned Batchelder
78fa4705d8
[3.14] Docs: remove links of modules to themselves (GH-144695) (#144705) 2026-02-11 08:09:56 -05:00
Miss Islington (bot)
a77dde441e
[3.14] gh-106318: Improve str.rstrip() method doc (GH-143893) (#144699)
gh-106318: Improve str.rstrip() method doc (GH-143893)
(cherry picked from commit 936d60dbe1679f05d7ceb0a6d1f65bc741390ac6)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-02-11 08:48:22 +00:00
Miss Islington (bot)
7d074702eb
[3.14] gh-143650: Fix importlib race condition on import failure (GH-143651) (#144662)
gh-143650: Fix importlib race condition on import failure (GH-143651)

Fix a race condition where a thread could receive a partially-initialized
module when another thread's import fails. The race occurs when:

1. Thread 1 starts importing, adds module to sys.modules
2. Thread 2 sees the module in sys.modules via the fast path
3. Thread 1's import fails, removes module from sys.modules
4. Thread 2 returns a stale module reference not in sys.modules

The fix adds verification after the "skip lock" optimization in both Python
and C code paths to check if the module is still in sys.modules. If the
module was removed (due to import failure), we retry the import so the
caller receives the actual exception from the import failure rather than
a stale module reference.
(cherry picked from commit ac8b5b6890006ee7254ea878866cb486ff835ecb)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 06:06:51 +00:00
Victor Stinner
815f21bda9
[3.14] gh-144490: Test the internal C API in test_cext (#144678)
Backport changes from the main branch.

Test also datetime.h in test_cppext.
2026-02-10 20:04:13 +00:00
Savannah Ostrowski
306049ba3c
[3.14] GH-144552: Clean up tail-call.yml CI (GH-144553) (#144683)
Co-authored-by: Savannah Ostrowski <savannah@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-02-10 20:42:18 +02:00
Hugo van Kemenade
1ae5771cba
[3.14] Bump pre-commit hooks (GH-144576) (#144591)
(cherry picked from commit e682141c495c2e52368c4341ae54eea041070356)

Co-authored-by: Savannah Ostrowski <savannah@python.org>
2026-02-10 10:10:20 -08:00
Miss Islington (bot)
befa954efe
[3.14] gh-144629: Add test for the PyFunction_GetAnnotations() function (GH-144630) (#144670)
gh-144629: Add test for the PyFunction_GetAnnotations() function (GH-144630)
(cherry picked from commit cc81707e406c49c63afc18048e1a221d796ce638)

Co-authored-by: Nybblista <170842536+nybblista@users.noreply.github.com>
2026-02-10 15:05:25 +00:00
Bartosz Sławecki
616e611844
[3.14] gh-144563: Fix remote debugging with duplicate libpython mappings from ctypes (GH-144595) (#144655) 2026-02-10 14:31:49 +00:00
Victor Stinner
8b4210c30e
[3.14] gh-138744: Skip test_dtrace on Windows (#144657)
Co-authored-by: Ken Jin <kenjin@python.org>
2026-02-10 15:30:05 +01:00
Miss Islington (bot)
bcbeff52be
[3.14] Clarify the docs for args in asyncio callbacks (GH-143873) (#144663)
Clarify the docs for `args` in asyncio callbacks (GH-143873)
(cherry picked from commit 40a82abe9335e78e34ca564243499490e50b8888)

Co-authored-by: Aarni Koskela <akx@iki.fi>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2026-02-10 13:16:26 +00:00
Miss Islington (bot)
13b3dd0622
[3.14] gh-143543: Fix re-entrant use-after-free in itertools.groupby (GH-143738) (GH-144626)
(cherry picked from commit a91b5c3fb5aeaeda6a8e016378beb0e4a8b329e6)

Co-authored-by: VanshAgarwal24036 <148854295+VanshAgarwal24036@users.noreply.github.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-02-10 14:01:10 +01:00
Miss Islington (bot)
caab302332
[3.14] gh-144652: Support Windows exit status in support get_signal_name() (GH-144653) (#144658)
gh-144652: Support Windows exit status in support get_signal_name() (GH-144653)

Format Windows exit status as hexadecimal.
(cherry picked from commit b121dc434748772272514311fe315e009fdfe6e5)

Co-authored-by: Victor Stinner <vstinner@python.org>
2026-02-10 11:42:26 +00:00
Victor Stinner
2abaf12917
[3.14] gh-144490: Test the internal C API in test_cppext (#144547)
Backport changes from the main branch.
2026-02-10 11:55:57 +01:00
Miss Islington (bot)
3fc48c152b
[3.14] Disable pip version check when upgrading certifi (GH-144632) (#144641)
(cherry picked from commit 80ba4e10f5070e6d2e35618e08057be44f913965)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-02-10 03:24:17 +00:00
Miss Islington (bot)
2cc0720bdb
[3.14] gh-144492: Fix process_changed_files outputs for reusable-{macos, wasi}.yml (GH-144518) (#144635)
gh-144492: Fix `process_changed_files` outputs for `reusable-{macos, wasi}.yml` (GH-144518)

Fix `process_changed_files` double-processing reusable-{macos, wasi] ending up with incorrect outputs
(cherry picked from commit fd190d1fa1a34bb8d533d05263ea744a051b7529)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-02-09 17:57:43 +00:00
Miss Islington (bot)
9cc8e4948c
[3.14] gh-134179: Use sys._clear_internal_caches() at test_cmd_line (GH-134180) (#144631)
gh-134179: Use sys._clear_internal_caches() at test_cmd_line (GH-134180)

Use sys._clear_internal_caches() instead of deprecated sys._clear_type_cache() at test_cmd_line.
(cherry picked from commit dd2da42ea479c32a4260463b47e1b58877d07bdc)

Co-authored-by: alexey semenyuk <alexsemenyuk88@gmail.com>
2026-02-09 15:06:28 +00:00
Miss Islington (bot)
c9646df644
[3.14] gh-119740: Remove obsoleted removal announce for trunc delegation (GH-144622) (GH-144624)
This was done in GH-119743 (3.14).
(cherry picked from commit aa6ed802f20c1ddadf45942d350422d3d4e0bbea)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2026-02-09 16:04:52 +02:00
Miss Islington (bot)
2e3f0146f2
[3.14] gh-144363: Update bundled libexpat to 2.7.4 (GH-144365) (GH-144499)
(cherry picked from commit d5cb9f6a9b6f48cc08c4422259498d4fd023357a)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-02-09 14:21:54 +01:00
Miss Islington (bot)
27baa1cd5d
[3.14] gh-106318: Add examples for str.partition() method (GH-142823) (#144611)
gh-106318: Add examples for str.partition() method (GH-142823)
(cherry picked from commit 432ddd99e2b06a75a4f47bd99c0fd0c911bdb19c)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2026-02-08 22:17:46 +00:00
Miss Islington (bot)
2494a90fbc
[3.14] gh-106318: Add example for str.isalnum() (GH-137550) (#144609)
gh-106318: Add example for str.isalnum() (GH-137550)
(cherry picked from commit 3dd7a3c65ad4ac330ad44a519efa017484530e1a)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2026-02-08 22:14:19 +00:00
Miss Islington (bot)
0cc73ad642
[3.14] For enum.bin, update versionadded directive from 3.10 to 3.11 (GH-144574) (#144588)
For `enum.bin`, update versionadded directive from 3.10 to 3.11 (GH-144574)
(cherry picked from commit d73634935cb9ce00a57dcacbd2e56371e4c18451)

Co-authored-by: Guo Ci <zguoci@gmail.com>
2026-02-08 07:41:33 +00:00
Miss Islington (bot)
626a6bcb31
[3.14] gh-143700: document secrets.DEFAULT_ENTROPY as an opaque value (GH-144568) (#144579)
gh-143700: document `secrets.DEFAULT_ENTROPY` as an opaque value (GH-144568)
(cherry picked from commit 934997218e55714003276a70090a710cb3beeb61)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-02-07 22:42:16 +00:00
Miss Islington (bot)
6b9c21cbea
[3.14] gh-142044: Add note to prefer asyncio.timeout[_at] over asyncio.Timeout (GH-144449) (#144565)
gh-142044: Add note to prefer `asyncio.timeout[_at]` over `asyncio.Timeout` (GH-144449)
(cherry picked from commit 0e7c06a85880ba790fac4239b0ff1052399a36ae)

Co-authored-by: kovan <xaum.io@gmail.com>
2026-02-07 13:31:29 +01:00
Miss Islington (bot)
470e8f27ee
[3.14] gh-140490: Document changes for PurePath.stem in Python 3.14 (GH-144450) (#144564)
gh-140490: Document changes for `PurePath.stem` in Python 3.14 (GH-144450)
(cherry picked from commit 16efaa225cbe53345b482daddee85b5ebfe3cb98)

Co-authored-by: kovan <xaum.io@gmail.com>
2026-02-07 12:25:09 +00:00
Miss Islington (bot)
226eb88ff2
[3.14] gh-144538: Upgrade bundled pip to 26.0.1 (gh-144556) (#144562)
gh-144538: Upgrade bundled pip to 26.0.1 (gh-144556)

Upgrade bundled pip to 26.0.1
(cherry picked from commit f4364a51c1a8ce682fe9e4e96c6aba9f1b590422)

Co-authored-by: Damian Shaw <damian.peter.shaw@gmail.com>
2026-02-07 14:22:45 +02:00
Miss Islington (bot)
60d4281352
[3.14] gh-144490: Fix C++ compatibility in pycore_cell.h (GH-144482) (GH-144555)
gh-144490: Fix C++ compatibility in pycore_cell.h (GH-144482)
(cherry picked from commit a2495ff1e7b370c26128aa41298edb9ff06b5666)

Co-authored-by: Alper <alperyoney@fb.com>
2026-02-07 03:37:41 +00:00
Ned Batchelder
bdba86ea31
[3.14] Docs: module pages should not link to themselves (GH-144505) (#144542)
Docs: module pages should not link to themselves

A re-application of the same changes as #144505.
2026-02-06 14:06:50 -05:00
Miss Islington (bot)
6006005893
[3.14] gh-144446: Fix some frame object thread-safety issues (gh-144479) (#144546)
Fix thread-safety issues when accessing frame attributes while another
thread is executing the frame:

- Add critical section to frame_repr() to prevent races when accessing
  the frame's code object and line number

- Add _Py_NO_SANITIZE_THREAD to PyUnstable_InterpreterFrame_GetLasti()
  to allow intentional racy reads of instr_ptr.

- Fix take_ownership() to not write to the original frame's f_executable
(cherry picked from commit 5bb3bbb9c6a7c9043a04d0cc2e82c83747040788)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2026-02-06 15:25:36 +00:00
Miss Islington (bot)
3fe97357ce
[3.14] gh-141004: Reorganize and reword the 'Useful macros' section (GH-144471) (GH-144541)
- Group the macros
- Roughly order them to put the most important ones first
- Add expansions where it makes sense; especially if there's
  an equivalent in modern C or a common compiler

(cherry picked from commit f85e1170d2b22d2ee42cd568144e0c9f57b0db67)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2026-02-06 12:50:06 +01:00
Victor Stinner
160810de89
[3.14] gh-144330: Initialize classmethod and staticmethod in new (#144498)
gh-144330: Initialize classmethod and staticmethod in new

Initialize cm_callable and sm_callable to None in classmethod and
staticmethod constructor.

Co-authored-by: Aniket Singh Yadav <singhyadavaniket43@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-02-06 10:21:02 +01:00
Miss Islington (bot)
f4239df276
[3.14] gh-140414: add fastpath for current running loop in asyncio.all_tasks (GH-140542) (#144494)
* gh-140414: add fastpath for current running loop in `asyncio.all_tasks` (GH-140542)

Optimize `asyncio.all_tasks()` for the common case where the event loop is running in the current thread by avoiding stop-the-world pauses and locking.

This optimization is already present for `asyncio.current_task()` so we do the same for `asyncio.all_tasks()`.
(cherry picked from commit 95e5d596308620acbd860ec25a40ef95c2b62eaa)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2026-02-06 08:48:06 +05:30
Miss Islington (bot)
6614a3c30c
[3.14] gh-74955: Document that __all__ must contain strings in normalization form NFKC (GH-144504) (GH-144519)
(cherry picked from commit c81e1843d4bc0a51cf4f77d19b5ac4e49f714a0d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-02-05 18:12:28 +00:00
Miss Islington (bot)
3e1197e50d
[3.14] gh-144484: Warn users not to use wsgiref in production (#144511)
gh-144484: Warn users not to use wsgiref in production
(cherry picked from commit 7e777c587f01434ac5eea3d63d096f191278dad2)

Co-authored-by: Seth Michael Larson <seth@python.org>
2026-02-05 18:21:31 +02:00
Serhiy Storchaka
2fb9cde118
[3.14] gh-144148: Update the urllib.parse documentation (GH-144497) (GH-144507)
Document urlsplit() as the main parsing function and urlparse() as
an obsolete variant.
(cherry picked from commit 67ddba9aa9c0405c68e691643c4aa75fdbcefe1d)
2026-02-05 17:24:24 +02:00
Miss Islington (bot)
f27896c319
[3.14] gh-141984: Reword and reorganize Subscription (and Slicing) docs (GH-141985) (GH-144476)
(cherry picked from commit e423e0c2cc06fd36689f45b9e818f2455c20e682)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-02-05 10:41:32 +01:00
Miss Islington (bot)
48015091a9
[3.14] Itertools recipes: Replace the tabulate() example with running_mean() (gh-144483) (gh-144485) 2026-02-04 20:27:41 +00:00
Miss Islington (bot)
9f5191f8e7
[3.14] gh-106318: Add examples for str.startswith() method (GH-144369) (#144481)
gh-106318: Add examples for `str.startswith()` method (GH-144369)
(cherry picked from commit 1b6d737ee0205521333cf5fe6ca6df2d3a6d4ec2)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-02-04 17:23:55 +00:00
Miss Islington (bot)
e3d05d2dd6
[3.14] gh-141004: Document remaining pyport.h utility macros (GH-144279) (GH-144477)
gh-141004: Document remaining `pyport.h` utility macros (GH-144279)
(cherry picked from commit 914fbec21458a0344468734489f29254033fafc5)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-02-04 16:49:41 +00:00
Miss Islington (bot)
fddd858810
[3.14] gh-141444: Replace dead URL in urllib.robotparser example (GH-144443) (#144464)
Co-authored-by: kovan <217326+kovan@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 11:36:34 +00:00
Hugo van Kemenade
360214e257 Post 3.14.3 2026-02-03 20:27:58 +02:00
Hugo van Kemenade
323c59a5e3 Python 3.14.3 v3.14.3 2026-02-03 17:32:20 +02:00
Miss Islington (bot)
07d080a608
[3.14] gh-127313: Use getLogger() without argument to get root logger in logging cookbook (GH-143683) (GH-144431)
gh-127313: Use getLogger() without argument to get root logger in logging cookbook (GH-143683)

Use getLogger() to get root logger in logging cookbook
(cherry picked from commit 53fecbe6e116a4426058b7d0f6c451719c72cb5b)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
2026-02-03 14:55:07 +00:00
Miss Islington (bot)
eb0790f2d7
[3.14] gh-74453: Add stronger security warning to os.path.commonprefix
gh-74453: Add stronger security warning to os.path.commonprefix (GH-144401)
(cherry picked from commit 4e15b8d95da9a0f58ad58283979c37e43ff61229)

Co-authored-by: Seth Michael Larson <seth@python.org>
2026-02-03 14:28:39 +00:00
Miss Islington (bot)
cc8fd6ac43
[3.14] gh-106318: Add examples for str.rindex() method (GH-143887) (#144421)
gh-106318: Add examples for str.rindex() method (GH-143887)
(cherry picked from commit 45d00a0791a53f07c0050b985c936281ed825d9b)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-02-03 14:36:27 +01:00