GH-109975: Copyedit 3.13 What's New: Other Language Changes (GH-123086)
(cherry picked from commit d60b97a833)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
GH-109975: Copyedit 3.13 What's New: New Features (GH-122990)
(cherry picked from commit b106cf8d97)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
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>
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>
gh-105376: Restore deprecated logging warn() method (GH-122775)
This reverts commit dcc028d924 and
commit 6c54e5d721.
Keep the deprecated logging warn() method in Python 3.13.
(cherry picked from commit d3239976a8)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
gh-121103: Update site module docs for free-threaded installs (GH-122737)
(cherry picked from commit 1429651a06)
Co-authored-by: Sam Gross <colesbury@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
gh-121650: Encode newlines in headers, and verify headers are sound (GH-122233)
GH-GH- 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.
GH-GH- Verify that email headers are well-formed
This should fail for custom fold() implementations that aren't careful
about newlines.
(cherry picked from commit 0976339818)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Bas Bloemsaat <bas@bloemsaat.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Remove outdated note about instance methods from datamodel.rst (GH-122471)
(cherry picked from commit c68cb8e0c9)
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
gh-105733: Soft-deprecate ctypes.ARRAY, rather than hard-deprecating it. (GH-122281)
Soft-deprecate ctypes.ARRAY, rather than hard-deprecating it.
Partially reverts 2211454fe2
(cherry picked from commit 3833d27f98)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Re-order table of corresponding functions with the following priorities:
1. Pure functionality is at the top
2. `os.path` functions are shown before `os` functions
3. Similar functionality is kept together
4. Functionality follows docs order where possible
Add a few missed correspondences:
- `os.path.isjunction` and `Path.is_junction`
- `os.path.ismount` and `Path.is_mount`
- `os.lstat()` and `Path.lstat()`
- `os.lchmod()` and `Path.lchmod()`
Also add footnotes describing a few differences.
(cherry picked from commit cbac8a3888)
Co-authored-by: Barney Gale <barney.gale@gmail.com>
Docs: Use cross-reference to `os.uname` in `sysconfig.get_platform` (GH-122083)
(cherry picked from commit 498cb6dff1)
Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
Relatedly, emit the `cpython.run_startup` event from the Python version of
`PYTHONSTARTUP` handling.
(cherry picked from commit dc93d1125f)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Docs: spelling and grammar fixes (GH-122084)
Corrected some grammar and spelling issues in documentation.
(cherry picked from commit bc264eac3a)
Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
gh-120522: Apply App Store compliance patch during installation (GH-121947)
Adds a --with-app-store-compliance configuration option that patches out code known to be an issue with App Store review processes. This option is applied automatically on iOS, and optionally on macOS.
(cherry picked from commit 728432c804)
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Delete stale note about mp.Lock.acquire/SIGINT (GH-120929)
(cherry picked from commit 0dcbc83853)
Co-authored-by: Andrey Mishchenko <mishchea@gmail.com>
gh-121977: Add tips for handling unhashable data (GH-122075)
(cherry picked from commit ebc18abbf3)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>