gh-105017: Include CRLF lines in strings and column numbers (GH-105030)
(cherry picked from commit 96fff35325)
Co-authored-by: Marta Gómez Macías <mgmacias@google.com>
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
For test_widgets.MenuTest.test_configure_type, the options
in the error message change to alphabetical order.
---------
(cherry picked from commit 897e716d03)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
gh-104992: [What's New in 3.11] Document unittest.TestProgram.usageExit's deprecation (GH-104994)
Document unittest.TestProgram.usageExit's pending removal in 3.13
(cherry picked from commit 7df861c23c)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
gh-104839: Prevent test_venv AddressSanitizer spam (GH-105005)
Pass any ASAN_OPTIONS environment variable through to the child process
so that leak sanitizer being disabled on our CI and buildbots stays
true in the children.
(cherry picked from commit a17f160376)
Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>
For backwards compatibility, accept backslashes as path separators in
`PurePosixPath` if an instance of `PureWindowsPath` is supplied.
This restores behaviour from Python 3.11.
(cherry picked from commit 328422ce61)
Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Use `str.lower()` rather than `ntpath.normcase()` to normalize case of
Windows paths. This restores behaviour from Python 3.11.
(cherry picked from commit ad0be361c9)
Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
gh-104984: remove kwargs and starargs from Call & ClassDef (GH-104986)
These fields are removed in 025e9ebd0a
(cherry picked from commit 61c1d6760f)
Co-authored-by: Shaygan Hooshyari <sh.hooshyari@gmail.com>
gh-104972: Ensure that line attributes in tokens in the tokenize module are correct (GH-104975)
(cherry picked from commit 3fdb55c482)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
gh-102024: Reduced _idle_semaphore.release calls (GH-102025)
Reduced _idle_semaphore.release calls in concurrent.futures.thread._worker
_idle_semaphore.release() is now only called if only work_queue is empty.
---------
(cherry picked from commit 0242e9a57a)
Co-authored-by: Andrii Kuzmin <jack.cvr@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
gh-104372: Drop the GIL around the vfork() call. (GH-104782)
On Linux where the `subprocess` module can use the `vfork` syscall for
faster spawning, prevent the parent process from blocking other threads
by dropping the GIL while it waits for the vfork'ed child process `exec`
outcome. This prevents spawning a binary from a slow filesystem from
blocking the rest of the application.
Fixes GH-104372.
(cherry picked from commit d08679212d)
Co-authored-by: Gregory P. Smith <gps@python.org>
Correctly set the exit code when builds fail
Also build docs as part of the test
(cherry picked from commit 569b2b8d61)
Co-authored-by: Steve Dower <steve.dower@python.org>
Fix indentation in `json.AttrDict` REPL example (GH-104930)
This is causing the docs to be rendered incorrectly.
(cherry picked from commit 38539ef126)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Fix test_importlib.test_side_effect_import() (GH-104840)
Wait until the thread spawn by the import completes to avoid dangling
threads. With this fix, the following command no longer fails:
./python -m test --fail-env-changed test_importlib -m test_side_effect_import -F -j20
(cherry picked from commit 426950993f)
Co-authored-by: Victor Stinner <vstinner@python.org>
gh-99108: Refresh HACL* (GH-104808)
Refresh HACL* from upstream to improve SHA2 performance and fix a 32-bit issue in SHA3.
(cherry picked from commit 160321e530)
Co-authored-by: Jonathan Protzenko <protz@microsoft.com>
Improve test coverage for is_typeddict (GH-104884)
In particular, it's important to test that is_typeddict(TypedDict)
returns False.
(cherry picked from commit 1497607a8e)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
gh-104866: Tokenize should emit NEWLINE after exiting block with comment (GH-104870)
(cherry picked from commit c90a862cdc)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Order of events:
Terry merged new idlelib test into main.
Ms. I. made a 3.12 backport; tests passed.
Pablo merged the tokenize change with idlelib test fix into main.
Pablo merged a 3.12 backport without the idle test fix
as the backport of the latter had not yet been been merged.
Terry merged the idlelib test backport. The new test failed
on at least 4 3.12 buildbots because of the tokenize change.
This PR backports the now needed idlelib test fix.
(cherry picked from commit c8cf9b4)
gh-104719: IDLE - test existence of all tokenize references. (GH-104767)
Class editor.IndentSearcher contains all editor references to tokenize module.
Module io tokenize reference cover those other modules.
(cherry picked from commit e561c09975)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
gh-102856: Add changes related to PEP 701 in 3.12 What's New docs (GH-104824)
(cherry picked from commit c45701e9ef)
Co-authored-by: Marta Gómez Macías <mgmacias@google.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
gh-104372: use == -1 before PyErr_Occurred (GH-104831)
The ideal pattern for this. (already in the 3.11 backport)
(cherry picked from commit 7f963bfc79)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
gh-103295: fix stack overwrite on 32-bit in perf map test harness (GH-104811)
(cherry picked from commit e0b3078705)
Co-authored-by: Carl Meyer <carl@oddbird.net>
gh-99108: Release the GIL around hashlib built-in computation (GH-104675)
This matches the GIL releasing behavior of our existing `_hashopenssl`
module, extending it to the HACL* built-ins.
Includes adding comments to better describe the ENTER/LEAVE macros
purpose and explain the lock strategy in both existing and new code.
(cherry picked from commit 2e5d8a90aa)
Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>