Commit graph

119701 commits

Author SHA1 Message Date
Miss Islington (bot)
4eaf4891c1
[3.12] gh-121285: Remove backtracking when parsing tarfile headers (GH-121286) (GH-123543)
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-08-31 22:35:24 +00:00
Miss Islington (bot)
5b3fcc04e3
[3.12] gh-123407: Enable translating literal and code blocks (GH-123408) (#123531)
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:38:11 +00:00
Miss Islington (bot)
bf99818303
[3.12] gh-108172: do not override OS preferred browser if it is a super-string of a known browser (GH-113011) (GH-123528)
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-08-31 06:33:06 +00:00
Wei-Hsiang (Matt) Wang
d5abd02f36
[3.12] gh-123492: Remove unnecessary :func: parentheses (gh-123493) (#123512) 2024-08-30 20:09:55 +03:00
Irit Katriel
0181aa2e3e
[3.12] gh-123142: fix too wide source location of GET_ITER/GET_AITER (GH-123420). (#123436)
(cherry picked from commit 61bef6245c)
2024-08-28 18:41:40 +01:00
Miss Islington (bot)
ccc6c2b8c0
[3.12] gh-120226: Fix test_sendfile_close_peer_in_the_middle_of_receiving on Linux >= 6.10 (GH-120227) (#123422)
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-08-28 12:47:41 +00:00
Miss Islington (bot)
248af25fb4
[3.12] gh-123254: Improve tuple C API docs with more info about errors (GH-123255) (#123415)
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:37:06 +00:00
Terry Jan Reedy
4deb32a992
[3.12] gh-121804: Backport idlelib.pyshell change (GH-121886) (#123366)
To aid future backports here.
2024-08-26 19:59:14 -04:00
Miss Islington (bot)
8824c7219a
[3.12] Further revise idlelib/Icons/README.text (GH-123364) (#123365)
In particular, add trademark derivative approval information.
(cherry picked from commit fe85a8291d)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-08-26 18:08:47 -04:00
Miss Islington (bot)
33d9e27b2b
[3.12] Rewrite idlelib/Icons/README.txt (GH-123329) (#123331)
Rewrite idlelib/Icons/README.txt (GH-123329)
(cherry picked from commit 6401cdf908)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-08-25 22:40:13 -04:00
Miss Islington (bot)
ffa282cc35
[3.12] gh-82378: Document the difference between sys.tracebacklimit and the limit arguments (GH-123286) (#123326)
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 22:57:16 +00:00
Miss Islington (bot)
86cad493b8
[3.12] gh-123297: Propagate LD_FLAGS to LDCXXSHARED in sysconfig (GH-123298) (#123320)
gh-123297: Propagate LD_FLAGS to LDCXXSHARED in sysconfig (GH-123298)
(cherry picked from commit c535a49e92)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2024-08-25 20:18:57 +00:00
Miss Islington (bot)
93d4a191ff
[3.12] gh-122982: Extend the deprecation period for bool inversion by two years (GH-123306) (#123317)
gh-122982: Extend the deprecation period for bool inversion by two years (GH-123306)
(cherry picked from commit 249b083ed8)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-08-25 19:40:11 +00:00
Miss Islington (bot)
dcc3eaef98
[3.12] gh-123067: Fix quadratic complexity in parsing "-quoted cookie values with backslashes (GH-123075) (#123104)
gh-123067: Fix quadratic complexity in parsing "-quoted cookie values with backslashes (GH-123075)

This fixes CVE-2024-7592.
(cherry picked from commit 44e458357f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-08-24 15:37:11 -07:00
Miss Islington (bot)
53a5576ec5
[3.12] Docs: Fix Makefile syntax (GH-123287) (#123289)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-08-24 18:29:21 +03:00
Pablo Galindo Salgado
7dec3d7acb
[3.12] gh-123229: Fix valgrind warning by initializing the f-string buffers to 0 in the tokenizer (GH-123263) (#123265)
(cherry picked from commit adc5190014)

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
2024-08-23 14:04:25 +01:00
Serhiy Storchaka
8fe586d27a
[3.12] gh-122478: Remove internal frames from tracebacks in REPL (GH-122528) (GH-122816)
Frames of methods in code and codeop modules was show with non-default
sys.excepthook.

Save correct tracebacks in sys.last_traceback and update __traceback__
attribute of sys.last_value and sys.last_exc.
(cherry picked from commit e73e7a7abd)
2024-08-23 09:27:03 +03:00
Donghee Na
6e6855950a
[3.12] gh-123083: Fix a potential use-after-free in ``STORE_ATTR_WITH… (#123237)
[3.12] gh-123083: Fix a potential use-after-free in ``STORE_ATTR_WITH_HINT`` (gh-123092)
(cherry picked from commit 297f2e093e)
2024-08-23 01:37:40 +09:00
Irit Katriel
fbbde4dc6a
[3.12] gh-123142: Fix too wide source locations in tracebacks of exceptions from broken iterables in comprehensions (GH-123173). (#123210)
(cherry picked from commit ec89620e5e)
2024-08-22 10:22:43 +01:00
Miss Islington (bot)
8edfa0b0b4
[3.12] gh-123110: correct note about _Bool in the struct module docs (GH-123111) (#123127)
gh-123110: correct note about _Bool in the struct module docs (GH-123111)
(cherry picked from commit b0f462d4c8)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2024-08-19 13:01:12 +05:30
Miss Islington (bot)
030b48c27a
[3.12] gh-116789: Add more tests for inspect.getmembers (GH-116802) (#123130)
gh-116789: Add more tests for `inspect.getmembers` (GH-116802)
(cherry picked from commit c15bfa9a71)

Co-authored-by: sobolevn <mail@sobolevn.me>
2024-08-18 19:18:53 +03:00
Miss Islington (bot)
e9d1bf353c
[3.12] Docs: Run `latexmk` in parallel when creating PDFs (GH-123113) (#123116)
Docs: Run ``latexmk`` in parallel when creating PDFs (GH-123113)
(cherry picked from commit 79c542b5cc)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-08-17 21:04:34 +00:00
Miss Islington (bot)
b9667e8243
[3.12] fix typo in dis.rst (GH-121612) (#123096)
fix typo in dis.rst (GH-121612)
(cherry picked from commit e9287ea426)

Co-authored-by: mathysEthical <110499907+mathysEthical@users.noreply.github.com>
2024-08-17 14:33:04 +05:30
Miss Islington (bot)
28f37700bc
[3.12] gh-122519: Adding socket module shutdown() constants description (GH-122543) (#123094)
gh-122519: Adding socket module shutdown() constants description (GH-122543)
(cherry picked from commit 8a59deca59)

Co-authored-by: Damien <81557462+Damien-Chen@users.noreply.github.com>
2024-08-17 08:35:50 +00:00
Miss Islington (bot)
41090b7ba0
[3.12] gh-112182: Replace StopIteration with RuntimeError for future (GH-113220) (GH-123033)
When an `StopIteration` raises into `asyncio.Future`, this will cause
a thread to hang. This commit address this by not raising an exception
and silently transforming the `StopIteration` with a `RuntimeError`,
which the caller can reconstruct from `fut.exception().__cause__`
(cherry picked from commit 4826d52338)

Co-authored-by: Jamie Phan <jamie@ordinarylab.dev>
2024-08-15 15:34:53 +00:00
Miss Islington (bot)
9f153a2acf
[3.12] gh-123005: Add version added in enum.Flag.__len__ (GH-123007) (#123025)
gh-123005: Add version added in enum.Flag.__len__ (GH-123007)
(cherry picked from commit 8e2dc7f380)

Co-authored-by: Damien <81557462+Damien-Chen@users.noreply.github.com>
2024-08-14 22:30:44 +01:00
Miss Islington (bot)
c3ee1a7f05
[3.12] gh-122255: Add black box tests in test_warnings (GH-122227) (GH-122819)
They are similar to white box tests for gh-86298 in test_importlib.
(cherry picked from commit fe13c9baf4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-08-14 14:12:34 +00:00
Miss Islington (bot)
ecf9971c97
[3.12] gh-122965: Fix reusable-change-detection.yml on workflow_dispatch (GH-122966) (#123009)
gh-122965: Fix `reusable-change-detection.yml` on `workflow_dispatch` (GH-122966)
(cherry picked from commit 6ae942f412)

Co-authored-by: sobolevn <mail@sobolevn.me>
2024-08-14 12:32:42 +00:00
Miss Islington (bot)
344a7b535b
[3.12] Fix print usage in turtle doctests (GH-122940) (#122978)
Fix `print` usage in `turtle` doctests (GH-122940)
(cherry picked from commit 901d94992e)

Co-authored-by: sobolevn <mail@sobolevn.me>
2024-08-13 16:58:37 +00:00
Miss Islington (bot)
cd69085366
[3.12] gh-122944: Fix incorrect prompt strings in the Python Tutorial (GH-122949) (#122955)
gh-122944: Fix incorrect prompt strings in the Python Tutorial (GH-122949)

In the REPL, top level comments are followed by a primary, not secondary prompt.
Fix the places in the in the tutorial that use the latter.
(cherry picked from commit be90648fb2)

Co-authored-by: Damien <81557462+Damien-Chen@users.noreply.github.com>
2024-08-12 18:43:53 +00:00
Miss Islington (bot)
0585a3fdb9
[3.12] gh-99437: runpy: decode path-like objects before setting globals (#114838)
Co-authored-by: Kamil Turek <kamil.turek@hotmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-08-12 11:22:13 +03:00
Jason R. Coombs
f511a939b0
[3.12] gh-122903: Honor directories in zipfile.Path.glob. (GH-122908) (#122927)
(cherry picked from commit 6aa35f3002)
2024-08-12 01:03:03 +00:00
Miss Islington (bot)
dcc5182f27
[3.12] gh-122905: Sanitize names in zipfile.Path. (GH-122906) (#122923) 2024-08-11 20:35:17 -04:00
Miss Islington (bot)
92ad3be09b
[3.12] gh-122701: Fix wording of raw strings/bytes in lexical_analysis.rst (GH-122702) (#122915)
gh-122701: Fix wording of raw strings/bytes in `lexical_analysis.rst` (GH-122702)
(cherry picked from commit ea70439bd2)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-08-11 21:09:13 +00:00
Miss Islington (bot)
18d48052c2
[3.12] Docs: Standardise versionchanged text in weakref.rst (GH-122898) (#122912)
Docs: Standardise versionchanged text in weakref.rst (GH-122898)
(cherry picked from commit db8b83c2b0)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2024-08-11 20:46:05 +00:00
Miss Islington (bot)
f5009b69e0
[3.12] GH-120794: Use example paths with multiple parts in pathlib docs (GH-122887) (#122896)
GH-120794: Use example paths with multiple parts in pathlib docs (GH-122887)

In the documentation of `PosixPath` and `WindowsPath`, and their `Pure*`
equivalents, use example paths with multiple non-anchor parts.

(cherry picked from commit 363374cf69)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-08-10 22:31:59 +01:00
Miss Islington (bot)
d70c39905d
[3.12] gh-122868: Add more lower bounds for sphinxcontrib dependencies (GH-122891) (#122894)
gh-122868: Add more lower bounds for sphinxcontrib dependencies (GH-122891)
(cherry picked from commit 0959142e4d)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-08-10 20:58:38 +00:00
Miss Islington (bot)
d9444844d7
[3.12] gh-122868: Add lower bounds for sphinxcontrib dependencies (GH-122870) (#122872)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-08-10 01:33:38 +03:00
Miss Islington (bot)
1f779b0f33
[3.12] gh-120083: Add IDLE Hovertip foreground color needed for recent macOS (GH-120605) (#122592)
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-08-09 13:12:41 -04:00
Miss Islington (bot)
22fdeeb3cb
[3.12] gh-79846: Make ssl.create_default_context() ignore invalid certificates (GH-91740) (#122769)
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-08-09 12:55:36 -04:00
Miss Islington (bot)
9d7209fc93
[3.12] gh-113785: csv: fields starting with escapechar are not quoted (GH-122110) (GH-122259)
(cherry picked from commit a3327dbfd4)

Co-authored-by: Mikołaj Kuranowski <mkuranowski@gmail.com>
2024-08-09 16:04:29 +00:00
Victor Stinner
c57a33d006
[3.12] gh-122695: Fix double-free when using gc.get_referents with a freed _asyncio.FutureIter (#122837) (#122859)
[3.13] gh-122695: Fix double-free when using `gc.get_referents` with a freed `_asyncio.FutureIter` (#122837)

* Backport #122834 for 3.13

(cherry picked from commit e8fb088dba)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2024-08-09 14:33:24 +00:00
Miss Islington (bot)
c536f59c62
[3.12] gh-122744: test_venv: ignore pip's complaint about missing ssl (GH-122776) (GH-122822)
(cherry picked from commit 0d9c123d1a)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-08-09 09:27:11 +02:00
Serhiy Storchaka
f2cc8ad989
[3.12] gh-118814: Fix the TypeVar constructor when name is passed by keyword (GH-122664) (GH-122807)
Fix _PyArg_UnpackKeywordsWithVararg for the case when argument for
positional-or-keyword parameter is passed by keyword.
There was only one such case in the stdlib -- the TypeVar constructor.
(cherry picked from commit 540fcc62f5)
2024-08-08 09:49:50 +03:00
Miss Islington (bot)
8f4892ac52
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-08-07 19:39:51 +01:00
Miss Islington (bot)
2e8235302b
[3.12] Docs: Change remove to removes for consistency (GH-121072) (#122791)
Docs: Change `remove` to `removes` for consistency (GH-121072)
(cherry picked from commit 967a4f1d18)

Co-authored-by: smij720 <122238526+smij720@users.noreply.github.com>
2024-08-07 16:06:54 +00:00
Miss Islington (bot)
88f8385741
[3.12] Doc: cmdline.rst: Include -P and -R in usage (GH-122590) (#122784)
Doc: cmdline.rst: Include -P and -R in usage (GH-122590)

* ``-P``: safe path (https://docs.python.org/3/using/cmdline.htmlGH-cmdoption-P)
* ``-R``: hash randomization (https://docs.python.org/3/using/cmdline.htmlGH-cmdoption-R)
(cherry picked from commit c25898d51e)

Co-authored-by: Wim Jeantine-Glenn <hey@wimglenn.com>
2024-08-07 15:11:12 +00:00
Miss Islington (bot)
13c263c444
[3.12] gh-122511: Improve documentation for object identity of mutable/immutable types (GH-122512) (#122779)
gh-122511: Improve documentation for object identity of mutable/immutable types (GH-122512)
(cherry picked from commit 76bdeebef6)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-08-07 14:56:40 +01:00
Ned Deily
76a0dfa42e
[3.12] Workaround 3.12.5 bundled pip 24.2 issue on macOS 10.9 to 10.12. (#122774)
Workaround bundled pip 24.2 failures on macOS 10.9 to 10.12 installers.

See https://github.com/pypa/pip/issues/12901 for more information.
2024-08-07 08:29:43 -04:00
Thomas Wouters
f4aad5a6d2 Post 3.12.5 2024-08-07 13:34:56 +02:00