Commit graph

125180 commits

Author SHA1 Message Date
Miss Islington (bot)
7a27c7b2e4
[3.13] gh-141004: Document missing PyDateTime* APIs (GH-141543) (GH-141792)
gh-141004: Document missing `PyDateTime*` APIs (GH-141543)
(cherry picked from commit 4273616ebf)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-11-20 13:55:17 +00:00
Miss Islington (bot)
e90d8953a0
[3.13] gh-141004: Document missing generator APIs (GH-141409) (GH-141790)
gh-141004: Document missing generator APIs (GH-141409)
(cherry picked from commit 2da7ecc680)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-11-20 13:52:36 +00:00
Miss Islington (bot)
fd1e3fe15f
[3.13] gh-141757: Comply with pickle protocol in test_reduce_5tuple (GH-141759) (GH-141783)
The 5th element of the __reduce__ tuple should be an iterator.
(cherry picked from commit 41b9ad5b38)

Co-authored-by: Arseny Boykov <36469655+Bobronium@users.noreply.github.com>
2025-11-20 09:20:00 +00:00
Miss Islington (bot)
2ebe685702
[3.13] Remove GvR from '_stdauthor' in Doc/conf.py (GH-141765) (#141768)
Co-authored-by: Guido van Rossum <guido@python.org>
Co-authored-by: Guido van Rossum <gvanrossum@microsoft.com>
2025-11-19 20:36:32 +00:00
Miss Islington (bot)
49ac2bbe02
[3.13] gh-141004: Document Py_LOCAL and Py_LOCAL_INLINE (GH-141725) (GH-141762)
gh-141004: Document `Py_LOCAL` and `Py_LOCAL_INLINE` (GH-141725)
(cherry picked from commit 3149d64c93)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-11-19 18:38:53 +00:00
Victor Stinner
a0cbdd84af
[3.13] gh-141570: can_colorize: Expect fileno() to raise OSError, as documented (#141716) (#141748)
gh-141570: can_colorize: Expect fileno() to raise OSError, as documented (#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():

8460dbfcd5/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 <miro@hroncok.cz>
Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2025-11-19 14:28:31 +00:00
Miss Islington (bot)
c7064e7d6b
[3.13] gh-140875: Fix handling of unclosed charrefs before EOF in HTMLParser (GH-140904) (GH-141746)
(cherry picked from commit 95296a9d40)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-11-19 12:17:54 +00:00
Miss Islington (bot)
26d831327d
[3.13] Correct class name from PullDom to PullDOM (GH-141207) (#141742)
Co-authored-by: Guo Ci <zguoci@gmail.com>
2025-11-19 13:07:07 +02:00
Sergey B Kirpichev
a5650e42ac
[3.13] gh-141004: Document Py_HUGE_VAL/IS_FINITE/IS_INFINITE/IS_NAN (GH-141544) (#141700)
(cherry picked from commit 630cd37bfa)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-11-18 14:32:48 +01:00
Petr Viktorin
1bca1b4da4
[3.13] gh-140691: urllib.request: Close FTP control socket if data socket can't connect (GH-140835) (GH-141657)
(cherry picked from commit f2bce51b98)

Co-authored-by: codenamenam <bluetire27@gmail.com>
2025-11-18 13:34:40 +01:00
Miss Islington (bot)
8f7188847f
[3.13] gh-140873: Fix the singledispatchmethod documentation (GH-141523) (GH-141710)
It does not support non-descriptor callables yet.
(cherry picked from commit d89eb2f984)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-11-18 11:38:38 +00:00
Miss Islington (bot)
b41963a4aa
[3.13] Add missing backticks in os and decimal docs (GH-141699) (#141706)
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2025-11-18 10:38:16 +00:00
Krishna Chaitanya
7b3312747f
[3.13] gh-141497: Make ipaddress.IP{v4,v6}Network.hosts() always returning an iterator (GH-141547) (GH-141695)
(cherry picked from commit 6b1bdf6c7a)

Co-authored-by: Krishna Chaitanya <141550576+XChaitanyaX@users.noreply.github.com>
2025-11-18 11:43:15 +02:00
Miss Islington (bot)
d4e4924a5f
[3.13] gh-141004: Document PyODict* APIs (GH-141136) (GH-141678)
gh-141004: Document `PyODict*` APIs (GH-141136)
(cherry picked from commit b3626321b6)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-11-17 19:47:04 +00:00
Semyon Moroz
a63ceb7f10
[3.13] gh-130160: Add anchors to CLI Usage section for cmdline (GH-133182) (#141667)
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
2025-11-17 19:55:54 +02:00
Miss Islington (bot)
0280744723
[3.13] gh-130693: Add more tests for tkinter.Text.search() (GH-130848) (GH-141669) (GH-141670)
(cherry picked from commit 8db1aadd65)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-11-17 16:49:41 +00:00
Miss Islington (bot)
8d4e94ec6c
[3.13] gh-141650: Fix typo in xml.sax.saxutils.unescape documentation (GH-141652) (#141653)
Co-authored-by: Tamzin Hadasa Kelly <tk.infinity@gmail.com>
2025-11-17 13:02:01 +00:00
Miss Islington (bot)
61a24ea572
[3.13] gh-137109: refactor warning about threads when forking (GH-141438) (GH-141614) (GH-141639)
[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.
(cherry picked from commit 0d8fb0b852)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
2025-11-16 19:26:34 -08:00
Tian Gao
7beb7e8d35
[3.13] gh-136057: Allow step and next to step over for loops (GH-136160) (#141641)
(cherry picked from commit 8be3b2f479)
2025-11-16 22:23:03 +00:00
Miss Islington (bot)
e6f429c30d
[3.13] gh-141004: Document missing PyCFunction* and PyCMethod* APIs (GH-141253) (GH-141638)
gh-141004: Document missing `PyCFunction*` and `PyCMethod*` APIs (GH-141253)
(cherry picked from commit be699d6c7c)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-11-16 19:32:16 +00:00
Miss Islington (bot)
7b5c65a32f
[3.13] gh-141004: Document the PyPickleBuffer_* C API (GH-141630) (GH-141633)
gh-141004: Document the `PyPickleBuffer_*` C API (GH-141630)
(cherry picked from commit e33afa7ddb)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-11-16 18:58:19 +00:00
Sergey Miryanov
cbeada9ec7
[3.13] GH-141312: Allow only integers to longrangeiter_setstate state (GH-141317) (GH-141568)
This fixes an assertion error when the new computed start is not an integer.
(cherry picked from commit 10bec7c1eb)
2025-11-15 21:14:17 +02:00
Gregory P. Smith
b693037040
[3.13] gh-140938: Raise ValueError for infinite inputs to stdev/pstdev (GH-141531) (#141584)
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 <rhettinger@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-11-15 04:45:28 +00:00
Pablo Galindo Salgado
7e1a0dbc07
[3.13] gh-141579: Fix perf_jit backend in sys.activate_stack_trampoline() (GH-141580) (#141582) 2025-11-15 03:17:49 +00:00
Miss Islington (bot)
fb7ae3fe83
[3.13] gh-136442: Fix unittest to return exit code 5 when setUpClass raises an exception (GH-136487) (#141577)
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 <ueshin@happy-camper.st>
2025-11-15 01:23:03 +00:00
Hugo van Kemenade
76db223ff8
[3.13] GH-139596: Cease caching config.cache & ccache in GH Actions (GH-141429) (#141569)
(cherry picked from commit a2442fda6e)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
2025-11-14 14:51:36 -08:00
Miss Islington (bot)
9648eed33f
[3.13] gh-139344: Remove pending removal notice for undeprecated importlib.resources API (GH-141507) (GH-141557)
(cherry picked from commit 49e74210cb)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-11-14 17:24:37 +01:00
Miss Islington (bot)
c8c8cc2e8f
[3.13] gh-141004: Document PyOS_InterruptOccurred (GH-141526) (GH-141550)
gh-141004: Document `PyOS_InterruptOccurred` (GH-141526)
(cherry picked from commit ef90261be5)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-11-14 15:58:19 +00:00
Miss Islington (bot)
baa9216159
[3.13] gh-141004: Document PyErr_RangedSyntaxLocationObject (GH-141521) (#141524)
gh-141004: Document `PyErr_RangedSyntaxLocationObject` (GH-141521)

PyErr_RangedSyntaxLocationObject
(cherry picked from commit 196f1519cd)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-11-13 18:05:43 +00:00
Miss Islington (bot)
c86f5d3ebe
[3.13] gh-141004: Document PyCode_Optimize (GH-141378) (GH-141515)
gh-141004: Document `PyCode_Optimize` (GH-141378)
(cherry picked from commit d7862e9b1b)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-11-13 15:14:32 +00:00
Miss Islington (bot)
c38d8607d2
[3.13] gh-141004: Document C APIs for dictionary keys, values, and items (GH-141009) (GH-141513)
gh-141004: Document C APIs for dictionary keys, values, and items (GH-141009)
(cherry picked from commit f72768f30e)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-11-13 15:09:23 +00:00
Miss Islington (bot)
f50989f3cb
[3.13] gh-140748: socket_helper.transient_internet: Unwrap UrlError.__cause__ (GH-140749) (GH-141506)
(cherry picked from commit 75a1cbdd38)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-11-13 13:58:46 +01:00
Petr Viktorin
6916bfb800
[3.13] gh-138189: Document type slots, and other constants, as part of Limited API (GH-138190) (GH-141193)
(cherry picked from commit d81e1ef0f3)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-11-13 13:28:57 +01:00
Miss Islington (bot)
72b6ff0a85
[3.13] gh-140601: Refactor ElementTree.iterparse() tests (GH-141499) (GH-141503)
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 <storchaka@gmail.com>
2025-11-13 11:57:58 +00:00
Miss Islington (bot)
e5b82c433c
[3.13] gh-103847: fix cancellation safety of asyncio.create_subprocess_exec (GH-140805) (#141447)
gh-103847: fix cancellation safety of `asyncio.create_subprocess_exec` (GH-140805)
(cherry picked from commit ef474cfafb)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-11-13 17:05:01 +05:30
Peter Bierma
39de3f87c1
[3.13] gh-141004: Document PyType_SUPPORTS_WEAKREFS (GH-141408) (GH-141487)
* gh-141004: Document `PyType_SUPPORTS_WEAKREFS` (GH-141408)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
(cherry picked from commit 9cd5427d96)
2025-11-12 23:02:58 +00:00
Miss Islington (bot)
f127ff7daf
[3.13] gh-141004: Document PyRun_InteractiveOneObject (GH-141405) (GH-141486)
gh-141004: Document `PyRun_InteractiveOneObject` (GH-141405)
(cherry picked from commit 26b7df2430)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-11-12 22:59:55 +00:00
Miss Islington (bot)
83bd8689aa
[3.13] gh-124111: Fix TCL 9 thread detection (GH-141483)
(cherry picked from commit dc0987080e)

Co-authored-by: Michael Cho <michael@michaelcho.dev>
2025-11-12 22:44:01 +00:00
Miss Islington (bot)
6aeb0d5b2a
[3.13] gh-141442: Add escaping to iOS testbed arguments (GH-141443) (#141480)
Xcode concatenates the test argument array, losing quoting in the process.
(cherry picked from commit 558936bec1)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2025-11-12 22:03:51 +00:00
Cody Maloney
7c62bd571b
[3.13] gh-141311: Avoid assertion in BytesIO.readinto() (GH-141333) (GH-141478)
Fix error in assertion which causes failure if pos is equal to PY_SSIZE_T_MAX.
Fix undefined behavior in read() and readinto() if pos is larger that the size
of the underlying buffer.
(cherry picked from commit 7d54374f9c)
2025-11-12 23:37:06 +02:00
Miss Islington (bot)
fffd38b2dd
[3.13] gh-141412: Use reliable target URL for urllib example (GH-141475)
The endpoint used for demonstrating reading URLs is no longer
stable. This change substitutes a target over which we have more
control.
(cherry picked from commit fbcac79951)

Co-authored-by: Bob Kline <bkline@users.noreply.github.com>
2025-11-12 18:40:22 +00:00
Miss Islington (bot)
7ca34db12b
[3.13] gh-141004: Document Py_MATH_{E, PI, TAU} constants (GH-141373) (#141472)
gh-141004: Document `Py_MATH_{E, PI, TAU}` constants (GH-141373)
(cherry picked from commit f1330b35b8)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-11-12 17:03:55 +00:00
Miss Islington (bot)
18b883b9e9
[3.13] gh-132657: add regression test for PySet_Contains with unhashable type (GH-141411) (#141467)
gh-132657: add regression test for `PySet_Contains` with unhashable type (GH-141411)
(cherry picked from commit 2ac738d325)

Co-authored-by: M Bussonnier <bussonniermatthias@gmail.com>
2025-11-12 21:12:18 +05:30
Mohsin Mehmood
8402c28f11
[3.13] gh-141314: Fix TextIOWrapper.tell() assertion failure with standalone carriage return (GH-141331) (GH-141452)
The assertion was checking wrong variable (skip_back vs skip_bytes).
(cherry picked from commit af80fac425)
2025-11-12 12:40:14 +02:00
Miss Islington (bot)
c317cf51f1
[3.13] gh-141370: document undefined behavior of Py_ABS() (GH-141439) (GH-141455)
(cherry picked from commit 20f53df07d)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2025-11-12 09:57:08 +00:00
Peter Bierma
51c60f3681
[3.13] gh-141004: Document PyBytes_Repr and PyBytes_DecodeEscape (GH-141407) (GH-141441)
* gh-141004: Document `PyBytes_Repr` and `PyBytes_DecodeEscape` (GH-141407)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
(cherry picked from commit 37e2762ee1)
2025-11-12 02:08:28 +00:00
Miss Islington (bot)
aec6b72297
[3.13] gh-137952: update csv.Sniffer().has_header() docs to describe the actual off-by-onish behavior (GH-137953) (#141435)
gh-137952: update `csv.Sniffer().has_header()` docs to describe the actual off-by-onish behavior (GH-137953)

* checks 21, not 20
* Say "header" instead of "first row" to disambiguate per review.

---------
(cherry picked from commit 0d7b48a8f5)

Co-authored-by: Maurycy Pawłowski-Wieroński <maurycy@maurycy.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-11-11 16:13:19 -08:00
Miss Islington (bot)
54f620cc7f
[3.13] gh-138775: fix handle python -m base64 stdin correct with EOF signal (GH-138776) (#141433)
gh-138775: fix handle `python -m base64` stdin correct with EOF signal (GH-138776)

* fix: handle  stdin correct with EOF single.
* fix: flollow the comments when pipe stdin use buffer
* Apply suggestions from code review
* fix: apply review comments in Lib/base64.py
* fix: address comments
* Reword comment and NEWS entry.

---------
(cherry picked from commit f5c2a41f9a)

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
Co-authored-by: yihong <zouzou0208@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2025-11-12 00:10:07 +00:00
Miss Islington (bot)
b28ba31c69
[3.13] gh-141004: Document PyFile_OpenCode and PyFile_OpenCodeObject (GH-141413) (GH-141426)
gh-141004: Document `PyFile_OpenCode` and `PyFile_OpenCodeObject` (GH-141413)
(cherry picked from commit 2befce86e6)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-11-11 16:48:36 -05:00
Miss Islington (bot)
305e9c5fc4
[3.13] gh-139533: fix refs to code without proper markups on turtledemo doc (GH-139534) (#141422)
gh-139533: fix refs to code without proper markups on turtledemo doc (GH-139534)
(cherry picked from commit c903d76832)


gh-139533: fix refs to code without proper markups on turtledemo documentation

Co-authored-by: Marco Barbosa <aureliobarbosa@gmail.com>
2025-11-11 19:42:01 +00:00