Commit Graph
128340 Commits
Author SHA1 Message Date
59fa59e381 [3.14] gh-141004: Document Py_MakePendingCalls (GH-141137) (GH-141787)
gh-141004: Document `Py_MakePendingCalls` (GH-141137)
(cherry picked from commit ce701032a3)

Co-authored-by: Peter Bierma <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
2025-11-20 13:48:11 +00:00
daf98fe5bd [3.14] gh-141757: Comply with pickle protocol in test_reduce_5tuple (GH-141759) (GH-141782)
The 5th element of the __reduce__ tuple should be an iterator.
(cherry picked from commit 41b9ad5b38)

Co-authored-by: Arseny Boykov <[email protected]>
2025-11-20 09:22:52 +00:00
83cfd87568 [3.14] gh-141489: Simplify closure/freevar iteration in annotationlib._build_closure() (GH-141490) (#141776)
gh-141489: Simplify closure/freevar iteration in `annotationlib._build_closure()` (GH-141490)
(cherry picked from commit a35c683da5)

Co-authored-by: dr-carlos <[email protected]>
2025-11-20 04:33:18 +00:00
072eeaf84c [3.14] gh-132657: optimize PySet_Contains for frozenset (GH-141183) (gh-141773)
(cherry picked from commit 7211a34fe1)

Co-authored-by: Kumar Aditya <[email protected]>
2025-11-19 17:01:49 -08:00
c05e71f61e [3.14] gh-132657: avoid locks and refcounting in frozenset lookups (GH-136107) (gh-141772)
gh-132657: avoid locks and refcounting in `frozenset` lookups (GH-136107)
(cherry picked from commit f58a7c7175)

Co-authored-by: Pieter Eendebak <[email protected]>
2025-11-19 17:00:42 -08:00
f6552d2c58 [3.14] Remove GvR from '_stdauthor' in Doc/conf.py (GH-141765) (#141767)
Co-authored-by: Guido van Rossum <[email protected]>
Co-authored-by: Guido van Rossum <[email protected]>
2025-11-19 20:36:24 +00:00
8eed63e973 [3.14] Move the NEWS entry for gh-141659 to the correct section (GH-141744) (GH-141766)
(cherry picked from commit fbc31d14ff)

Co-authored-by: Ayappan Perumal <[email protected]>
2025-11-19 20:17:51 +00:00
d05be32758 [3.14] gh-141004: Document Py_LOCAL and Py_LOCAL_INLINE (GH-141725) (GH-141761)
gh-141004: Document `Py_LOCAL` and `Py_LOCAL_INLINE` (GH-141725)
(cherry picked from commit 3149d64c93)

Co-authored-by: Stan Ulbrych <[email protected]>
2025-11-19 18:38:09 +00:00
b7c25eabd6 [3.14] gh-139103: fix free-threading dataclass.__init__ perf issue (gh-141596) (gh-141750)
The dataclasses `__init__` function is generated dynamically by a call to `exec()` and so doesn't have deferred reference counting enabled. Enable deferred reference counting on functions when assigned as an attribute to type objects to avoid reference count contention when creating dataclass instances.
(cherry picked from commit ce79154176)

Co-authored-by: Edward Xu <[email protected]>
2025-11-19 15:00:51 +00:00
8c796889ff [3.14] gh-141570: can_colorize: Expect fileno() to raise OSError, as documented (GH-141716) (#141747)
gh-141570: can_colorize: Expect fileno() to raise OSError, as documented (GH-141716)

In Fedora, we've been given a slightly incomplete reproducer for a problematic
Python 3.14 color-related change in argparse that leads to an exception when
Python is used from mod_wsgi: https://bugzilla.redhat.com/2414940

mod_wsgi replaces sys.stdout with a custom object that raises OSError on .fileno():

https://github.com/GrahamDumpleton/mod_wsgi/blob/8460dbfcd5c7108892b3cde9fab7cbc1caa27886/src/server/wsgi_logger.c#L434-L440

This should be supported, as the documentation of fileno explicitly says:

> An OSError is raised if the IO object does not use a file descriptor.

https://docs.python.org/3.14/library/io.html#io.IOBase.fileno

The previously expected exception inherits from OSError,
so it is still expected.

Fixes https://github.com/python/cpython/issues/141570
(cherry picked from commit 96f496a949)

Co-authored-by: Miro Hrončok <[email protected]>
Co-authored-by: Cody Maloney <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
2025-11-19 14:29:15 +00:00
562e23f9d5 [3.14] gh-140875: Fix handling of unclosed charrefs before EOF in HTMLParser (GH-140904) (GH-141745)
(cherry picked from commit 95296a9d40)

Co-authored-by: Serhiy Storchaka <[email protected]>
2025-11-19 12:43:24 +00:00
36ad4be1d9 [3.14] Correct class name from PullDom to PullDOM (GH-141207) (#141743)
Co-authored-by: Guo Ci <[email protected]>
2025-11-19 13:07:01 +02:00
ff8829892a [3.14] gh-138189: Link references to type slots (GH-141410) (GH-141718)
(cherry picked from commit 4695ec109d)

Co-authored-by: Petr Viktorin <[email protected]>
2025-11-19 10:30:11 +01:00
7cb15f93fe [3.14] gh-141659: Fix bad file descriptor error in subprocess on AIX (GH-141660) (GH-141738)
/proc/self does not exist on AIX.
(cherry picked from commit 92c5de73b8)

Co-authored-by: Ayappan Perumal <[email protected]>
2025-11-19 08:05:01 +00:00
daff2a9c3c [3.14] gh-141692: Add a slice-specific lib folder to iOS XCframeworks. (GH-141693) (#141733)
Modifies the iOS XCframework to include a lib folder for each slice that
contains a symlinked version of the libPython dynamic library.
(cherry picked from commit 7b0b708675)

Co-authored-by: Russell Keith-Magee <[email protected]>
2025-11-19 02:25:34 +00:00
9543c2efc3 [3.14] gh-141691: Apply ruff rules to Apple folder. (GH-141694) (#141728)
Add ruff configuration to run over the Apple build tooling and testbed script.
(cherry picked from commit 17636ba48c)

Co-authored-by: Russell Keith-Magee <[email protected]>
2025-11-18 23:14:31 +00:00
ed5c854c6a [3.14] gh-141004: Document Py_HUGE_VAL/IS_FINITE/IS_INFINITE/IS_NAN (GH-141544) (#141698)
(cherry picked from commit 630cd37bfa)

Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]>
2025-11-18 14:32:44 +01:00
Serhiy StorchakaandGitHub d89eb2f984 [3.14] gh-140873: Fix the singledispatchmethod documentation (GH-141523)
It does not support non-descriptor callables yet.
2025-11-18 13:16:39 +02:00
3388413fc5 [3.14] Add missing backticks in os and decimal docs (GH-141699) (#141705)
Co-authored-by: Mariusz Felisiak <[email protected]>
2025-11-18 10:37:49 +00:00
cf2524f2b7 [3.14] gh-141004: Document Py_MEMCPY (GH-141676) (GH-141685)
gh-141004: Document `Py_MEMCPY` (GH-141676)
(cherry picked from commit 16ea9505ce)

Co-authored-by: Stan Ulbrych <[email protected]>
2025-11-17 22:57:47 +00:00
aa887aa2a8 [3.14] gh-141004: Document PyODict* APIs (GH-141136) (GH-141677)
gh-141004: Document `PyODict*` APIs (GH-141136)
(cherry picked from commit b3626321b6)

Co-authored-by: Peter Bierma <[email protected]>
2025-11-17 19:46:23 +00:00
060118ae91 [3.14] gh-141497: Make ipaddress.IP{v4,v6}Network.hosts() always returning an iterator (GH-141547) (GH-141673)
(cherry picked from commit 6b1bdf6c7a)

Co-authored-by: Krishna Chaitanya <[email protected]>
2025-11-17 17:56:55 +00:00
Serhiy StorchakaandGitHub 8db1aadd65 [3.14] gh-130693: Add more tests for tkinter.Text.search() (GH-130848) (GH-141669) 2025-11-17 16:26:30 +00:00
cc315dc6d4 [3.14] gh-130160: Add anchors to CLI Usage section for cmdline (GH-133182) (#141664)
Co-authored-by: Semyon Moroz <[email protected]>
2025-11-17 14:57:26 +00:00
cf141ab1b8 [3.14] fix memory order of _Py_atomic_store_uint_release (GH-141562) (GH-141663)
(cherry picked from commit 7800b78067)

Co-authored-by: SubbaraoGarlapati <[email protected]>
2025-11-17 14:38:00 +00:00
eeb5fbf5f7 [3.14] gh-141650: Fix typo in xml.sax.saxutils.unescape documentation (GH-141652) (#141654)
Co-authored-by: Tamzin Hadasa Kelly <[email protected]>
2025-11-17 13:02:03 +00:00
eead7b43bc [3.14] gh-136057: Allow step and next to step over for loops (GH-136160) (#141640)
gh-136057: Allow step and next to step over for loops (GH-136160)
(cherry picked from commit 8be3b2f479)

Co-authored-by: Tian Gao <[email protected]>
2025-11-16 22:22:11 +00:00
Gregory P. SmithandGitHub 0d8fb0b852 [3.14] gh-137109: refactor warning about threads when forking (GH-141438) (GH-141614)
This splits the OS API specific functionality to get the number of threads out
from the fallback Python method and warning raising code itself.  This way the
OS APIs can be queried before we've run
`os.register_at_fork(after_in_parent=...)` registered functions which
themselves may (re)start threads that would otherwise be detected.

This is best effort.  If the OS APIs are either unavailable or fail, the
warning generating code still falls back to looking at the Python threading
state after the CPython interpreter world has been restarted and the
after_in_parent calls have been made.  The common case for most Linux and macOS
environments should work today.

This also lines up with the existing TODO refactoring, we may choose to expose
this API to get the number of OS threads in the `os` module in the future.

Note: This is a simplified backport that maintains the void return type
for warn_about_fork_with_threads() and keeps PyErr_Clear() in the warning path,
as the error handling changes from fd8f42d3d1 are not needed in 3.14.
2025-11-16 19:45:29 +00:00
Tian GaoandGitHub 58c9d25675 [3.14] gh-125115 : Refactor the pdb parsing issue so positional arguments can pass through (GH-140933) (#141635)
(cherry-picked from commit 5348c200f5)
2025-11-16 19:35:42 +00:00
c9eb5cb1c0 [3.14] gh-141004: Document missing PyCFunction* and PyCMethod* APIs (GH-141253) (GH-141637)
gh-141004: Document missing `PyCFunction*` and `PyCMethod*` APIs (GH-141253)
(cherry picked from commit be699d6c7c)

Co-authored-by: Peter Bierma <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>
2025-11-16 19:31:25 +00:00
10db8ee968 [3.14] gh-141004: Document the PyPickleBuffer_* C API (GH-141630) (GH-141632)
gh-141004: Document the `PyPickleBuffer_*` C API (GH-141630)
(cherry picked from commit e33afa7ddb)

Co-authored-by: Stan Ulbrych <[email protected]>
Co-authored-by: Peter Bierma <[email protected]>
2025-11-16 18:56:41 +00:00
79c136f87b [3.14] GH-141312: Allow only integers to longrangeiter_setstate state (GH-141317) (GH-141559)
This fixes an assertion error when the new computed start is not an integer.
(cherry picked from commit 10bec7c1eb)

Co-authored-by: Sergey Miryanov <[email protected]>
2025-11-15 21:30:25 +02:00
21e43d5e83 [3.14] GH-141509: Fix warning about remaining subinterpreters (GH-141528) (GH-141566)
(cherry picked from commit fa245df4a0)

Co-authored-by: Peter Bierma <[email protected]>
2025-11-15 13:56:52 -05:00
8a67e3c2b0 [3.14] gh-140938: Raise ValueError for infinite inputs to stdev/pstdev (GH-141531) (#141575)
gh-140938: Raise ValueError for infinite inputs to stdev/pstdev (GH-141531)

Raise ValueError for infinite inputs to stdev/pstdev
(cherry picked from commit f0a8bc737a)



---

Co-authored-by: Raymond Hettinger <[email protected]>
Co-authored-by: Gregory P. Smith <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>
2025-11-14 18:58:40 -08:00
17e7aad5e3 [3.14] gh-141579: Fix perf_jit backend in sys.activate_stack_trampoline() (GH-141580) (#141581)
Co-authored-by: Pablo Galindo Salgado <[email protected]>
2025-11-15 02:49:54 +00:00
d582b6f1ab [3.14] gh-136442: Fix unittest to return exit code 5 when setUpClass raises an exception (GH-136487) (#141576)
gh-136442: Fix unittest to return exit code 5 when setUpClass raises an exception (GH-136487)
(cherry picked from commit 53d65c840e)

Co-authored-by: Takuya UESHIN <[email protected]>
2025-11-15 01:25:19 +00:00
a2442fda6e [3.14] GH-139596: Cease caching config.cache & ccache in GH Actions (#141429)
Co-authored-by: Hugo van Kemenade <[email protected]>
2025-11-14 21:25:33 +02:00
1cde019ecd [3.14] gh-114203: skip locking if object is already locked by two-mutex critical section (GH-141476) (#141564)
gh-114203: skip locking if object is already locked by two-mutex critical section (GH-141476)
(cherry picked from commit f26ed455d5)

Co-authored-by: Kumar Aditya <[email protected]>
2025-11-14 18:38:30 +00:00
959578e5d1 [3.14] gh-140691: urllib.request: Close FTP control socket if data socket can't connect (GH-140835) (GH-141555)
(cherry picked from commit f2bce51b98)

Co-authored-by: Petr Viktorin <[email protected]>
Co-authored-by: codenamenam <[email protected]>
2025-11-14 17:27:33 +01:00
2f23c88243 [3.14] gh-139344: Remove pending removal notice for undeprecated importlib.resources API (GH-141507) (GH-141558)
(cherry picked from commit 49e74210cb)

Co-authored-by: Petr Viktorin <[email protected]>
2025-11-14 16:32:05 +01:00
dbe64ee95f Add PyManager troubleshooting steps for direct launch of script files (GH-141530)
(cherry picked from commit b101e9d36b)

Co-authored-by: Steve Dower <[email protected]>
2025-11-14 15:29:39 +00:00
72a8ea773b [3.14] gh-141004: Document PyOS_InterruptOccurred (GH-141526) (GH-141549)
gh-141004: Document `PyOS_InterruptOccurred` (GH-141526)
(cherry picked from commit ef90261be5)

Co-authored-by: Stan Ulbrych <[email protected]>
2025-11-14 11:26:37 +00:00
dd28db664b [3.14] gh-137969: Fix double evaluation of ForwardRefs which rely on globals (GH-140974) (#141527)
gh-137969: Fix double evaluation of `ForwardRef`s which rely on globals (GH-140974)
(cherry picked from commit 209eaff68c)

Co-authored-by: dr-carlos <[email protected]>
2025-11-13 13:26:58 -08:00
Mikhail EfimovandGitHub af20b880fc [3.14] gh-140104: Set next_instr properly in the JIT during exceptions (GH-140233) (GH-141495) 2025-11-13 18:47:25 +00:00
c5e0ce73f9 [3.14] gh-141004: Document PyErr_RangedSyntaxLocationObject (GH-141521) (#141525)
gh-141004: Document `PyErr_RangedSyntaxLocationObject` (GH-141521)

PyErr_RangedSyntaxLocationObject
(cherry picked from commit 196f1519cd)

Co-authored-by: Stan Ulbrych <[email protected]>
2025-11-13 18:05:09 +00:00
Mikhail EfimovandGitHub 48b7d75aaf [3.14] gh-140936: Fix JIT assertion crash at finalization if some generator is alive (GH-140969) (GH-141494)
gh-140936: Fix JIT assertion crash at finalization if some generator is alive (GH-140969)
2025-11-13 16:11:57 +00:00
425e423f9f [3.14] gh-141004: Document PyCode_Optimize (GH-141378) (GH-141514)
gh-141004: Document `PyCode_Optimize` (GH-141378)
(cherry picked from commit d7862e9b1b)

Co-authored-by: Peter Bierma <[email protected]>
2025-11-13 15:15:27 +00:00
f43e5955eb [3.14] gh-141004: Document C APIs for dictionary keys, values, and items (GH-141009) (GH-141512)
gh-141004: Document C APIs for dictionary keys, values, and items (GH-141009)
(cherry picked from commit f72768f30e)

Co-authored-by: Peter Bierma <[email protected]>
Co-authored-by: Petr Viktorin <[email protected]>
2025-11-13 15:08:35 +00:00
55cf97d8dd [3.14] gh-140748: socket_helper.transient_internet: Unwrap UrlError.__cause__ (GH-140749) (GH-141505)
(cherry picked from commit 75a1cbdd38)

Co-authored-by: Petr Viktorin <[email protected]>
2025-11-13 13:58:37 +01:00
7b8c257933 [3.14] gh-140601: Refactor ElementTree.iterparse() tests (GH-141499) (GH-141502)
Split existing tests on smaller methods and move them to separate class.
Rename variable "content" to "it".
Use BytesIO instead of StringIO.
Add few more tests.
(cherry picked from commit 2fbd396666)

Co-authored-by: Serhiy Storchaka <[email protected]>
2025-11-13 12:03:09 +00:00