Commit graph

127083 commits

Author SHA1 Message Date
Miss Islington (bot)
620065c33e
[3.14] gh-133403: Check Tools/build/deepfreeze.py with mypy (GH-133802) (#134038)
gh-133403: Check `Tools/build/deepfreeze.py` with mypy (GH-133802)
(cherry picked from commit 7eaa097390)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-05-15 09:39:20 +00:00
Miss Islington (bot)
fede4ed1d3
[3.14] Test also error messages in test_limit_int. (GH-134018) (GH-134033)
(cherry picked from commit e123a1d09b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-15 07:47:24 +00:00
Miss Islington (bot)
f2a4b1066b
[3.14] gh-133970: Make PEP750 types generic (GH-133976) (#134029)
gh-133970: Make PEP750 types generic (GH-133976)
(cherry picked from commit c3a1da5b93)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-05-15 06:39:39 +00:00
Miss Islington (bot)
b6299e8f16
[3.14] gh-133986: Document string split algorithm when sep is None and maxsplit is 0 (GH-133987) (#133993)
---------
(cherry picked from commit 3e23047363)

Co-authored-by: Joey Smith <joeysmith@gmail.com>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
2025-05-14 21:32:45 -04:00
Miss Islington (bot)
4adb1ddac8
[3.14] Improve tests for str to Fraction conversion (GH-134010) (GH-134016)
(cherry picked from commit 17d0fec702)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-14 18:18:04 +00:00
Miss Islington (bot)
ea15c55143
[3.14] Docs: remove link elements in builders other than HTML (GH-133720) (#134005)
Co-authored-by: Maciej Olko <maciej.olko@affirm.com>
2025-05-14 18:22:07 +03:00
Miss Islington (bot)
d6cb8fa86e
[3.14] gh-133701: Fix incorrect __annotations__ on TypedDict defined under PEP 563 (GH-133772) (#134003)
gh-133701: Fix incorrect `__annotations__` on TypedDict defined under PEP 563 (GH-133772)
(cherry picked from commit 9836503b48)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2025-05-14 13:54:29 +00:00
Miss Islington (bot)
a962934106
[3.14] gh-132983: Style improvements for compression.zstd (GH-133547) (#134001)
gh-132983: Style improvements for `compression.zstd` (GH-133547)
(cherry picked from commit b44c824856)

Co-authored-by: Emma Smith <emma@emmatyping.dev>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-05-14 12:39:43 +00:00
Miss Islington (bot)
275c8d5dbd
[3.14] Remove trailing whitespace from python.gram (GH-133858) (#133990)
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-05-14 08:19:47 +00:00
Miss Islington (bot)
66d6860439
[3.14] gh-132641: fix race in lru_cache under free-threading (GH-133787) (#133979)
gh-132641: fix race in `lru_cache` under free-threading (GH-133787)

Fix race in `lru_cache` by acquiring critical section on the cache object itself and call the lock held variant of dict functions to modify the underlying dict.
(cherry picked from commit 9ad0c7b0f1)

Co-authored-by: Peter Hawkins <phawkins@google.com>
2025-05-14 07:11:38 +00:00
Miss Islington (bot)
b94a63c0f1
[3.14] gh-132983: Fix small issues with zstd support in zipfile (GH-133723) (#133974)
gh-132983: Fix small issues with zstd support in zipfile (GH-133723)
(cherry picked from commit 35f47d0589)

Co-authored-by: Carey Metcalfe <carey@cmetcalfe.ca>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Emma Smith <emma@emmatyping.dev>
2025-05-13 16:10:59 +00:00
Miss Islington (bot)
24847d04b2
gh-133928: Improvements to using/windows.rst (GH-133952)
(cherry picked from commit fc3cddd90a)

Co-authored-by: Steve Dower <steve.dower@python.org>
2025-05-13 16:06:29 +00:00
Miss Islington (bot)
5632e93f46
[3.14] gh-133968: Add fast path to PyUnicodeWriter_WriteStr() (GH-133969) (#133971)
gh-133968: Add fast path to PyUnicodeWriter_WriteStr() (GH-133969)

Don't call PyObject_Str() if the input type is str.
(cherry picked from commit fe9f6e829a)

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-05-13 13:58:25 +00:00
Miss Islington (bot)
69b4387f78
[3.14] gh-133767: Fix use-after-free in the unicode-escape decoder with an error handler (GH-129648) (GH-133942)
If the error handler is used, a new bytes object is created to set as
the object attribute of UnicodeDecodeError, and that bytes object then
replaces the original data. A pointer to the decoded data will became invalid
after destroying that temporary bytes object. So we need other way to return
the first invalid escape from _PyUnicode_DecodeUnicodeEscapeInternal().

_PyBytes_DecodeEscape() does not have such issue, because it does not
use the error handlers registry, but it should be changed for compatibility
with _PyUnicode_DecodeUnicodeEscapeInternal().
(cherry picked from commit 9f69a58623)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-13 16:25:08 +03:00
Miss Islington (bot)
f0a7a6c2cc
[3.14] gh-133886: Fix sys.remote_exec() for non-UTF-8 paths (GH-133887) (GH-133963)
It now supports non-ASCII paths in non-UTF-8 locales and
non-UTF-8 paths in UTF-8 locales.
(cherry picked from commit c09cec5d69)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-13 09:23:39 +00:00
Miss Islington (bot)
198dc8dcb2
[3.14] gh-133885: skip test_compress_locking in test_zstd (GH-133943) (#133949)
gh-133885: skip `test_compress_locking` in `test_zstd` (GH-133943)
(cherry picked from commit e8665d4d46)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-05-13 08:27:17 +00:00
Miss Islington (bot)
3467656b18
[3.14] gh-132775: Add _PyFunction_GetXIData() (gh-133955)
(cherry picked from commit 8cf4947b0f, AKA gh-133481)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2025-05-12 22:37:55 +00:00
Miss Islington (bot)
c1aa5f82d9
[3.14] gh-132983: Fix compiler warning about unused function `mt_continue_should_break()` (GH-133947) (#133950)
gh-132983: Fix compiler warning about unused function ``mt_continue_should_break()`` (GH-133947)
(cherry picked from commit 121ed71f4e)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2025-05-12 19:49:44 +00:00
Miss Islington (bot)
5ba525c7d0
[3.14] gh-133413: Fix references to removed Request.has_data (GH-133414) (GH-133945)
The has_data() method of http.request.Request
was removed in version 3.4.
(cherry picked from commit 86c1d439e0)

Co-authored-by: ppaez <pp@pp.com.mx>
2025-05-12 18:23:35 +00:00
Miss Islington (bot)
c15980b57b
[3.14] gh-133653: Fix argparse.ArgumentParser with the formatter_class argument (GH-133813) (GH-133941)
* Fix TypeError when formatter_class is a custom subclass of
  HelpFormatter.
* Fix TypeError when formatter_class is not a subclass of
  HelpFormatter and non-standard prefix_char is used.
* Fix support of colorizing when formatter_class is not a subclass of
  HelpFormatter.
* Remove the prefix_chars parameter of HelpFormatter.
(cherry picked from commit 734e15b70d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-12 17:54:07 +00:00
Miss Islington (bot)
c11fc4bc96
[3.14] gh-133677: Fix tests when running in non-UTF-8 locale (GH-133865) (GH-133938)
(cherry picked from commit 14305a83d3)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-12 16:41:40 +00:00
Miss Islington (bot)
89c801b84e
[3.14] gh-133925: Make typing._UnionGenericAlias hashable (GH-133929) (#133936)
gh-133925: Make typing._UnionGenericAlias hashable (GH-133929)
(cherry picked from commit 8d478c7953)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2025-05-12 15:50:10 +00:00
Miss Islington (bot)
ecc12bff24
[3.14] gh-133904: Fix math.factorial documentation (GH-133907) (#133918)
gh-133904: Fix `math.factorial` documentation (GH-133907)
(cherry picked from commit 27ed64575d)

Co-authored-by: mkaraev <maruf.karaev97@gmail.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
2025-05-12 12:53:44 +00:00
Miss Islington (bot)
cedc37a894
[3.14] gh-91555: disable logger while handling log record (GH-131812) (GH-133899)
Prevent the possibility of re-entrancy leading to deadlock or infinite recursion (caused by logging triggered by logging), by disabling logging while the logger is handling log messages.
(cherry picked from commit 2561e148ec)

Co-authored-by: Duane Griffin <duaneg@dghda.com>
2025-05-12 13:02:21 +01:00
Miss Islington (bot)
f5d2d73995
[3.14] gh-133744: Fix multiprocessing interrupt test: add an event (GH-133746) (#133916)
gh-133744: Fix multiprocessing interrupt test: add an event (GH-133746)

Add an event to synchronize the parent process with the child
process: wait until the child process starts sleeping.
(cherry picked from commit c2989b7070)

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-05-12 09:38:07 +00:00
Miss Islington (bot)
94938caf35
[3.14] gh-119180: annotationlib: Fix values of Format members in docs (GH-133841) (#133903)
gh-119180: annotationlib: Fix values of Format members in docs (GH-133841)
(cherry picked from commit 0eb448cae5)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2025-05-11 15:49:21 +00:00
Miss Islington (bot)
a3475e68bb
[3.14] gh-119180: More documentation for PEP 649/749 (GH-133552) (#133902)
gh-119180: More documentation for PEP 649/749 (GH-133552)

The SC asked that the Appendix in PEP-749 be added to the docs.
(cherry picked from commit 3396df56d0)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-05-11 15:49:06 +00:00
Miss Islington (bot)
507715d5f7
[3.14] gh-133893: asyncio.graph: Replace TextIO annotation with io.Writer (GH-133894) (#133901)
gh-133893: asyncio.graph: Replace TextIO annotation with io.Writer (GH-133894)
(cherry picked from commit 1d3eacedb8)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2025-05-11 15:25:43 +00:00
Miss Islington (bot)
98ef4837ec
[3.14] gh-133590: ensure that TableEntry.linenumber_borrow is initialized (GH-133681) (#133872)
gh-133590: ensure that `TableEntry.linenumber_borrow` is initialized (GH-133681)
(cherry picked from commit c838e21fda)

Co-authored-by: Lauta <ljfp@ljfp.xyz>
2025-05-11 08:44:22 +00:00
Miss Islington (bot)
f7d7248a03
[3.14] gh-133823: update "Pending Removal in 3.15" notes about TypedDict (GH-133864) (#133870)
gh-133823: update "Pending Removal in 3.15" notes about `TypedDict` (GH-133864)
(cherry picked from commit f91127ae1a)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-05-11 08:16:28 +00:00
Miss Islington (bot)
5c9f0ae49d
gh-133703: dict: fix calculate_log2_keysize() (GH-133809)
(cherry picked from commit 92337f666e)
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2025-05-11 16:34:15 +09:00
Miss Islington (bot)
2b761d1122
[3.14] gh-132983: Remove leftovers from EndlessZstdDecompressor (GH-133856) (#133859)
gh-132983: Remove leftovers from EndlessZstdDecompressor (GH-133856)
(cherry picked from commit 878e0fb8b4)

Co-authored-by: Rogdham <3994389+Rogdham@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-05-11 02:30:55 +00:00
Miss Islington (bot)
1e8a534533
[3.14] gh-132983: Make zstd types immutable (GH-133784) (#133857)
gh-132983: Make zstd types immutable (GH-133784)
(cherry picked from commit 1a87b6e9ae)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-05-10 23:02:44 +00:00
Miss Islington (bot)
da1e5c434b
[3.14] gh-133336: Remove comment about reserved -J in `initconfig.c` (GH-133821) (#133855) 2025-05-10 22:25:42 +00:00
Miss Islington (bot)
f7c441cc82
[3.14] gh-132983: Reduce the size of `_zstdmodule.h` (GH-133793) (#133854)
gh-132983: Reduce the size of ``_zstdmodule.h`` (GH-133793)
(cherry picked from commit 1a548c0a50)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-05-10 21:51:11 +00:00
Miss Islington (bot)
39485d5935
[3.14] Add classmethod to setUpClass in test_pdb (GH-133840) (#133846)
Add classmethod to setUpClass in test_pdb (GH-133840)
(cherry picked from commit 4f2f780d53)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2025-05-10 18:38:14 +00:00
Miss Islington (bot)
e7e105f51b
[3.14] gh-86155: Fix data loss after unclosed script or style tag in HTMLParser (GH-22658) (GH-133844)
When calling .close() the HTMLParser should flush all remaining content,
even when that content is in an unclosed script or style tag.
(cherry picked from commit 53383e90e4)

Co-authored-by: Waylan Limberg <waylan.limberg@icloud.com>
2025-05-10 18:02:23 +00:00
Miss Islington (bot)
856e5903ba
[3.14] gh-133783: Fix __replace__ on AST nodes for optional attributes (GH-133797) (#133842)
gh-133783: Fix __replace__ on AST nodes for optional attributes (GH-133797)
(cherry picked from commit 7dddb4e667)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2025-05-10 16:44:07 +00:00
Miss Islington (bot)
13c94d0401
[3.14] gh-132642: document how to render human-readable timedelta objects (GH-133825) (#133837)
gh-132642: document how to render human-readable `timedelta` objects (GH-133825)
(cherry picked from commit efcc42ba70)

Co-authored-by: Kentaro Jay Takahashi <64148935+KentaroJay@users.noreply.github.com>
2025-05-10 16:00:36 +00:00
Miss Islington (bot)
6dc12dad4b
[3.14] gh-117088: Fix AIX build (GH-132595) (GH-133838)
(cherry picked from commit 47f1722d80)

Co-authored-by: Ayappan Perumal <ayappap2@in.ibm.com>
2025-05-10 15:55:47 +00:00
Miss Islington (bot)
381159b2be
[3.14] gh-77057: Fix handling of invalid markup declarations in HTMLParser (GH-9295) (GH-133833)
(cherry picked from commit 76c0b01bc4)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-10 14:58:23 +00:00
Miss Islington (bot)
f3f22f9f51
[3.14] Tiny doc fix to double up backslashes in a Windows filesystem path (GH-133828) (#133830)
Tiny doc fix to double up backslashes in a Windows filesystem path (GH-133828)
(cherry picked from commit e7741dd773)

Co-authored-by: Tim Golden <mail@timgolden.me.uk>
2025-05-10 13:51:49 +00:00
Miss Islington (bot)
10cd1aafc4
[3.14] gh-115999: Note Python 3.14 free-threaded changes in What's New (gh-131285) (gh-133824)
gh-115999: Note Python 3.14 free-threaded changes in What's New (gh-131285)

---------
(cherry picked from commit f28cbc9fd3)

Co-authored-by: Donghee Na <donghee.na@python.org>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: T. Wouters <thomas@python.org>
Co-authored-by: mpage <mpage@cs.stanford.edu>
2025-05-10 10:37:02 +00:00
Miss Islington (bot)
4b78cbd76f
[3.14] gh-132971: Update shutil.which() docs (GH-133067) (#133803)
gh-132971: Update shutil.which() docs (GH-133067)
(cherry picked from commit d13d5fdf61)

Co-authored-by: Kokona <125976684+985025074@users.noreply.github.com>
2025-05-10 10:51:55 +02:00
Miss Islington (bot)
62109c4174
[3.14] gh-133009: fix UAF in xml.etree.ElementTree.Element.__deepcopy__ (GH-133010) (#133805)
gh-133009: fix UAF in `xml.etree.ElementTree.Element.__deepcopy__` (GH-133010)
(cherry picked from commit 116a9f9b37)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-05-10 07:58:10 +00:00
Miss Islington (bot)
99ca086f91
[3.14] gh-132983: Don't allow trailer data in ZstdFile (GH-133736) (#133799)
gh-132983: Don't allow trailer data in ZstdFile (GH-133736)
(cherry picked from commit 50b5370664)

Co-authored-by: Rogdham <3994389+Rogdham@users.noreply.github.com>
2025-05-10 02:58:43 +00:00
Miss Islington (bot)
f6a4604017
[3.14] Fix a typo in Misc/NEWS.d/3.140a1.rst (GH-133790) (#133798)
Fix a typo in Misc/NEWS.d/3.140a1.rst (GH-133790)
(cherry picked from commit c896dae029)

Co-authored-by: Tan Long <tanloong@foxmail.com>
2025-05-10 02:37:05 +00:00
Miss Islington (bot)
d9571c938c
[3.14] GH-132983: PEP 7 and Argument Clinic changes for zstd (GH-133791) (#133792)
GH-132983: PEP 7 and Argument Clinic changes for zstd (GH-133791)
(cherry picked from commit 1978904a2f)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-05-10 00:59:30 +00:00
Miss Islington (bot)
9023b6ffae
[3.14] GH-132983: remove empty_bytes from _zstd module state (GH-133785) (#133788)
GH-132983: remove empty_bytes from _zstd module state (GH-133785)
(cherry picked from commit 98e2c3af47)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-05-09 20:42:55 +00:00
Miss Islington (bot)
5796e3b588
[3.14] gh-132983: Simplify `_zstd_exec()` (GH-133775) (#133786)
gh-132983: Simplify ``_zstd_exec()`` (GH-133775)
(cherry picked from commit bbe9c31edc)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-05-09 20:15:32 +00:00