Commit Graph

122991 Commits

Author SHA1 Message Date
Miss Islington (bot) ed3a49ea73
[3.13] gh-121285: Remove backtracking when parsing tarfile headers (GH-121286) (#123542)
gh-121285: Remove backtracking when parsing tarfile headers (GH-121286)

* Remove backtracking when parsing tarfile headers
* Rewrite PAX header parsing to be stricter
* Optimize parsing of GNU extended sparse headers v0.0

(cherry picked from commit 34ddb64d08)

Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2024-09-02 13:19:11 +02:00
Miss Islington (bot) ffb7abe829
[3.13] gh-123309: Add more tests for the pickletools module (GH-123355) (#123533)
gh-123309: Add more tests for the pickletools module (GH-123355)

Add tests for genops() and dis().
(cherry picked from commit e5a567b0a7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-09-02 13:18:44 +02:00
Miss Islington (bot) bf0d8bb301
[3.13] gh-108172: do not override OS preferred browser if it is a super-string of a known browser (GH-113011) (#123527)
gh-108172: do not override OS preferred browser if it is a super-string of a known browser (GH-113011)

When checking if the registering browser is the "OS preferred browser", do not use a substring search - that makes no sense: one can have a preferred browser that looks like a super-string of a known browser, e.g. "firefox-nightly" vs "firefox".

https://github.com/python/cpython/issues/108172 explains in more detail, and lays out a potential better future enhancement for this case of just using xdg-open.  We'll go with this for now.

---------

(cherry picked from commit 10bf615bab)

Co-authored-by: Oded Arbel <oded@geek.co.il>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-09-02 13:18:27 +02:00
Petr Viktorin 1af74fa652
[3.13] gh-120426: Reword the glossary term "immortal" (GH-123191) (#123491)
gh-120426: Reword the glossary term "immortal" (GH-123191)

Reword the glossary term "immortal", mark it as an implementation detail

(cherry picked from commit 6754566a51)
2024-09-02 13:17:41 +02:00
Miss Islington (bot) ab29053784
[3.13] gh-123431: Harmonize extension code checks in pickle (GH-123434) (#123459)
gh-123431: Harmonize extension code checks in pickle (GH-123434)

This checks are redundant in normal circumstances and can only work if
the extension registry was intentionally broken.

* The Python implementation now raises exception for the extension code
  with false boolean value.
* Simplify the C code. RuntimeError is now raised in explicit checks.
* Add many tests.
(cherry picked from commit 0c3ea30238)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-09-02 13:17:16 +02:00
Wulian 5c408e333d
[3.13] Fix typos in docs and what's new (#123451) 2024-09-02 13:15:02 +02:00
Miss Islington (bot) 14a899f6f0
[3.13] gh-120226: Fix test_sendfile_close_peer_in_the_middle_of_receiving on Linux >= 6.10 (GH-120227) (#123421)
gh-120226: Fix test_sendfile_close_peer_in_the_middle_of_receiving on Linux >= 6.10 (GH-120227)

The worst case is that the kernel buffers 17 pages with a page size of 64k.
(cherry picked from commit a758424566)

Co-authored-by: Xi Ruoyao <xry111@xry111.site>
2024-09-02 13:14:03 +02:00
Miss Islington (bot) 7e8883a3f0
[3.13] gh-123270: Replaced SanitizedNames with a more surgical fix. (GH-123354) (#123410)
gh-123270: Replaced SanitizedNames with a more surgical fix. (GH-123354)

Applies changes from zipp 3.20.1 and jaraco/zippGH-124
(cherry picked from commit 2231286d78)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2024-09-02 13:13:18 +02:00
Miss Islington (bot) aca65112fe
[3.13] GH-117759: Document incremental GC (GH-123266) (#123395)
GH-117759: Document incremental GC (GH-123266)

* Update what's new

* Update gc module docs and fix inconsistency in gc.get_objects
(cherry picked from commit f49a91648a)

Co-authored-by: Mark Shannon <mark@hotpy.org>
2024-09-02 13:12:16 +02:00
Miss Islington (bot) cbcb9e1c0f
[3.13] gh-111495: Add tests for PyNumber C API (GH-111996) (#123375)
gh-111495: Add tests for PyNumber C API (GH-111996)
(cherry picked from commit 2f20f5a9bc)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2024-09-02 13:11:06 +02:00
Miss Islington (bot) b1372e2f1a
[3.13] GH-122298: Restore printing of GC stats (GH-123261) (#123268)
GH-122298: Restore printing of GC stats (GH-123261)
(cherry picked from commit 7cd3aa42f0)

Co-authored-by: Mark Shannon <mark@hotpy.org>
2024-09-02 13:10:27 +02:00
Miss Islington (bot) d9e4c4b61c
[3.13] gh-123213: Fixed xml.etree.ElementTree.Element.extend and assignment to no longer hide exceptions (GH-123214) (#123257)
gh-123213: Fixed xml.etree.ElementTree.Element.extend and assignment to no longer hide exceptions (GH-123214)
(cherry picked from commit 90b6d0e0f8)

Co-authored-by: Bar Harel <bharel@barharel.com>
2024-09-02 13:10:09 +02:00
Miss Islington (bot) 4ea9c5ba78
[3.13] gh-85110: Preserve relative path in URL without netloc in urllib.parse.urlunsplit() (GH-123179) (#123187)
gh-85110: Preserve relative path in URL without netloc in urllib.parse.urlunsplit() (GH-123179)
(cherry picked from commit 90c892efea)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-09-02 13:09:17 +02:00
Miss Islington (bot) 2b4c31d87d
[3.13] gh-122981: Fix inspect.getsource() for generated classes with Python base classes (GH-123001) (#123182)
gh-122981: Fix inspect.getsource() for generated classes with Python base classes (GH-123001)

Look up __firstlineno__ only in the class' dict, without searching in
base classes.
(cherry picked from commit f88c14d412)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-09-02 13:07:08 +02:00
Serhiy Storchaka 8b6dd92db7
[3.13] gh-122688: Fix support of var-positional parameter in Argument Clinic (GH-122689) (#122852)
* Parameters after the var-positional parameter are now keyword-only
  instead of positional-or-keyword.
* Correctly calculate min_kw_only.
* Raise errors for invalid combinations of the var-positional parameter
  with "*", "/" and deprecation markers.
(cherry picked from commit 8393608dd9)
2024-09-02 13:03:04 +02:00
Miss Islington (bot) 60e4c3f710
[3.13] gh-122798: Make tests for warnings in the re module more strict (GH-122799) (#122804)
gh-122798: Make tests for warnings in the re module more strict (GH-122799)

* Test warning messages.
* Test stack level for re.compile() and re.findall().
(cherry picked from commit d2e5be1f39)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-09-02 12:59:15 +02:00
Miss Islington (bot) f070398669
[3.13] gh-100256: Skip inaccessible registry keys in the WinAPI mimetype implementation (GH-122047) (#122786)
gh-100256: Skip inaccessible registry keys in the WinAPI mimetype implementation (GH-122047)
(cherry picked from commit 0bd93755f3)

Co-authored-by: Lucas Esposito <LucasEsposito@users.noreply.github.com>
2024-09-02 12:58:53 +02:00
Miss Islington (bot) f1a6d2254f
[3.13] gh-121151: argparse: Fix wrapping of long usage text of arguments inside a mutually exclusive groups (GH-121159) (#122777)
gh-121151: argparse: Fix wrapping of long usage text of arguments inside a mutually exclusive groups (GH-121159)
(cherry picked from commit 013a092975)

Co-authored-by: Ali Hamdan <ali.hamdan.dev@gmail.com>
2024-09-02 12:55:16 +02:00
Miss Islington (bot) 8c01b34268
[3.13] gh-79846: Make ssl.create_default_context() ignore invalid certificates (GH-91740) (#122768)
gh-79846: Make ssl.create_default_context() ignore invalid certificates (GH-91740)

An error in one certificate should not cause the whole thing to fail.

(cherry picked from commit 9e551f9b35)

Co-authored-by: pukkandan <pukkandan.ytdlp@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-09-02 12:53:59 +02:00
Miss Islington (bot) 8a4f708220
[3.13] gh-122571: Remove duplicate definition of PY_BUILTIN_HASHLIB_HASHES in configure.ac (GH-122572) (#122763)
gh-122571: Remove duplicate definition of PY_BUILTIN_HASHLIB_HASHES in configure.ac (GH-122572)

The redefinition in confdefs.h can cause issues with the
AX_CHECK_COMPILE_FLAG macro.
(cherry picked from commit b5e142ba7c)

Co-authored-by: Jonathan Protzenko <protz@microsoft.com>
2024-09-02 12:52:21 +02:00
Miss Islington (bot) 29733b084d
[3.13] gh-120083: Add IDLE Hovertip foreground color needed for recent macOS (GH-120605) (#122739)
gh-120083: Add IDLE Hovertip foreground color needed for recent macOS (GH-120605)

On recent versions of macOS (sometime between Catalina and Sonoma 14.5), the default Hovertip foreground color changed from black to white, thereby matching the background. This might be a matter of matching the white foreground of the dark-mode text. The unreadable result is shown here (GH-120083 (comment)).

The foreground and background colors were made parameters so we can pass different colors for future additional hovertips in IDLE.
---------

(cherry picked from commit 5a7f7c4864)

Co-authored-by: John Riggles <jriggles@icloud.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-09-02 12:50:39 +02:00
Miss Islington (bot) 4210a7d02b
[3.13] GH-121970: Fix ``gettext`` for audit events (GH-122651) (#122653)
GH-121970: Fix ``gettext`` for audit events (GH-122651)
(cherry picked from commit 95f5c89b54)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-09-02 12:48:20 +02:00
Miss Islington (bot) 57ba3b0c6e
[3.13] gh-122527: Fix a crash on deallocation of `PyStructSequence` (GH-122577) (#122625)
gh-122527: Fix a crash on deallocation of `PyStructSequence` (GH-122577)

The `PyStructSequence` destructor would crash if it was deallocated after
its type's dictionary was cleared by the GC, because it couldn't compute
the "real size" of the instance. This could occur with relatively
straightforward code in the free-threaded build or with a reference
cycle involving the type in the default build, due to differing orders
in which `tp_clear()` was called.

Account for the non-sequence fields in `tp_basicsize` and use that,
along with `Py_SIZE()`, to compute the "real" size of a
`PyStructSequence` in the dealloc function. This avoids the accesses to
the type's dictionary during dealloc, which were unsafe.
(cherry picked from commit 4b63cd170e)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-09-02 12:47:18 +02:00
Alex Waygood 3455d8560a
[3.13] Fix typos in docs, error messages and comments (#122502) (#122606)
Fix typos in docs, error messages and comments (#122502)

(cherry-picked from commit 46f5a4f9e1)

Signed-off-by: jianghuyiyuan <shuangcui@live.com>
Co-authored-by: jianghuyiyuan <shuangcui@live.com>
2024-09-02 12:44:42 +02:00
Miss Islington (bot) b8ef767ba5
[3.13] gh-109975: Remove dangling angle bracket from 3.13.rst (GH-123589) (#123590)
(cherry picked from commit 9a32a2588e)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2024-09-02 05:16:01 +00:00
Miss Islington (bot) 364d366328
[3.13] Remove irrelevant detail from example code. (gh-123587) (gh-123588) 2024-09-01 20:27:48 -05:00
Miss Islington (bot) 767dfb9e8d
[3.13] Simplify Property() recipe to focus on the essentials (gh-123585) (gh-123586) 2024-09-01 18:08:21 -05:00
Miss Islington (bot) cfdf376e2a
[3.13] gh-91126: Docs and tests for slotted dataclasses with `__init_subclass__` (GH-123342) (#123568)
gh-91126: Docs and tests for slotted dataclasses with `__init_subclass__` (GH-123342)
(cherry picked from commit 75e72822a3)

Co-authored-by: sobolevn <mail@sobolevn.me>
2024-09-01 18:19:56 +03:00
Miss Islington (bot) b0a50a69cf
[3.13] gh-123550: Fix code snippet of `BUILD_TUPLE` in `dis` docs (GH-123551) (#123555) 2024-09-01 08:38:20 +01:00
Miss Islington (bot) 4922e5b273
[3.13] GH-109975: Copyedit 3.13 What's New: Removals (GH-123529) (#123552)
GH-109975: Copyedit 3.13 What's New: Removals (GH-123529)
(cherry picked from commit 0ff59d707c)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-09-01 02:03:57 -04:00
Miss Islington (bot) dc06b3d01e
[3.13] gh-123494: Improve documentation for ``webbrowser`` return types (GH-123495) (#123548)
gh-123494: Improve documentation for ``webbrowser`` return types (GH-123495)

Document the return value for ``webbrowser.open*()``.
(cherry picked from commit 0b6acfee04)

Co-authored-by: Aarni Koskela <akx@iki.fi>
2024-09-01 05:41:10 +00:00
Miss Islington (bot) 59a6d48a89
[3.13] Enable colour for doctest on GitHub Actions (GH-123536) (#123538)
Enable colour for doctest on GitHub Actions (GH-123536)
(cherry picked from commit 0cba289870)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-08-31 14:39:15 +00:00
Miss Islington (bot) 578742a9a1
[3.13] gh-123407: Enable translating literal and code blocks (GH-123408) (#123530)
gh-123407: Enable translating literal and code blocks (GH-123408)
(cherry picked from commit 5332d989af)

Co-authored-by: Maciej Olko <maciej.olko@affirm.com>
2024-08-31 06:49:08 +00:00
Wei-Hsiang (Matt) Wang 9f5f2b7128
[3.13] gh-123492: Remove unnecessary `:func:` parentheses (gh-123493) (#123513) 2024-08-30 20:14:48 +03:00
Miss Islington (bot) 8ef277e5e9
[3.13] gh-123484: Fix the debug offsets for PyLongObject (GH-123485) (#123499) 2024-08-30 12:05:50 +00:00
Miss Islington (bot) eec25e5d47
[3.13] gh-101860: document `property.__name__` (GH-123399) (#123428)
(cherry picked from commit 40fff90ae3)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-08-29 09:55:56 -07:00
Miss Islington (bot) ada13a82a8
[3.13] gh-122136: test_asyncio: Don't fail if the kernel buffers more data than advertised (GH-123423) (#123443)
gh-122136: test_asyncio: Don't fail if the kernel buffers more data than advertised (GH-123423)
(cherry picked from commit b379f1b26c)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-08-29 11:44:54 +02:00
Miss Islington (bot) bd29ce8509
[3.13] gh-123448: Move `_PyNoDefault_Type` to the static types array (GH-123449) (#123450)
(cherry picked from commit c9930f5022)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2024-08-28 18:57:28 -07:00
Irit Katriel d379a92ddc
[3.13] gh-123142: fix too wide source location of GET_ITER/GET_AITER (GH-123420). (#123435)
(cherry picked from commit 61bef6245c)
2024-08-28 18:41:22 +01:00
Miss Islington (bot) 19a1f18740
[3.13] gh-123344: Add missing ast optimizations for PEP 696 (GH-123377) (#123427)
(cherry picked from commit be083cee34)

Co-authored-by: Bogdan Romanyuk <65823030+wrongnull@users.noreply.github.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-08-28 14:02:34 +00:00
Miss Islington (bot) fbc975223b
[3.13] gh-123254: Improve `tuple` C API docs with more info about errors (GH-123255) (#123416)
gh-123254: Improve `tuple` C API docs with more info about errors (GH-123255)
(cherry picked from commit 6f563e364d)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-08-28 07:47:39 +00:00
Miss Islington (bot) 317d389345
[3.13] gh-109975: Fix a typo in What's New in Python 3.13 (GH-123393) (#123396) 2024-08-27 15:16:20 +00:00
Miss Islington (bot) 69b104a4f1
[3.13] gh-122666: Tests for ast optimizations (GH-122667) (#123359)
(cherry picked from commit 9f9b00d52c)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-08-27 06:41:37 -07:00
Sergey B Kirpichev ee464309a5
[3.13] gh-111495: Add tests for PyTuple C API (GH-118757) (GH-123371)
(cherry picked from commit dbc1752d41)

Co-authored-by: kalyanr <kalyan.ben10@live.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2024-08-27 12:07:17 +03:00
Miss Islington (bot) fa21b3b8ee
[3.13] Ensure that iOS test re-runs don't try to spawn a process. (GH-122994) (#123368)
Ensure that iOS test re-runs don't try to spawn a process. (GH-122994)

Adds the --single-process option to the iOS test runner to ensure re-runs execute in the same process.
(cherry picked from commit e03073ff20)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2024-08-27 08:53:05 +08:00
Miss Islington (bot) 30f6cc75e9
[3.13] Add a --rerun option to the iOS testbed. (GH-122992) (#123367)
Add a --rerun option to the iOS testbed. (GH-122992)

Enable --rerun when running tests on iOS.
(cherry picked from commit ce39d3c6bd)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2024-08-27 00:25:17 +00:00
Malcolm Smith 350313e731
[3.13] gh-119727: Add --single-process option to regrtest (#119728) (#123010)
gh-119727: Add --single-process option to regrtest (#119728)

(cherry picked from commit 4e8aa32245)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-08-26 11:59:26 +02:00
Miss Islington (bot) 3822d7cd28
[3.13] gh-116789: Add more tests for `inspect.getmembers` (GH-116802) (#123129)
gh-116789: Add more tests for `inspect.getmembers` (GH-116802)
(cherry picked from commit c15bfa9a71)

Co-authored-by: sobolevn <mail@sobolevn.me>
2024-08-26 11:51:56 +02:00
Miss Islington (bot) 865bfb1530
[3.13] gh-123177: Fix prompt for wrapped lines in pyrepl (GH-123324) (#123327)
gh-123177: Fix prompt for wrapped lines in pyrepl (GH-123324)

When display lines above the cursor come from the cache, the first line
to not come from the cache may be a wrapped line, starting half way
through a logical line in the buffer. Detect and handle this case to
avoid accidentally drawing a stray prompt in the middle of a logical
line.
(cherry picked from commit 602fcf97df)

Co-authored-by: Matt Wozniski <mwozniski@bloomberg.net>
2024-08-26 02:13:36 +01:00
Miss Islington (bot) 4817365581
[3.13] gh-82378: Document the difference between sys.tracebacklimit and the limit arguments (GH-123286) (#123325)
gh-82378: Document the difference between sys.tracebacklimit and the limit arguments (GH-123286)
(cherry picked from commit 70bfef52b5)

Co-authored-by: CF Bolz-Tereick <cfbolz@gmx.de>
2024-08-25 23:08:51 +00:00