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>
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>
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>
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>
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>
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>
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>
Docs: Standardise versionchanged text in weakref.rst (GH-122898)
(cherry picked from commit db8b83c2b0)
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
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>
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>
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>
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>
[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>
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)
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>
* 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
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>