Commit graph

128537 commits

Author SHA1 Message Date
Miss Islington (bot)
4424d1b38f
[3.14] gh-142754: Ensure that Element & Attr instances have the ownerDocument attribute (GH-142794) (#142818)
gh-142754: Ensure that Element & Attr instances have the ownerDocument attribute (GH-142794)
(cherry picked from commit 1cc7551b3f)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-12-20 15:56:47 -08:00
Miss Islington (bot)
586047a8d8
[3.14] gh-143012: use Py_ssize_t cast for PyBytes_FromStringAndSize (GH-143013) (#143014)
gh-143012: use `Py_ssize_t` cast for `PyBytes_FromStringAndSize` (GH-143013)
(cherry picked from commit 5989095dfd)

Co-authored-by: AZero13 <gfunni234@gmail.com>
2025-12-20 08:02:44 +00:00
stratakis
dcbde6b792
[3.14] gh-142776: Ensure fp file descriptor is closed on all code paths in import.c (GH-142777) (#142988)
gh-142776: Ensure fp file descriptor is closed on all code paths in import.c (GH-142777)

(cherry picked from commit 6a4f10325d)
2025-12-20 12:49:23 +05:30
Miss Islington (bot)
dbc7fd61d8
[3.14] gh-142560: prevent use-after-free in search-like methods by exporting buffer in bytearray (GH-142938) (#142983)
gh-142560: prevent use-after-free in search-like methods by exporting buffer in bytearray (GH-142938)
(cherry picked from commit 220f0b1077)

Co-authored-by: wangxiaolei <fatelei@gmail.com>
2025-12-19 16:58:24 +00:00
Miss Islington (bot)
b46ce52a53
[3.14] gh-142527: Docs: Clarify that random.seed() discards the sign of an integer input (GH-142483) (#142970)
gh-142527: Docs: Clarify that random.seed() discards the sign of an integer input (GH-142483)

If *a* is an integer, the sign of *a* is discarded in the C source code. Clarify this behavior to prevent foot guns, where a common use case might naively assume that flipping the sign will produce different sequences (e.g. for a train/test split of a synthetic data generator in machine learning).
(cherry picked from commit 610aabfef2)

Co-authored-by: Andrej <andrej.karpathy@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-12-19 08:34:54 +00:00
Miss Islington (bot)
e48fb94d8c
[3.14] gh-118342: [Enum] update docs (GH-137290) (GH-142953)
gh-118342: [Enum] update docs (GH-137290)

(cherry picked from commit e79c39101a)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-12-18 11:18:46 -08:00
Miss Islington (bot)
f1288d353f
[3.14] gh-142681: Move NormalizationTest-3.2.0.txt to more safe place. (GH-142935) (GH-142944)
(cherry picked from commit 4a8ecbad80)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-12-18 18:34:05 +01:00
Miss Islington (bot)
f02231b8a0
[3.14] gh-142784: make the asyncio REPL call loop.close() at exit (GH-142785) (#142933)
gh-142784: make the asyncio REPL call `loop.close()` at exit (GH-142785)
(cherry picked from commit ddfc155d3a)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2025-12-18 19:25:50 +05:30
Miss Islington (bot)
693d8a1a10
[3.14] gh-137063: Document that ast node types replaced by Constant are no longer available (GH-137064) (GH-142930)
(cherry picked from commit fc80096a07)

Co-authored-by: James <snoopjedi@gmail.com>
2025-12-18 13:24:54 +01:00
Miss Islington (bot)
7134b407dc
[3.14] GH-100964: Fix reference cycle in exhausted generator frames (GH-141112) (#142902)
GH-100964: Fix reference cycle in exhausted generator frames (GH-141112)
(cherry picked from commit 92243dc62c)

Co-authored-by: Savannah Ostrowski <savannah@python.org>
2025-12-17 19:48:18 +00:00
Miss Islington (bot)
25a94708e5
[3.14] gh-142766: Clear frame when generator.close() is called (gh-142838) (#142899)
(cherry picked from commit 25397f9541)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2025-12-17 18:33:15 +00:00
Miss Islington (bot)
338bdb2415
[3.14] gh-142873: Do not check for PyContextVar_CheckExact twice in PyContextVar_Set (GH-142874) (#142893)
gh-142873: Do not check for `PyContextVar_CheckExact` twice in `PyContextVar_Set` (GH-142874)
(cherry picked from commit e61a447d0e)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-12-17 18:28:37 +00:00
Miss Islington (bot)
547e38cf3a
[3.14] gh-142876: remove reference to thread in documentation of asyncio.Queue.shutdown (GH-142888) (#142891)
gh-142876: remove reference to thread in documentation of `asyncio.Queue.shutdown` (GH-142888)
(cherry picked from commit 77c8e6a2b8)

Co-authored-by: Damian Birchler <damian@damianbirchler.net>
2025-12-17 22:23:27 +05:30
Miss Islington (bot)
ad6396ece5
[3.14] decimal docs: specification link and examples (GH-128698) (#142804)
decimal docs: specification link and examples (GH-128698)
(cherry picked from commit 2450be607c)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-12-17 21:42:23 +05:30
Stan Ulbrych
8a2ea9196d
[3.14] typo fixes in docs (GH-142683) (#142839)
(cherry picked from commit 39ecb17103)

Co-authored-by: SYan212 <syan235711@gmail.com>
2025-12-17 21:41:54 +05:30
Miss Islington (bot)
8c92d665ee
[3.14] gh-112127: Fix possible use-after-free in atexit.unregister() (GH-114092) (#142878)
gh-112127: Fix possible use-after-free in atexit.unregister() (GH-114092)
(cherry picked from commit 2b466c47c3)

Co-authored-by: Benjamin Johnson <ben332004@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-12-17 21:36:12 +05:30
Miss Islington (bot)
06137178b0
[3.14] gh-142836: Avoid /proc fd pipes on Solaris (GH-142853) (#142854)
gh-142836: Avoid /proc fd pipes on Solaris (GH-142853)
(cherry picked from commit c35b812e77)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2025-12-17 08:20:34 -05:00
Miss Islington (bot)
eb1284eb26
[3.14] gh-142859: Add Tools/check-c-api-docs to mypy check (GH-142860) (#142871)
gh-142859: Add `Tools/check-c-api-docs` to mypy check (GH-142860)
(cherry picked from commit 248eb3efb3)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-12-17 11:50:22 +00:00
Miss Islington (bot)
ce23b70ea6
[3.14] gh-140374: Add glossary entries related to multithreading (GH-140375) (#142868)
---------
(cherry picked from commit 1e9a0ee682)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Daniele Parmeggiani <8658291+dpdani@users.noreply.github.com>
2025-12-17 12:17:46 +01:00
Miss Islington (bot)
f2d6f57178
[3.14] gh-139320: Cover exception chaining in the docs of contextmanager.__exit__ (GH-140169) (GH-142792)
(cherry picked from commit a44509ea87)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2025-12-17 11:28:42 +01:00
Miss Islington (bot)
57b37a9ca9
[3.14] gh-139743: Avoid print twice verbose version for sqlite tests (GH-142850) (GH-142865)
(cherry picked from commit 454485e564)

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
Co-authored-by: yihong <zouzou0208@gmail.com>
2025-12-17 10:10:46 +00:00
Miss Islington (bot)
897e2b46fb
[3.14] gh-142783: Fix possible use after free in zoneinfo module (GH-142790) (GH-142862)
(cherry picked from commit 8307a14d0e)

Co-authored-by: wangxiaolei <fatelei@gmail.com>
2025-12-17 09:23:59 +00:00
Miss Islington (bot)
4feba4db2c
[3.14] gh-142752: add more thread safety tests for mock (GH-142791) (#142856)
gh-142752: add more thread safety tests for mock (GH-142791)
(cherry picked from commit 4fd006e712)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-12-17 08:14:20 +00:00
Miss Islington (bot)
8b6eaef828
[3.14] gh-142315: Don't pass the "real path" of Pdb script target to system functions (GH-142371) (#142497)
gh-142315: Don't pass the "real path" of Pdb script target to system functions (GH-142371)

* Pick target depending on preconditions

* Clarify the news fragment

* Add test capturing missed expectation.

* Add more idiomatic safe realpath helper

* Restore logic where existance and directoriness are checked on realpath.

* Link GH issue to test.

* Extract a function to check the target. Remove the _safe_realpath, now no longer needed.

* Extract method for replacing sys_path, and isolate realpath usage there.

* Revert "Extract method for replacing sys_path, and isolate realpath usage there."

This reverts commit 855aac3d28.

* Restore _safe_realpath.

---------
(cherry picked from commit d716e3b2dd)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2025-12-16 10:52:26 -05:00
Miss Islington (bot)
d089cad656
[3.14] gh-142495: Make defaultdict keep existed value when racing with __missing__ (GH-142668) (GH-142832)
(cherry picked from commit a043407510)

Co-authored-by: Edward Xu <xuxiangad@gmail.com>
2025-12-16 15:31:05 +00:00
Miss Islington (bot)
f162bcc188
[3.14] gh-130536: Add details to os.path documentation (GH-130557) (#142800)
Co-authored-by: Arthur Wigo <arthur.l.wigo@gmail.com>
2025-12-16 14:50:56 +00:00
Miss Islington (bot)
c727b99cf2
[3.14] gh-83926: BlockingIOError characters_written is byte count (GH-141215) (#142816)
gh-83926: BlockingIOError characters_written is byte count (GH-141215)
(cherry picked from commit e12c744b0a)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2025-12-16 12:03:47 +00:00
Miss Islington (bot)
5bd413f1f4
[3.14] gh-142019: Add description about the exponent of result formatted with presentation type 'e' (GH-142084) (#142813)
Co-authored-by: 1nftf <QfxZ11@proton.me>
2025-12-16 12:01:50 +00:00
Miss Islington (bot)
6545f244b8
[3.14] gh-119786: Remove mention of _PyThreadState_BumpFramePointer from InternalDocs/interpreter.md (GH-141816) (#142812)
Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2025-12-16 11:54:44 +00:00
Miss Islington (bot)
988e4f1b89
[3.14] gh-141218: Fix inaccurate object comparison documentation (GH-141221) (#142810)
Co-authored-by: Mohsin Mehmood <55545648+mohsinm-dev@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-12-16 11:52:06 +00:00
Miss Islington (bot)
8916a8bf17
[3.14] Remove duplicate content in Mapping types - dict documentation (GH-141036) (#142808)
Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
2025-12-16 11:51:36 +00:00
Miss Islington (bot)
fdc79776eb
[3.14] Correct Glossary key function example to use str.casefold instead of str.lower (GH-140316) (#142807)
Co-authored-by: Cameron Beck <94604154+cbkinase@users.noreply.github.com>
2025-12-16 11:49:57 +00:00
Miss Islington (bot)
e0a77821d6
[3.14] gh-106318: Add examples for str.ljust() method (GH-142719) (#142802)
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-12-16 11:45:13 +00:00
Miss Islington (bot)
968d51b414
[3.14] gh-85204: Improve locale.setlocale example (GH-132683) (#142798)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-12-16 11:32:07 +00:00
Miss Islington (bot)
8150abb991
[3.14] gh-124864: Extends smtplib documentation on ESMTP options format (GH-132547) (#142796)
Co-authored-by: Patrick R <codeZeilen@users.noreply.github.com>
2025-12-16 11:27:20 +00:00
Miss Islington (bot)
c31ea74970
[3.14] gh-142595: Amend be5e0dcded (fix NULL pointer dereference) (GH-142775) (#142788)
gh-142595: Amend be5e0dcded (fix NULL pointer dereference) (GH-142775)
(cherry picked from commit 15a9762500)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2025-12-16 15:42:43 +05:30
Miss Islington (bot)
4cbd2fa348
[3.14] gh-142020: ctypes docs: Note that find_library relies on the programs it runs (GH-142134) (GH-142748)
(cherry picked from commit e4d32a3ef9)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-12-16 10:56:25 +01:00
Cody Maloney
58da2a9d94
[3.14] gh-142594: fix by property calls io.TextIOWrapper.detach (GH-142706) (GH-142755)
(cherry picked from commit 1d3854a19a)

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
Co-authored-by: yihong <zouzou0208@gmail.com>
2025-12-16 10:55:25 +01:00
Miss Islington (bot)
b9cbdde80d
[3.14] gh-142737: Handle lost io.open in _Py_FindSourceFile (GH-142747) (GH-142773)
gh-142737: Handle lost `io.open` in `_Py_FindSourceFile` (GH-142747)
(cherry picked from commit f277781bba)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2025-12-15 23:30:00 +00:00
Miss Islington (bot)
88ac9956cd
[3.14] gh-85222: Document the global start method side effect in multiprocessing (GH-136426) (#142770)
gh-85222: Document the global start method side effect in multiprocessing (GH-136426)

* Document the ctx parameter in some types in multiprocessing.
* Reduce duplication while still linking to the central explanation from API points with the side effect.
(cherry picked from commit 0978b9a7d5)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: R Chintan Meher <meherrihaan@gmail.com>
2025-12-15 22:18:47 +00:00
Miss Islington (bot)
575174ee78
[3.14] gh-142595: add type check for namedtuple call during decimal initialization (GH-142608) (GH-142623)
(cherry picked from commit be5e0dcded)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2025-12-15 15:03:57 +01:00
Miss Islington (bot)
f17281741c
[3.14] gh-142651: make Mock.call_count thread-safe (GH-142656) (#142743)
gh-142651: make `Mock.call_count` thread-safe (GH-142656)
(cherry picked from commit 850f95f6f6)

Co-authored-by: chaope <pengchaoandy@gmail.com>
2025-12-15 18:21:52 +05:30
Miss Islington (bot)
bf4f508704
[3.14] gh-142724: fix error path in _PyPegen_raise_tokenizer_init_error (GH-142725) (#142726)
Co-authored-by: AZero13 <gfunni234@gmail.com>
2025-12-14 21:49:30 +00:00
Miss Islington (bot)
e0243c664c
[3.14] gh-106318: Add examples for str.isnumeric() (GH-142680) (#142715)
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-12-14 18:53:13 +00:00
decorator-factory
78dd2d5ba9
[3.14] gh-142411: Change documentation to reflect the new docstring adjustments in 3.13 (GH-142413) (#142689) 2025-12-14 14:22:30 +02:00
Serhiy Storchaka
f6ed94e70e
[3.14] gh-142681: Improve unicodedata tests (GH-142682) (GH-142708)
(cherry picked from commit af7cca3c39)
2025-12-14 13:51:14 +02:00
Miss Islington (bot)
df22bcdf5f
[3.14] gh-141938: document treatment of OSError raised by HTTPConnection.getresponse (GH-142339) (#142704)
gh-141938: document treatment of `OSError` raised by `HTTPConnection.getresponse` (GH-142339)
(cherry picked from commit 11aef219f5)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-12-14 10:17:54 +00:00
Bénédikt Tran
77ad3d59c2
[3.14] gh-142451: correctly copy HMAC attributes in HMAC.copy() (GH-142510) (#142698)
Partially cherry-picked from d3ef5ba34d
which ensures that the `block_size` attribute exists on the copy.
2025-12-14 09:27:03 +00:00
Miss Islington (bot)
aef4552d04
[3.14] gh-142554: avoid divmod crashes due to bad _pylong.int_divmod (GH-142673) (#142696)
gh-142554: avoid `divmod` crashes due to bad `_pylong.int_divmod` (GH-142673)
(cherry picked from commit 4e4163676a)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-12-14 09:04:37 +00:00
Serhiy Storchaka
7297d3a98d
[3.14] gh-142461: Move misplaced NEWS entries to an appropriate section (GH-142464) (#142688)
(cherry picked from commit 87e152d203)
2025-12-14 01:24:31 +02:00