gh-121266: Change dict check_lookup() return type to int (GH-121581)
(cherry picked from commit 51da3dfbf3)
Co-authored-by: Victor Stinner <vstinner@python.org>
gh-121988: Fix test hang when pyrepl is not available (GH-121990)
Also explicitly fail the test if we timeout while waiting for output so
that this failure mode is caught earlier.
(cherry picked from commit a09e215abf)
Co-authored-by: Sam Gross <colesbury@gmail.com>
GH-121970: Modernise the patchlevel extension (GH-121995)
(cherry picked from commit b7ad711fcb)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Docs: Fix a typo in What's New in Python 3.13 (GH-122051)
(cherry picked from commit 3de092b82f)
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
The futureobj freelist isn't thread-safe. We intend to re-enable the
freelist in a thread-safe way for 3.14 (but not 3.13).
(cherry picked from commit 97248204a1)
This is a small refactoring to the current design that allows us to
avoid manually iterating over threads.
This should also fix gh-118490.
(cherry picked from commit e059aa6b01)
Co-authored-by: mpage <mpage@meta.com>
gh-120930: Remove extra blank occuring in wrapped encoded words in email headers (GH-121747)
(cherry picked from commit cecaceea31)
Co-authored-by: Matthieu Caneill <matthieucan@users.noreply.github.com>
This adds tests for the documented behaviour of `pkgutil.extend_path`
regarding different argument types as well as for `*.pkg` files.
(cherry picked from commit 8f2532168b)
Co-authored-by: Andreas Stocker <andreas@stocker.co.it>
This is not something we can do too much about, without help from the
underlying libraries.
(cherry picked from commit 709db44255)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
GH-121970: Use Ruff to check and format the docs tools (GH-122018)
(cherry picked from commit 40855f3ab8)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@gmail.com>
GH-121970: Combine custom Pygments lexers into a package (GH-121976)
(cherry picked from commit 7431c3799e)
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-121970: Make ``DeprecatedRemoved`` a subclass of ``VersionChange`` (GH-121971)
(cherry picked from commit 898e90c3be)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
GH-121970: Improve the glossary preview in HTML search (GH-121991)
(cherry picked from commit adf0b94d1c)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Docs: Upgrade Sphinx to 7.4 (GH-121987)
(cherry picked from commit 420d943128)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
GH-117928: Bump the minimum Sphinx version to 6.2.1 (GH-121986)
(cherry picked from commit 7dd52b63ce)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
GH-121970: Use ``SphinxDirective`` instead of ``Directive`` (GH-121972)
(cherry picked from commit ac39151a09)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
gh-121621: Move asyncio_running_loop to private struct (GH-121939)
This avoids changing the ABI and keeps the field in the private struct.
(cherry picked from commit 81fd625b5c)
Co-authored-by: Sam Gross <colesbury@gmail.com>
gh-121528: Fix _PyObject_Init() assertion for stable ABI (GH-121725)
Add _Py_IsImmortalLoose() function for assertions.
(cherry picked from commit b826e459ca)
Co-authored-by: Victor Stinner <vstinner@python.org>
gh-78889: Stop IDLE Shell freezes from sys.stdout.shell.xyz (GH-121876)
Problem occurred when attribute xyz could not be pickled.
Since this is not trivial to selectively fix, block all
attributes (other than 'width'). IDLE does not access them
and they are private implementation details.
(cherry picked from commit 58753f33e4)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* Switch PyUnicode_InternInPlace to _PyUnicode_InternMortal, clarify docs
* Document immortality in some functions that take `const char *`
This is PyUnicode_InternFromString;
PyDict_SetItemString, PyObject_SetAttrString;
PyObject_DelAttrString; PyUnicode_InternFromString;
and the PyModule_Add convenience functions.
Always point out a non-immortalizing alternative.
* Don't immortalize user-provided attr names in _ctypes
(cherry picked from commit b4aedb23ae)
* The result has type Py_ssize_t, not intptr_t.
* Type cast between unsigned and signed integer types should be explicit.
* Downcasting should be explicit.
* Fix integer overflow check in sum().
(cherry picked from commit 1801545)