Doc: Allow translating a code block in the tutorial (GH-131353)
(cherry picked from commit 3224b99872)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Chris Markiewicz <effigies@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
gh-127833: lexical analysis: Add backticks to BOM example (GH-132407)
(cherry picked from commit 0552ce0fb2)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
gh-133361: move the explanation of dict equal before its use (GH-133424)
Also move up the explanation of insertion order preservation. Both paragraphs seemed out of place down where they were.
---------
(cherry picked from commit 61ac88c06e)
Co-authored-by: Yongzi Li <1538321957@qq.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
gh-132921: Fix setuptools._distutils.dep_util deprecation
Get newer_group from setuptools.modified on recent setuptools
versions, but keep support for old setuptools versions.
gh-130117: Document why nested `Union`, `Literal`, and `Annotated` types referenced through a type alias are not flattened (GH-130119)
(cherry picked from commit b936ccdb6f)
Co-authored-by: Valentin Berlier <berlier.v@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 0c5151bc81)
Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
(cherry picked from commit 07f416a3f0)
Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
To support virtual terminal mode in Windows PYREPL, we need a scanner
to read over the supported escaped VT sequences.
Windows REPL input was using virtual key mode, which does not support
terminal escape sequences. This patch calls `SetConsoleMode` properly
when initializing and send sequences to enable bracketed-paste modes
to support verbatim copy-and-paste.
(cherry picked from commit a65366ed87)
Co-authored-by: Y5 <124019959+y5c4l3@users.noreply.github.com>
Signed-off-by: y5c4l3 <y5c4l3@proton.me>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Dustin L. Howett <dustin@howett.net>
Co-authored-by: wheeheee <104880306+wheeheee@users.noreply.github.com>
GH-133410: Use commit hashes for change detection (gh-133416)
(cherry picked from commit d530e74e44)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
[tests] test_subprocess maybe avoid a timeout race condition? (GH-133420)
The few buildbot failures on https://github.com/python/cpython/pull/133103
are possibly just due to racing a child process launch and exit?
(cherry picked from commit b64aa302d7)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
gh-133089: Use original timeout value for `TimeoutExpired` when the func `subprocess.run` is called with a timeout (GH-133103)
(cherry picked from commit 2bbcaedb75)
Signed-off-by: Manjusaka <me@manjusaka.me>
Co-authored-by: Nadeshiko Manju <me@manjusaka.me>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
* Ensure that destructors are called in the test that created interpreters, not after finishing it.
* Try to create/run interpreters in threads simultaneously.
* Mark tests that requires over 6GB of memory with bigmemtest.
(cherry picked from commit 61b50a98b4)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
In the C implementation, remove __reduce__ and __reduce_ex__ methods
that always raise TypeError and restore __getstate__ methods that always
raise TypeErrori.
This restores fine details of the pre-3.12 behavior and unifies
both implementations.
(cherry picked from commit e9253ebf74)
The X/Open curses specification[0] and ncurses documentation[1]
both state that subwindows must be deleted before the main window.
Deleting the windows in the wrong order causes a double-free with
NetBSD's curses implementation.
To fix this, keep track of the original window object in the subwindow
object, and keep a reference to the original for the lifetime of
the subwindow.
[0] https://pubs.opengroup.org/onlinepubs/7908799/xcurses/delwin.html
[1] https://invisible-island.net/ncurses/man/curs_window.3x.html
(cherry picked from commit 0af61fe2f4)
Co-authored-by: Michael Forney <mforney@mforney.org>
gh-114713: Revert gh-114731 (GH-133330)
Revert "gh-114713: Handle case of an empty string passed to `zoneinfo.ZoneInfo` (GH-114731)"
This reverts commit 884df116d7.
(cherry picked from commit fe44fc4f43)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
gh-132995: Upgrade bundled pip to 25.1.1 (gh-132997)
* gh-132995: Upgrade bundled pip to 25.1.1
(cherry picked from commit a512905e15)
Co-authored-by: Paul Moore <p.f.moore@gmail.com>
gh-119605: Respect `follow_wrapped` for `__init__` and `__new__` when getting class signature with `inspect.signature` (GH-132055)
(cherry picked from commit b8633f9aca)
Co-authored-by: Xuehai Pan <XuehaiPan@pku.edu.cn>
gh-132246: Add PEP 688 to C Buffer Protocol docs (GH-132249)
(cherry picked from commit 8421b648e9)
Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Adds a retry strategy when downloading compilation resources for Android, plus some other cleanups.
(cherry picked from commit feac343d1a)
Co-authored-by: Malcolm Smith <smith@chaquo.com>
Include IPHONEOS_DEPLOYMENT_TARGET in iOS shim targets.
(cherry picked from commit 6e907c4d1f)
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Apply 'mod' role to typing module (GH-133201)
(cherry picked from commit 2b67db7ce3)
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Remove redundant ``--keep-going`` when running Sphinx (GH-133156)
(cherry picked from commit c78216e42c)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
gh-133167: Fix compilation process with `--enable-optimizations` and `--without-docstrings` (GH-133187)
(cherry picked from commit cc39b19f0f)
Co-authored-by: sobolevn <mail@sobolevn.me>