Commit graph

128297 commits

Author SHA1 Message Date
Mikhail Efimov
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
Miss Islington (bot)
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 <89152624+StanFromIreland@users.noreply.github.com>
2025-11-13 18:05:09 +00:00
Mikhail Efimov
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
Miss Islington (bot)
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 <zintensitydev@gmail.com>
2025-11-13 15:15:27 +00:00
Miss Islington (bot)
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 <zintensitydev@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-11-13 15:08:35 +00:00
Miss Islington (bot)
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 <encukou@gmail.com>
2025-11-13 13:58:37 +01:00
Miss Islington (bot)
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 <storchaka@gmail.com>
2025-11-13 12:03:09 +00:00
Miss Islington (bot)
79195df23c
[3.14] gh-140260: fix data race in _struct module initialization with subinterpreters (GH-140909) (#141501)
gh-140260: fix data race in `_struct` module initialization with subinterpreters (GH-140909)
(cherry picked from commit 63548b3699)

Co-authored-by: Shamil <ashm.tech@proton.me>
2025-11-13 17:23:22 +05:30
Miss Islington (bot)
7e9400c3e6
[3.14] gh-103847: fix cancellation safety of asyncio.create_subprocess_exec (GH-140805) (#141446)
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:03:04 +05:30
Miss Islington (bot)
42e0468209
[3.14] gh-141004: Document PyRun_InteractiveOneObject (GH-141405) (GH-141485)
gh-141004: Document `PyRun_InteractiveOneObject` (GH-141405)
(cherry picked from commit 26b7df2430)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-11-12 22:58:52 +00:00
Miss Islington (bot)
0b44bc3379
[3.14] gh-124111: Fix TCL 9 thread detection (GH-141482)
(cherry picked from commit dc0987080e)

Co-authored-by: Michael Cho <michael@michaelcho.dev>
2025-11-12 22:43:31 +00:00
Miss Islington (bot)
4316180426
[3.14] gh-141442: Add escaping to iOS testbed arguments (GH-141443) (#141479)
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:15:34 +00:00
Miss Islington (bot)
996c00384d
[3.14] gh-141412: Use reliable target URL for urllib example (GH-141474)
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:20 +00:00
Miss Islington (bot)
fe3826cbaf
[3.14] gh-141004: Document Py_MATH_{E, PI, TAU} constants (GH-141373) (#141471)
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:02:38 +00:00
Miss Islington (bot)
24bf09b42c
[3.14] gh-141004: Document PyType_SUPPORTS_WEAKREFS (GH-141408) (GH-141470)
gh-141004: Document `PyType_SUPPORTS_WEAKREFS` (GH-141408)
(cherry picked from commit 9cd5427d96)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-11-12 16:44:17 +00:00
Miss Islington (bot)
ba73decce1
[3.14] gh-132657: add regression test for PySet_Contains with unhashable type (GH-141411) (#141468)
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 15:49:09 +00:00
Mohsin Mehmood
92c14a91d2
[3.14] gh-141314: Fix TextIOWrapper.tell() assertion failure with standalone carriage return (GH-141331) (GH-141453)
The assertion was checking wrong variable (skip_back vs skip_bytes).
(cherry picked from commit af80fac425)
2025-11-12 12:40:02 +02:00
Miss Islington (bot)
e9c11b7495
[3.14] gh-141042: fix sNaN's packing for mixed floating-point formats (GH-141107) (#141459)
gh-141042: fix sNaN's packing for mixed floating-point formats (GH-141107)
(cherry picked from commit 23d85a2a3f)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2025-11-12 10:33:34 +00:00
Miss Islington (bot)
75b5157e84
[3.14] gh-141311: Avoid assertion in BytesIO.readinto() (GH-141333) (GH-141457)
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)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2025-11-12 10:23:26 +00:00
Miss Islington (bot)
b883ad17cd
[3.14] gh-141370: document undefined behavior of Py_ABS() (GH-141439) (GH-141454)
(cherry picked from commit 20f53df07d)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2025-11-12 09:56:47 +00:00
Peter Bierma
604a5a6a11
[3.14] gh-141004: Document PyBytes_Repr and PyBytes_DecodeEscape (GH-141407) (GH-141440)
* 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:06:36 +00:00
Miss Islington (bot)
df045716e0
[3.14] GH-137618: Require Python 3.10 to Python 3.15 for PYTHON_FOR_REGEN (GH-137619) (#141437)
GH-137618: Require Python 3.10 to Python 3.15 for PYTHON_FOR_REGEN (GH-137619)

* Require Python 3.11 to Python 3.15 for PYTHON_FOR_REGEN

* NEWS

* keep allowing python 3.10

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

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2025-11-11 17:33:49 -08:00
Miss Islington (bot)
947354e338
[3.14] gh-138621: Increase test coverage for csv.DictReader and csv.Sniffer (GH-138622) (#141436)
gh-138621: Increase test coverage for csv.DictReader and csv.Sniffer (GH-138622)

* Increase test coverage for csv.DictReader and csv.Sniffer

Previously there were no tests for the DictReader fieldnames
setter, the case where a StopIteration was encountered when trying
to determine the fieldnames from the content or the case where
Sniffer could not find a delimiter.

* Revert whitespace change to comment

* Add a test that csv.Sniffer.has_header checks up to 20 rows

* Replace name and age with letter and offset



* Address review comment

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

Co-authored-by: Jan-Eric Nitschke <47750513+JanEricNitschke@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
2025-11-12 00:58:15 +00:00
Miss Islington (bot)
21c9c919aa
[3.14] gh-137952: update csv.Sniffer().has_header() docs to describe the actual off-by-onish behavior (GH-137953) (#141434)
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:10 -08:00
Miss Islington (bot)
83c3eae099
[3.14] gh-138775: fix handle python -m base64 stdin correct with EOF signal (GH-138776) (#141432)
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:12:57 +00:00
Miss Islington (bot)
91f33ef3c8
[3.14] gh-141004: Document PyFile_OpenCode and PyFile_OpenCodeObject (GH-141413) (GH-141425)
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:29 -05:00
Miss Islington (bot)
03fca07f83
Add documentation for Python install manager's install_dir, global_dir and download_dir (GH-140223)
(cherry picked from commit 336154f4b0)

Co-authored-by: Steve Dower <steve.dower@python.org>
2025-11-11 20:08:52 +00:00
Miss Islington (bot)
dc00dcfe88
[3.14] gh-140193: Forward port test_exec_set_nomemory_hang from 3.13 (GH-140187) (#141420)
gh-140193: Forward port test_exec_set_nomemory_hang from 3.13 (GH-140187)

* chore: test_exec_set_nomemory_hang from 3.13
* fix: apply comments
* Update Lib/test/test_exceptions.py
* Update Lib/test/test_exceptions.py
* fix: windows too long name 60 times is enough

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

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
Co-authored-by: yihong <zouzou0208@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-11-11 19:53:31 +00:00
Miss Islington (bot)
7618a40a17
[3.14] gh-139533: fix refs to code without proper markups on turtledemo doc (GH-139534) (#141421)
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:13 +00:00
Miss Islington (bot)
068bddce88
[3.14] gh-141004: Document PyType_Unwatch (GH-141414) (GH-141418)
gh-141004: Document `PyType_Unwatch` (GH-141414)
(cherry picked from commit 759a048d4b)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-11-11 17:28:14 +00:00
Sergey B Kirpichev
8b9494099a
[3.14] gh-141004: document Py_INFINITY and Py_NAN macros (GH-141145) (#141399)
(cherry picked from commit d69447445c)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-11-11 14:52:37 +01:00
Miss Islington (bot)
a468ba0a9d
[3.14] gh-140379: add hyperlinks to list and set (GH-140399) (#141386)
gh-140379: add hyperlinks to list and set (GH-140399)

add hyperlinks to list and set
(cherry picked from commit 92741c59f8)

Co-authored-by: Krishna Chaitanya <141550576+XChaitanyaX@users.noreply.github.com>
2025-11-11 06:08:45 +00:00
Miss Islington (bot)
ec836f2ad6
[3.14] gh-140485: Catch ChildProcessError in multiprocessing resource tracker (GH-141132) (#141384)
gh-140485: Catch ChildProcessError in multiprocessing resource tracker (GH-141132)
(cherry picked from commit 9cb8c52d5e)

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-11-11 05:24:24 +00:00
Miss Islington (bot)
6d31d085f0
[3.14] gh-140578: Doc: Remove sencence implying that concurrent.futures.ThreadPoolExecutor does not exist (GH-140689) (#141382)
gh-140578: Doc: Remove sencence implying that concurrent.futures.ThreadPoolExecutor does not exist (GH-140689)

* Doc: Remove sencence implying that concurrent.futures.ThreadPoolExecutor does not exist

Closes GH-140578

* Add NEWS.d entry for gh-140578

---------
(cherry picked from commit 46b58e1bb9)

Co-authored-by: Louis <paternal@users.noreply.github.com>
Co-authored-by: Louis Paternault <spalax@gresille.org>
2025-11-11 04:56:07 +00:00
Miss Islington (bot)
462e2255ef
[3.14] gh-141174: Improve annotationlib._Stringifier test coverage (GH-141220) (#141358)
gh-141174: Improve `annotationlib._Stringifier` test coverage (GH-141220)

* Test `_Stringifier.__convert_to_ast()` for containers

* Test partial evaluation of `ForwardRef`s in `_Stringifier`
(cherry picked from commit 55ea132313)

Co-authored-by: dr-carlos <77367421+dr-carlos@users.noreply.github.com>
2025-11-10 21:44:05 +00:00
Miss Islington (bot)
9a5cf6f62c
[3.14] gh-141004: Document missing frame APIs (GH-141189) (GH-141379)
gh-141004: Document missing frame APIs (GH-141189)
(cherry picked from commit 86513f6c2e)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-11-10 21:42:10 +00:00
Miss Islington (bot)
96820d872f
[3.14] gh-141004: Document PyType_FastSubclass (GH-141313) (GH-141368)
gh-141004: Document `PyType_FastSubclass` (GH-141313)
(cherry picked from commit ed0a5fd8ca)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-11-10 17:52:15 +00:00
Miss Islington (bot)
9f42519431
[3.14] GH-141212: Fix possible memory leak in gc_mark_span_push (gh-141213) (gh-141364)
(cherry picked from commit f835552946)

Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>
2025-11-10 16:55:01 +00:00
Miss Islington (bot)
63a3737ce7
[3.14] gh-139707: Specify winreg, msvcrt and winsound module availability in docs (GH-140429) (GH-141351)
(cherry picked from commit 13fa313beb)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-11-10 17:40:46 +01:00
Miss Islington (bot)
a1889959d3
[3.14] gh-141174: Improve ForwardRef test coverage (GH-141175) (#141354)
gh-141174: Improve `ForwardRef` test coverage (GH-141175)

* Test unsupported format in ForwardRef.evaluate()

* Test dict cell closure with multiple variables

* Test all options in ForwardRef repr

* Test ForwardRef being a final class
(cherry picked from commit 19b573025e)

Co-authored-by: dr-carlos <77367421+dr-carlos@users.noreply.github.com>
2025-11-10 15:19:54 +00:00
Miss Islington (bot)
4b9ed4e642
[3.14] gh-141174: Improve annotationlib.call_annotate_function() test coverage (GH-141176) (#141355)
gh-141174: Improve `annotationlib.call_annotate_function()` test coverage (GH-141176)

* Test passing unsupported Format values to call_annotate_function()

* Test call_evaluate_function with fake globals that raise errors

* Fix typo and comparison in test_fake_global_evaluation
(cherry picked from commit 1110e8f6a4)

Co-authored-by: dr-carlos <77367421+dr-carlos@users.noreply.github.com>
2025-11-10 15:19:48 +00:00
Jelle Zijlstra
727cdcba8e
[3.14] gh-137530: generate an __annotate__ function for dataclasses __init__ (GH-137711) (#141352)
(cherry picked from commit 12837c6363)

Co-authored-by: David Ellis <ducksual@gmail.com>
2025-11-10 07:14:32 -08:00
Miss Islington (bot)
9221030909
[3.14] gh-141174: Improve annotationlib.get_annotations() test coverage (GH-141286) (#141353)
gh-141174: Improve `annotationlib.get_annotations()` test coverage (GH-141286)

* Test `get_annotations(format=Format.VALUE)` for stringized annotations on custom objects

* Test `get_annotations(format=Format.VALUE)` for stringized annotations on wrapped partial functions

* Update test_stringized_annotations_with_star_unpack() to actually test stringized annotations

* Test __annotate__ returning a non-dict

* Test passing globals and locals to stringized `get_annotations()`
(cherry picked from commit 06b62282c7)

Co-authored-by: dr-carlos <77367421+dr-carlos@users.noreply.github.com>
2025-11-10 15:11:42 +00:00
Miss Islington (bot)
7618754d53
[3.14] gh-141343: Fix swapped words in sorted doc (GH-141357)
(cherry picked from commit 59b793b0dd)

Co-authored-by: Yongzi Li <204532581+Yzi-Li@users.noreply.github.com>
2025-11-10 15:01:30 +00:00
Stan Ulbrych
c12a0bef40
[3.14] gh-139707: Add docs for optional modules (GH-140171) (GH-141204)
(cherry picked from commit d2ce6d708a)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Emma Smith <emma@emmatyping.dev>
Co-authored-by: Author: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-11-10 15:20:00 +01:00
Miss Islington (bot)
44a3d6c69b
[3.14] gh-140500: Update download.html instructions (GH-141320) (#141347)
Co-authored-by: Karina Souza <97332018+KarinaS0uza@users.noreply.github.com>
Co-authored-by: Joseph Anthony Pasquale Holsten <joseph@josephholsten.com>
2025-11-10 12:45:48 +00:00
Miss Islington (bot)
c09a65914d
[3.14] gh-141004: Document pyctype.h macros (GH-141272) (GH-141340)
gh-141004: Document `pyctype.h` macros (GH-141272)
(cherry picked from commit df19261621)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-11-10 10:12:55 +00:00
Miss Islington (bot)
b5ae8082a6
[3.14] gh-141004: Document Py_DTSF_* macros (GH-141310) (GH-141329)
gh-141004: Document `Py_DTSF_*` macros (GH-141310)
(cherry picked from commit 9b0179fa87)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-11-10 00:48:48 +00:00
Miss Islington (bot)
6cbb8cb1f7
[3.14] gh-62480: De-personalize "Partial mocking" section in unittest.mock examples (GH-141321) (#141326)
gh-62480: De-personalize "Partial mocking" section in `unittest.mock` examples (GH-141321)

* Refine some wording in unittest partial mock doc

Some of the descriptions were addressed in first person,
but have now been changed to address the user reading the documentation instead.
(cherry picked from commit b618731781)

Co-authored-by: KarnbirKhera <166065758+KarnbirKhera@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2025-11-09 18:08:30 -06:00
Miss Islington (bot)
5c345ed61a
[3.14] gh-62480: De-personalize "Mocking Unbound Methods" section in unittest.mock examples (GH-141322) (#141324)
gh-62480: De-personalize "Mocking Unbound Methods" section in `unittest.mock` examples (GH-141322)

* Rewrite Mocking Unbound Methods paragraph to second person
(cherry picked from commit ec85d3cbfe)

Co-authored-by: Elena O <31424287+oklena@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-11-09 17:51:07 -06:00