Enable colour for doctest on GitHub Actions (GH-123536)
(cherry picked from commit 0cba289870)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
gh-122136: test_asyncio: Don't fail if the kernel buffers more data than advertised (GH-123423)
(cherry picked from commit b379f1b26c)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
gh-123254: Improve `tuple` C API docs with more info about errors (GH-123255)
(cherry picked from commit 6f563e364d)
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Ensure that iOS test re-runs don't try to spawn a process. (GH-122994)
Adds the --single-process option to the iOS test runner to ensure re-runs execute in the same process.
(cherry picked from commit e03073ff20)
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Add a --rerun option to the iOS testbed. (GH-122992)
Enable --rerun when running tests on iOS.
(cherry picked from commit ce39d3c6bd)
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
gh-123177: Fix prompt for wrapped lines in pyrepl (GH-123324)
When display lines above the cursor come from the cache, the first line
to not come from the cache may be a wrapped line, starting half way
through a logical line in the buffer. Detect and handle this case to
avoid accidentally drawing a stray prompt in the middle of a logical
line.
(cherry picked from commit 602fcf97df)
Co-authored-by: Matt Wozniski <mwozniski@bloomberg.net>
gh-82378: Document the difference between sys.tracebacklimit and the limit arguments (GH-123286)
(cherry picked from commit 70bfef52b5)
Co-authored-by: CF Bolz-Tereick <cfbolz@gmx.de>
gh-123177: Deactivate line wrap for Apple Terminal via scape codes in the new REPL (GH-123267)
(cherry picked from commit fdb3f9b588)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
gh-123297: Propagate LD_FLAGS to LDCXXSHARED in sysconfig (GH-123298)
(cherry picked from commit c535a49e92)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
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>