gh-122982: Extend the deprecation period for bool inversion by two years (GH-123306)
(cherry picked from commit 249b083ed8)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
(cherry picked from commit 127660bcdb)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
gh-123228: fix return type for _ReadlineWrapper.get_line_buffer() (GH-123281)
(cherry picked from commit ca18ff2a34)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>
gh-123229: Fix valgrind warning by initializing the f-string buffers to 0 in the tokenizer (GH-123263)
(cherry picked from commit adc5190014)
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Make sure that pyrepl uses the same logic for sys.tracebacklimit as both
the basic repl and the standard sys.excepthook
(cherry picked from commit 63603bca35)
gh-122546: Relax SyntaxError check when raising errors on the new REPL (GH-123233)
(cherry picked from commit 4c3f0cbeae)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Frames of methods in code and codeop modules was show with non-default
sys.excepthook.
Save correct tracebacks in sys.last_traceback and update __traceback__
attribute of sys.last_value and sys.last_exc.
(cherry picked from commit e73e7a7abd)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
gh-118658: Return consistent types from `get_un/verified_chain` in `SSLObject` and `SSLSocket` (GH-118669)
(cherry picked from commit 8ef358dae1)
Co-authored-by: Mateusz Nowak <nowak.mateusz@hotmail.com>
Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
gh-123110: correct note about _Bool in the struct module docs (GH-123111)
(cherry picked from commit b0f462d4c8)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Docs: Run ``latexmk`` in parallel when creating PDFs (GH-123113)
(cherry picked from commit 79c542b5cc)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Check that the current default heap is initialized in
`_mi_os_get_aligned_hint` and `mi_os_claim_huge_pages`.
The mimalloc function `_mi_os_get_aligned_hint` assumes that there is an
initialized default heap. This is true for our main thread, but not for
background threads. The problematic code path is usually called during
initialization (i.e., `Py_Initialize`), but it may also be called if the
program allocates large amounts of memory in total.
The crash only affected the free-threaded build.
(cherry picked from commit d061ffea7b)
Co-authored-by: Sam Gross <colesbury@gmail.com>
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-122584: Import mimalloc headers in a C++ context (GH-122587)
(cherry picked from commit 1dad23edbc)
Co-authored-by: Michael Droettboom <mdboom@gmail.com>
gh-116622: Add Android test script (GH-121595)
Adds a script for running the test suite on Android emulator devices. Starting
with a fresh install of the Android Commandline tools; the script manages
installing other requirements, starting the emulator (if required), and
retrieving results from that emulator.
(cherry picked from commit f84cce6f25)
Co-authored-by: Malcolm Smith <smith@chaquo.com>
gh-116622: Android logging fixes (GH-122698)
Modifies the handling of stdout/stderr redirection on Android to accomodate
the rate and buffer size limits imposed by Android's logging infrastructure.
(cherry picked from commit b0c48b8fd8)
Co-authored-by: Malcolm Smith <smith@chaquo.com>
gh-123046: Fix regexp to catch cases where the module name is omitted from the weakref repr (GH-123047)
(cherry picked from commit 786cac0c64)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: sobolevn <mail@sobolevn.me>
gh-116608: Apply style and compatibility changes from importlib_metadata. (GH-123028)
(cherry picked from commit e913d2c87f)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.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-85633: Fix pathlib test failures on filesystems without world-write. (GH-122883)
Replace `umask(0)` with `umask(0o002)` so the created files are not
world-writable, and replace `umask(0o022)` with `umask(0o026)` to check
that permissions for 'others' can still be set.
(cherry picked from commit 5f68511522)
Co-authored-by: Barney Gale <barney.gale@gmail.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>