gh-144706: Warn against using synchronization primitives within signal handlers (GH-144736)
(cherry picked from commit 945bf8ce1b)
Co-authored-by: Robsdedude <dev@rouvenbauer.de>
gh-142518: Define lock-free and per-object lock (GH-144548)
- Add definitions of lock-free and per-object lock to the glossary
- Cross-reference these from list thread safety notes
- Change admonition to rubric
(cherry picked from commit 12dbae4c02)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
For `enum.bin`, update versionadded directive from 3.10 to 3.11 (GH-144574)
(cherry picked from commit d73634935c)
Co-authored-by: Guo Ci <zguoci@gmail.com>
gh-143700: document `secrets.DEFAULT_ENTROPY` as an opaque value (GH-144568)
(cherry picked from commit 934997218e)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
gh-142044: Add note to prefer `asyncio.timeout[_at]` over `asyncio.Timeout` (GH-144449)
(cherry picked from commit 0e7c06a858)
Co-authored-by: kovan <xaum.io@gmail.com>
gh-140490: Document changes for `PurePath.stem` in Python 3.14 (GH-144450)
(cherry picked from commit 16efaa225c)
Co-authored-by: kovan <xaum.io@gmail.com>
- Group the macros
- Roughly order them to put the most important ones first
- Add expansions where it makes sense; especially if there's
an equivalent in modern C or a common compiler
(cherry picked from commit f85e1170d2)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
gh-127313: Use getLogger() without argument to get root logger in logging cookbook (GH-143683)
Use getLogger() to get root logger in logging cookbook
(cherry picked from commit 53fecbe6e1)
Co-authored-by: AN Long <aisk@users.noreply.github.com>
It does not support an ASCII string.
Also add more tests.
(cherry picked from commit 25a10b60b0)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
gh-143513: Remove importlib.abc documentation for removed ABCs (GH-143605)
In 3.11 ResourceReader, Traversable, & TraversableResources moved from importlib.abc to importlib.resources.abc (commit e712a5b277).
In 3.12 old import locations were deprecated (commit 71848c9609).
In 3.14 backwards-compat support was removed (commit 0751511d24).
(cherry picked from commit f8262b84f5)
Co-authored-by: Alex Willmer <alex@moreati.org.uk>
Co-authored-by: Brett Cannon <brett@python.org>
This ensures they show up as C macros in search and the Sphinx inventory.
(cherry picked from commit fb690c38ca)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
gh-141004: Mark up docs of old PyMem macros (GH-143783)
These had a docs-only deprecation notice since the first version of the docs in this repo. Nowadays we call things “soft deprecated” if there's just a note in the docs.
The deprecated directive needs a version, I went with the first one that had the notice (2.0; it's not in 1.6):
- https://docs.python.org/release/2.0/api/memoryInterface.html
- https://docs.python.org/release/1.6/api/memoryInterface.html
Since PEP 445, they are now direct aliases; there are no (additional) binary compatibility concerns over the preferred names.
(cherry picked from commit a009e78b79)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
gh-143993: Document ways to disable remote debugging support (GH-143994)
Although PEP 768 mentions how to disable the mechanism of
remote debugging, it is not documented in the Python docs.
This change adds a note on how to disable remote debugging support
in a Python interpreter to the remote debugging how-to.
(cherry picked from commit 0b5f8359c5)
Co-authored-by: Rafael Weingartner-Ortner <38643099+RafaelWO@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
gh-143774 - Improve IDLE Format Paragraph doc (GH-143775)
Add a reminder to not rewrap code line to the Menu => Format => Reformat Paragraph entry.
In Editing and Nagivagion, add a new 'Format block' subsection that defines 'paragraph'
to better match what is dependably handled as more or less expected.
In particular, specify equal indents and that the resulting indent equals original indent.
Also mention that selections are expanded to complete lines and how to modify max length.
(Also fix a couple case errors in cross references.)
(cherry picked from commit fa3abf5a51)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Use more relevant terminology instead of "master"/"slave" widgets where possible.
(cherry picked from commit 813fc7a291)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
The behaviour of Cut in nested parentheses, Repeat, Opt, and similar
is somewhat chaotic. Apparently even the academic papers on PEG aren't
as clear as they could be.
And it doesn't really matter. Python only uses top-level cuts.
When that changes, we can clarify as much as necessary (and even
change the implementation to make sense for what we'll need).
Document that this is deliberately unspecified, and add a test to
make sure any decision is deliberate, tested and documented.
(cherry picked from commit f0a0467c17)
Co-authored-by: Petr Viktorin <encukou@gmail.com>