Commit Graph

129311 Commits

Author SHA1 Message Date
Serhiy Storchaka 49975a511f [3.14] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) (GH-150473)
(cherry picked from commit cf73b17adf)
(cherry picked from commit 287c98f4cb)
2026-05-27 16:24:18 +00:00
Miss Islington (bot) 26c5468b5d [3.14] gh-149861: Fix rule in match statement case_block PEG grammar (GH-149908)
(cherry picked from commit 99c254e2f7)

Co-authored-by: Ivy Xu <fakeshadow1337@gmail.com>
2026-05-27 16:25:19 +01:00
Miss Islington (bot) 5f1e06abc3 [3.14] gh-88726: Stop using non-standard charset names eucgb2312_cn and big5_tw in email (GH-149959) (GH-150492)
(cherry picked from commit 5e467f4331)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-05-27 10:52:35 +00:00
Miss Islington (bot) 27a18eb465 [3.14] gh-149571: Fix the C implementation of Element.itertext() (GH-149929) (GH-150510)
It no longer emits text for comments and processing instructions.
(cherry picked from commit 7de4fcd445)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-05-27 10:50:24 +00:00
Miss Islington (bot) 8053ead86b [3.14] gh-150175: Fix ThreadingMock call_count race condition (GH-150176) (#150181)
gh-150175: Fix ThreadingMock call_count race condition (GH-150176)

ThreadingMock._increment_mock_call() was not thread-safe.
Multiple threads calling the mock simultaneously could lose
increments due to race conditions on call_count and other
attributes.

Fix by overriding _increment_mock_call in ThreadingMixin
and wrapping it with the existing _mock_calls_events_lock.
(cherry picked from commit 388e023fe1)

Co-authored-by: saisneha196 <156835592+saisneha196@users.noreply.github.com>
2026-05-26 12:46:42 -07:00
Miss Islington (bot) 8732053c92 [3.14] gh-148557: Use em-config to locate trampoline clang (GH-148556) (#150482)
When CC is wrapped by ccache, the Emscripten trampoline rule cannot derive the
matching clang path by treating CC as a single executable path. Query the active
LLVM toolchain path with em-config instead.
(cherry picked from commit 1310d2c252)

Co-authored-by: Clément Péron <peron.clem@gmail.com>
2026-05-26 10:05:51 -07:00
AN Long e01a038972 [3.14] gh-149931: Fix memory leaks on failed realloc (#150476)
(cherry picked from commit ec23ec6870)
2026-05-26 13:31:22 +00:00
Serhiy Storchaka 730fc6a858 [3.14] gh-150285: Fix too long docstrings in builtins (GH-150293) (GH-150466)
(cherry picked from commit e1e06be119)
2026-05-26 10:05:49 +00:00
Serhiy Storchaka 1e72dfadf6 [3.14] gh-150285: Fix too long docstrings in the os module (GH-150296) (GH-150341) (GH-150464)
(cherry picked from commit 739552caae)
(cherry picked from commit a5cb7c34dd)
2026-05-26 09:39:54 +00:00
Serhiy Storchaka ad1bb6c14c [3.14] gh-150285: Fix too long docstrings in the pyexpat module (GH-150294) (GH-150463)
(cherry picked from commit 9da7923835)
2026-05-26 09:34:51 +00:00
Serhiy Storchaka 7168b02795 [3.14] gh-150285: Fix too long docstrings in the sqlite3 module (GH-150290) (GH-150461)
(cherry picked from commit 0466560b31)
2026-05-26 09:27:04 +00:00
Serhiy Storchaka 9d79e71fb6 [3.14] gh-150285: Fix too long docstrings in the decimal module (GH-150288) (GH-150460)
(cherry picked from commit 6bed57a3b6)
2026-05-26 09:20:59 +00:00
Serhiy Storchaka 36137e46a8 [3.14] gh-150285: Fix too long docstrings in the io module (GH-150287) (GH-150458)
(cherry picked from commit 160dc74122)
2026-05-26 09:10:39 +00:00
Serhiy Storchaka e7f1216204 [3.14] gh-150285: Fix too long docstrings in the curses module (GH-150286) (GH-150457)
(cherry picked from commit 4c0fe2d134)
2026-05-26 09:06:00 +00:00
Russell Keith-Magee e29411d405 [3.14] gh-150443: Exclude explicit dup3 and pipe2 checks on iOS builds. (GH-150444) (#150447)
Exclude explicit dup3 and pipe2 checks on iOS builds.
(cherry picked from commit 629da5c914)
2026-05-26 13:07:16 +08:00
Serhiy Storchaka 09ff114e8c [3.14] gh-150285: Fix too long docstrings in the zstd module (GH-150291) (GH-150335) (#150421)
(cherry picked from commit 9fceb1c0c5)
(cherry picked from commit d3e2a133d2)

Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
2026-05-25 16:05:41 -07:00
Miss Islington (bot) 11a02aa5b2 [3.14] gh-80198: Improve test_pwd and test_grp (GH-150380) (GH-150398) (GH-150422)
Fix tests for non-existing names and ids when getpwall()/getgrall()
don't return all users/groups.


Add tests for out-of-range uids, integer float ids, bytes names,
null-terminated names, names with surrogates, empty names, excessive
arguments.
(cherry picked from commit 4bdff2cc89)
(cherry picked from commit 46e8f7a9e7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-05-25 19:10:01 +00:00
Miss Islington (bot) 152a9a6db4 [3.14] gh-149156: Fix perf trampoline crash after fork (GH-150347) (#150392) 2026-05-25 18:29:47 +00:00
Miss Islington (bot) 0bff1182d4 [3.14] gh-145896: Fix typos and stale docstrings in the traceback module (GH-145897) (GH-150382)
(cherry picked from commit 832afeddce)

Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com>
2026-05-25 10:13:08 +00:00
Miss Islington (bot) ec4df59134 [3.14] gh-149449: Fix use-after-free in _PyUnicode_GetNameCAPI (GH-150323) (#150353)
gh-149449: Fix use-after-free in `_PyUnicode_GetNameCAPI` (GH-150323)
(cherry picked from commit 43c60ec2fd)

Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2026-05-25 12:16:08 +05:30
Miss Islington (bot) 229447af58 [3.14] gh-110704: Recommend distclean target over clean when source tree is not clean (GH-112610) (#150343)
gh-110704: Recommend `distclean` target over `clean` when source tree is not clean (GH-112610)

Recommend `distclean` target over `clean` when source tree is not clean
(cherry picked from commit 34631058f2)

Co-authored-by: James <6125322+SnoopJ@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2026-05-24 08:47:44 -07:00
Miss Islington (bot) 5676bfcf85 [3.14] gh-150178: Fix refcount leaks in hamt allocation failure paths (GH-150179) (#150302)
gh-150178: Fix refcount leaks in hamt allocation failure paths (GH-150179)
(cherry picked from commit 32823af153)

Co-authored-by: pengyu lee <lipengyu@kylinos.cn>
2026-05-24 07:42:21 +00:00
Hai Zhu 86ffaf125f [3.14] gh-148450: abc.register needs to update type_version when tp_flags is changed (GH-148623) (#150308) 2026-05-23 12:01:57 +00:00
Miss Islington (bot) 2d94a6e85e [3.14] gh-149816: add missing critical section on self in buffered_iternext (GH-150295) (#150306)
gh-149816: add missing critical section on self in buffered_iternext (GH-150295)
(cherry picked from commit e8545ed3ea)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2026-05-23 14:56:44 +05:30
Miss Islington (bot) 67336abc50 [3.14] gh-150232: update Thread group parameter doc (GH-150283) (#150298)
gh-150232: update Thread group parameter doc (GH-150283)
(cherry picked from commit 82191c6d2c)

Co-authored-by: My-ABC <569817555@qq.com>
2026-05-23 14:04:30 +05:30
Miss Islington (bot) 6d8ea31e11 [3.14] gh-149694: Fix missing docstring on asyncio.iscoroutinefunction (GH-149696) (#149736)
[3.15] gh-149694: Fix missing docstring on `asyncio.iscoroutinefunction` (GH-149696)
(cherry picked from commit 6a66005699)

Co-authored-by: deadlovelll <128279579+deadlovelll@users.noreply.github.com>
2026-05-23 13:54:14 +05:30
Victor Stinner 0bd80a1d48 [3.14] Revert "[3.14] gh-146452: Improve locking granularity in pickle's batch_dict_… (#150062)" (#150263)
Revert "[3.14] gh-146452: Improve locking granularity in pickle's batch_dict_… (#150062)"

This reverts commit 1243cd677d.
2026-05-23 12:28:19 +05:30
Miss Islington (bot) 2dd91d2b92 [3.14] Remove 'expat' dependency for Linux in Misc/Brewfile (GH-150118) (#150253)
Co-authored-by: Brett Cannon <brett@python.org>
2026-05-22 14:28:43 +00:00
Miss Islington (bot) cc48cfca71 [3.14] gh-149902: Remove dead packaging docs link and add a new section for external resources (GH-150030) (#150240)
Co-authored-by: Mia Albert <micha@2231puppy.tech>
Co-authored-by: Stan Ulbrych <stan@python.org>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-05-22 14:41:35 +03:00
Miss Islington (bot) 6b882375ed [3.14] Replace deprecated action with RtD app (GH-149111) (#150235)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-05-22 11:13:03 +00:00
Miss Islington (bot) 58a3681fd2 [3.14] gh-137571: Protect against possible UnboundLocalError in gzip._GzipReader.read() (GH-150222) (GH-150230)
This has not been observed in practice, but we cannot be 100% sure that
it will not happen with some weird gzip data.
(cherry picked from commit 28eac9a726)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-05-22 09:46:05 +00:00
Jelle Zijlstra 954dd2fac7 [3.14] gh-149995: Update typing.py docstrings and documentation (#150216)
[3.14] gh-149995: Update typing.py docstrings and documentation (GH-149996)

Some of these docstrings read as if they were written when typing.py was
first written, and things have evolved since then.

A few motivations:
- Call protocols protocols instead of ABCs. They are also ABCs, but the fact
  they are protocols is more relevant to typing.
- Avoid recommending direct use of .__annotations__ and steer users to
  annotationlib instead.
- For TypedDict, mention NotRequired before total=False since it is more
  general and probably more frequently useful.
- For overloads, mention runtime use first instead of stub use. I think early on
  there was talk of allowing overload only in stubs, but it is now heavily used at
  runtime too and that's more likely to be relevant to users.
(cherry picked from commit f159419ae2)
2026-05-22 04:46:40 +00:00
Miss Islington (bot) fe93e90a1a [3.14] gh-148294: Make configure find g++ correctly (GH-150211)
The `AC_PATH_TOOL` calls had included a duplicated argument, causing a "`PATH`"
consisting of `notfound` to be searched instead of `$PATH`.
(cherry picked from commit c613f72eee)

Co-authored-by: sendaoYan <yansendao@126.com>
2026-05-22 02:17:56 +00:00
Miss Islington (bot) 7689952491 [3.14] gh-107398: Fix tarfile stream mode exception when process the file with the gzip extra field (GH-126304) (GH-150200)
(cherry picked from commit 65f99329ed)

Co-authored-by: Nadeshiko Manju <me@manjusaka.me>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-05-21 19:40:32 +00:00
Victor Stinner c863e96455 [3.14] gh-139808: Add branch protections for aarch64 in asm_trampoline.S (#130864) (#150189)
gh-139808: Add branch protections for aarch64 in asm_trampoline.S (#130864)

Apply protection against ROP/JOP attacks for aarch64 on asm_trampoline.S.

The BTI flag must be applied in assembler sources for this class
of attacks to be mitigated on newer aarch64 processors.

See also:
https://sourceware.org/annobin/annobin.html/Test-branch-protection.html
and
https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/enabling-pac-and-bti-on-aarch64

The 3.14 backport makes Python/jit_unwind.c changes in
Python/perf_jit_trampoline.c.


(cherry picked from commit da8477b25c)

Co-authored-by: stratakis <cstratak@redhat.com>
2026-05-21 18:41:26 +02:00
sobolevn 1d4f9ab0c6 [3.14] gh-149816: Fix a race condition in _PyBytes_FromList with free-threading (GH-149909) (#149912)
(cherry picked from commit 46afba7b93)
2026-05-21 09:53:54 +00:00
Miss Islington (bot) 25092e822a [3.14] gh-134261: ZipFile - Don't rely on local time for reproducible builds & tests (GH-134264) (#150138)
gh-134261: ZipFile - Don't rely on local time for reproducible builds & tests (GH-134264)

---------
(cherry picked from commit 9dcf94e906)

Co-authored-by: Caleb <23644849+ctrlaltf2@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Emma Smith <emma@emmatyping.dev>
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2026-05-20 12:45:25 -07:00
Miss Islington (bot) afb12ccbef [3.14] gh-150146: Fix NULL dereference in _Py_subs_parameters (GH-150147) (#150154)
gh-150146: Fix NULL dereference in `_Py_subs_parameters` (GH-150147)
(cherry picked from commit f621ba16b7)

Co-authored-by: sobolevn <mail@sobolevn.me>
2026-05-20 13:54:20 +00:00
Shamil bba6c1d9d5 [3.14] gh-142831: Fix use-after-free in json encoder during re-entrant mutation (gh-142851) (#150078)
gh-142831: Fix use-after-free in json encoder during re-entrant mutation (gh-142851)

User callbacks invoked during JSON encoding (e.g. the `default` callback or
a custom string encoder) can mutate or clear the dict or sequence being
encoded, invalidating borrowed references to items, keys, and values. Hold
strong references unconditionally while iterating.



(cherry picked from commit 235fa7244a)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2026-05-19 20:31:43 -07:00
Miss Islington (bot) accfbb693f [3.14] gh-134887: Add references to locale module for locale-aware number formatting references in string module docs (GH-134888) (GH-150121)
(cherry picked from commit 47723af4e7)

Co-authored-by: Stefanie Molin <24376333+stefmolin@users.noreply.github.com>
2026-05-20 02:55:14 +02:00
Miss Islington (bot) 2744371e4f [3.14] gh-149816: Fix SNI callback callable race (GH-150018) (GH-150100)
(cherry picked from commit 8b31d08e62)

Co-authored-by: Kirill Ignatev <kiri11@users.noreply.github.com>
2026-05-20 00:05:42 +02:00
Miss Islington (bot) dc3a0b423d [3.14] gh-150114: Reduce memory usage of test_free_threading.test_iteration (gh-150115) (#150123)
Reduce NUMITEMS from 100000 to 5000. Peak RSS for the full
test_free_threading suite drops from ~850 MB to ~175 MB.

(cherry picked from commit 61f12211fc)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2026-05-19 22:03:53 +00:00
Miss Islington (bot) 07e368879d [3.14] gh-149983: Fix PyErr_NoMemory call without GIL in winconsoleio.c (GH-149984) (GH-150111)
(cherry picked from commit 3d2aa899ba)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
2026-05-19 23:11:43 +02:00
Miss Islington (bot) afa287e4d1 [3.14] gh-69619: Clarify whitespace definition in str.strip docs (#150048)
(cherry picked from commit 17eb17d43f)

Co-authored-by: Daniil <d.mayorov@innopolis.university>
2026-05-19 18:49:12 +01:00
Armaan Vakharia fa9773ed9d [3.14] gh-149590: Remove faulthandler_traverse (GH-150023) (#150088)
`faulthandler_traverse` visits Python objects owned by `_PyRuntime`, not
by the module instance. With multi-phase init allowing multiple module
instances, each instance's GC traversal decrements `gc_refs` on the same
runtime-owned objects, driving it negative when two instances are
collected simultaneously.
(cherry picked from commit 56737483c2)
2026-05-19 15:08:58 +00:00
Saul Cooperman 1243cd677d [3.14] gh-146452: Improve locking granularity in pickle's batch_dict_… (#150062)
[3.14] gh-146452: Improve locking granularity in pickle's batch_dict_exact and fix race condition (GH-150025)

Remove assertion that could fail in rare race condition.

Replace the coarse critical section wrapping the entire function with
fine-grained sections covering only PyDict_Next + Py_INCREF.
Also handle PyDict_Next returning 0 in the single-item fast path.
(cherry picked from commit 57a0e570d3)
2026-05-19 05:34:06 -07:00
Miss Islington (bot) 8e13025747 [3.14] gh-146581: Update docs for dangerous filenames in ZIP files (GH-149994) (GH-150065)
(cherry picked from commit ba0aca3bff)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Sebastian Gassner <sebastian.gassner@gmail.com>
2026-05-19 08:43:57 +00:00
Miss Islington (bot) 1cc98b70b5 [3.14] gh-72088: clarify inspect.ismethod and inspect.isfunction (and related) usage with class-level access (GH-150013) (GH-150033)
(cherry picked from commit 0aa59ce2d4)

Co-authored-by: Stefanie Molin <24376333+stefmolin@users.noreply.github.com>
Co-authored-by: CHINMAY <89741289+Das-Chinmay@users.noreply.github.com>
2026-05-19 00:54:13 +02:00
Miss Islington (bot) fd1cf39322 [3.14] gh-95816: Fix TLS version range example in docs (GH-148574) (#150009)
gh-95816: Fix TLS version range example in docs (GH-148574)

docs(ssl): Fix TLS version range example
(cherry picked from commit dbd8985e82)

Co-authored-by: Jan Brasna <1784648+janbrasna@users.noreply.github.com>
2026-05-18 14:47:28 -07:00
Miss Islington (bot) 21a72363f9 [3.14] gh-149816: Fix a RC in _random.Random.__init__ method (GH-149824) (#149998)
gh-149816: Fix a RC in `_random.Random.__init__` method (GH-149824)
(cherry picked from commit 14af19e6c0)

Co-authored-by: sobolevn <mail@sobolevn.me>
2026-05-18 16:19:23 +00:00