Commit graph

119634 commits

Author SHA1 Message Date
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
Thomas Wouters
ff3bc82f7c Python 3.12.5 2024-08-06 21:08:49 +02:00
Miss Islington (bot)
b895f1804f
[3.12] gh-122334: Fix test_embed failure when missing _ssl module (GH-122630) (#122648)
gh-122334: Fix test_embed failure when missing _ssl module (GH-122630)
(cherry picked from commit 50b3603751)

Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
Co-authored-by: Wulian233 <1055917385@qq.com>
2024-08-06 20:59:55 +02:00
Pradyun Gedam
1c4d08d73e
[3.12] gh-122744: Bump bundled pip to 24.2 (#122747)
(cherry picked from commit 5b8a6c5186)

Co-authored-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
2024-08-06 18:50:14 +00:00
Gregory P. Smith
b31764104e
[3.12] gh-119577: Adjust DeprecationWarning when testing element truth values in Element tree (GH-119762) (#120190)
gh-119577: Adjust DeprecationWarning when testing element truth values in ElementTree (GH-119762)

Adjust DeprecationWarning when testing element truth values in
ElementTree, we're planning to go with the more natural True return
rather than a disruptive harder to code around exception raise, and are
deferring the behavior change for a few more releases.

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
2024-08-06 17:20:06 +00:00
Christopher Chianelli
e970431f13
[3.12] gh-117270: Add missed change to COMPARE_OP from 3.12 to dis documentation (GH-117272) (#117274) 2024-08-06 19:19:44 +02:00
Miss Islington (bot)
81bed0fe8a
[3.12] gh-120104: IDLE: Fix padding in config and search dialogs (GH-120107) (#122741)
(cherry picked from commit 4b66b6b7d6)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-08-06 17:07:35 +00:00
Petr Viktorin
4766d1200f
[3.12] gh-121650: Encode newlines in headers, and verify headers are sound (GH-122233) (#122599)
* gh-121650: Encode newlines in headers, and verify headers are sound (GH-122233)

- Encode header parts that contain newlines

Per RFC 2047:

> [...] these encoding schemes allow the
> encoding of arbitrary octet values, mail readers that implement this
> decoding should also ensure that display of the decoded data on the
> recipient's terminal will not cause unwanted side-effects

It seems that the "quoted-word" scheme is a valid way to include
a newline character in a header value, just like we already allow
undecodable bytes or control characters.
They do need to be properly quoted when serialized to text, though.

- Verify that email headers are well-formed

This should fail for custom fold() implementations that aren't careful
about newlines.

Co-authored-by: Bas Bloemsaat <bas@bloemsaat.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit 0976339818)

* Document changes as made in 3.12.5
2024-08-06 19:07:19 +02:00
Gregory P. Smith
01db0e404d
[3.12] gh-122573: Require Python 3.10 or newer for Windows builds (GH-122574) (#122677)
gh-122573: Require Python 3.10 or newer for Windows builds (GH-122574)

Match statements in tooling require a more recent Python. `Tools/cases_generator/*.py`

Co-authored-by: Jonathan Protzenko <protz@microsoft.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-08-06 18:53:32 +02:00
Miss Islington (bot)
70636659f0
[3.12] gh-83505: Add markdown mimetype mapping (GH-17995) (#118594)
gh-83505: Add markdown mimetype mapping (GH-17995)
(cherry picked from commit b6f0ab5b1c)

Co-authored-by: Ryan Batchelder <ryanbatch@gmail.com>
2024-08-06 10:05:18 -04:00
Miss Islington (bot)
be88b3b996
[3.12] Fix syntax in generate_re_casefix.py (GH-122699) (#122722)
This was broken in gh-97963.
(cherry picked from commit b72c748d7f)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-08-06 06:42:27 +00:00
Sergey B Kirpichev
2ff41583fd
[3.12] gh-122613: Document PyLong_GetInfo() (part of Limited API) (GH-122280) (#122644)
[3.12] gh-122613: Document PyLong_GetInfo() (part of Limited API) (GH-GH-122280)
(cherry picked from commit d91ac525ef)
2024-08-05 20:11:42 +02:00
Miss Islington (bot)
8f19be47b6
[3.12] gh-121367: [doc] BUILD_TUPLE arg can be 0 (GH-122663) (#122684)
gh-121367: [doc] BUILD_TUPLE arg can be 0 (GH-122663)
(cherry picked from commit 1422500d02)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2024-08-05 09:24:22 +00:00
Miss Islington (bot)
4d6b7b74a3
[3.12] Add 3.13 and remove 3.7 in Azure Pipelines (GH-122670) (#122672)
Co-authored-by: Damien <81557462+Damien-Chen@users.noreply.github.com>
2024-08-04 17:16:45 +00:00
Miss Islington (bot)
f7ae2c1f2a
[3.12] gh-122661: Remove GNU make-specific directive from Doc/Makefile (GH-122662) (#122669)
Co-authored-by: Libor Martínek <libas@acco.cz>
2024-08-04 17:24:57 +03:00
Miss Islington (bot)
62f224a9ad
[3.12] gh-122623: Improve c-api/bytearray.rst with error handling info (GH-122624) (#122659)
gh-122623: Improve `c-api/bytearray.rst` with error handling info (GH-122624)
(cherry picked from commit 151934a324)

Co-authored-by: sobolevn <mail@sobolevn.me>
2024-08-03 22:02:24 +00:00
Miss Islington (bot)
8f1b385ad6
[3.12] GH-121970: Fix `gettext` for audit events (GH-122651) (#122654)
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-08-03 16:47:43 +00:00
Miss Islington (bot)
e2103fc216
[3.12] Doc: Grammar fix in `library/ssl.rst`, 'Verifying certificates' (GH-122646) (#122650)
Doc: Grammar fix in ``library/ssl.rst``, 'Verifying certificates' (GH-122646)
(cherry picked from commit 06eb9701a1)

Co-authored-by: scottwoodall <scott.woodall@gmail.com>
2024-08-03 13:31:12 +00:00