gh-76637: Note that `undefined` Codec is for testing (GH-136531)
Closes GH-76637
(cherry picked from commit 975b57d945)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
gh-102740: Clarify time.monotonic() "system-wide" in the doc (GH-136431)
(cherry picked from commit 9c4d287775)
Co-authored-by: Victor Stinner <vstinner@python.org>
gh-136032: Fix `argparse.BooleanOptionalAction` doc (GH-136133)
(cherry picked from commit 1953713d0d)
Co-authored-by: W. H. Wang <mattwang44@gmail.com>
gh-86682: Add versionadded for sys._getframemodulename (GH-136325)
add versionadded for sys._getframemodulename
(cherry picked from commit 11f074b243)
Co-authored-by: Anthony Sottile <asottile@umich.edu>
* Turn the __future__ table to list-table.
This'll make it easier to add entries that need longer markup
* Semantic markup for __future__ feature descriptions.
* Document CO_* C macros.
(cherry picked from commit 2468aafe98)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
gh-127502: Remove XML vulnerability table (GH-135294)
* Remove the table
* Replace warnings with notes
Latest releases of Python 3.9-3.15 include expat 2.7.1 which is not vulnerable.
expat 2.6.0 was released in February 2024.
(cherry picked from commit cb99d99277)
Co-authored-by: Victor Stinner <vstinner@python.org>
gh-109070: Document that get_context in multiprocessing have side effect (GH-136341)
Document that get_context in multiprocessing have side effect
(cherry picked from commit 77a8bd29da)
Co-authored-by: AN Long <aisk@users.noreply.github.com>
gh-135252: Document Zstandard integration across zipfile, shutil, and tarfile (GH-135311)
Document Zstandard integration across zipfile, shutil, and tarfile
(cherry picked from commit 938a5d7e62)
Co-authored-by: Emma Smith <emma@emmatyping.dev>
gh-136169: Update parameter name in fractions.from_float method (GH-136172)
Update parameter name in fractions.from_float method
(cherry picked from commit 9c0cb5beb8)
Co-authored-by: Vladyslav Lazoryk <80263725+lazorikv@users.noreply.github.com>
* gh-127604: Docs: Include a C stack in the `faulthandler` example (GH-136081)
(cherry picked from commit 3947847914)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Docs: Fix indentation in `slice` class of `functions.rst` (GH-134393)
Paragraph should not be under `slice.step`. It applies to the whole class.
(cherry picked from commit 6227662ff3)
Co-authored-by: Rob Reynolds <13379223+reynoldsnlp@users.noreply.github.com>
Adds a note about flush/close on copyfileobj, and updates
the Emscripten build script to follow documented advice.
(cherry picked from commit 34393cbdd4)
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Docs: Use `arguments` to replace `args` in `argparse.rst` (GH-135510)
(cherry picked from commit caad163b69)
Co-authored-by: Yongzi Li <204532581+Yzi-Li@users.noreply.github.com>
gh-89083: add links to RFC 9562 sections in UUID docs (GH-135684)
We also sync the docs for UUIDv1 and UUIDv6 concerning the node address and clock sequence.
---------
(cherry picked from commit b881e3db1e)
Co-authored-by: Weilin Du <108666168+LamentXU123@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Docs: Emphasize parameter name in `pkgutil.iter_importers` (GH-135597)
(cherry picked from commit ff639af8ee)
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Most importantly, this resolves the issues with functions and types defined in __main__.
It also expands the number of supported objects and simplifies the implementation.
(cherry picked from commit 725da50520, AKA gh-133957)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
Docs: Fix markups for emphasis (GH-135598)
The word emphasis character `_` is not supported as sphinx markup, so changed to `*`.
(cherry picked from commit 46c60e0d0b)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
---------
(cherry picked from commit f079979599)
Co-authored-by: Donghee Na <donghee.na@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: T. Wouters <thomas@python.org>
gh-67022: Document bytes/str inconsistency in email.header.decode_header() and suggest email.headerregistry.HeaderRegistry as a sane alternative (GH-92900)
* gh-67022: Document bytes/str inconsistency in email.header.decode_header()
This function's possible return types have been surprising and error-prone
for the entirety of its Python 3.x history. It can return either:
1. `typing.List[typing.Tuple[bytes, typing.Optional[str]]]` of length >1
2. or `typing.List[typing.Tuple[str, None]]`, of length exactly 1
This means that any user of this function must be prepared to accept either
`bytes` or `str` for the first member of the 2-tuples it returns, which is a
very surprising behavior in Python 3.x, particularly given that the second
member of the tuple is supposed to represent the charset/encoding of the
first member.
This patch documents the behavior of this function, and adds test cases
to demonstrate it.
As discussed in bpo-22833, this cannot be changed in a backwards-compatible
way, and some users of this function depend precisely on the existing
behavior.
Add warnings about obsolescence of 'email.header.decode_header' and 'email.header.make_header' functions.
Recommend use of `email.headerregistry.HeaderRegistry` instead, as suggested
in https://github.com/python/cpython/pull/92900#discussion_r1112472177
(cherry picked from commit 60181f4ed0)
Co-authored-by: Dan Lenski <dlenski@gmail.com>