summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-118527: Use `_Py_ID(__main__)` for main module name (#118528)Sam Gross2024-05-031-1/+1
| | | | | Most module names are interned and immortalized, but the main module was not. This partially addresses a scaling bottleneck in the free-threaded when creating closure concurrently in the main module.
* gh-118513: Fix sibling comprehensions with a name bound in one and global in ↵Carl Meyer2024-05-033-39/+57
| | | | | | the other (#118526) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* gh-101732: Modules/_ssl.c: use Y2038 compatible openssl function when ↵Alexander Kanavin2024-05-032-0/+5
| | | | available (GH-118425)
* gh-116126: Implement PEP 696 (#116129)Jelle Zijlstra2024-05-0328-623/+1924
| | | | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* gh-117492: Clarify documentation of `typing.Never` (#117678)Nice Zombies2024-05-031-24/+22
| | | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-117953: Other Cleanups in the Extensions Machinery (gh-118206)Eric Snow2024-05-033-102/+410
| | | This change will make some later changes simpler.
* gh-116738: Make `_codecs` module thread-safe (#117530)Brett Simmers2024-05-026-79/+120
| | | | | | | | | | | | | | | The module itself is a thin wrapper around calls to functions in `Python/codecs.c`, so that's where the meaningful changes happened: - Move codecs-related state that lives on `PyInterpreterState` to a struct declared in `pycore_codecs.h`. - In free-threaded builds, add a mutex to `codecs_state` to synchronize operations on `search_path`. Because `search_path_mutex` is used as a normal mutex and not a critical section, we must be extremely careful with operations called while holding it. - The codec registry is explicitly initialized as part of `_PyUnicode_InitEncodings` to simplify thread-safety.
* gh-118500: Add pdb support for zipapp (#118501)Tian Gao2024-05-025-4/+77
|
* gh-118519: Fix empty weakref list check (#118520)Dino Viehland2024-05-021-1/+1
| | | Fix empty list check
* gh-117657: Fix TSAN list set failure (#118260)Dino Viehland2024-05-023-3/+90
| | | | | | | | | | | * Fix TSAN list set failure * Relaxed atomic is sufficient, add targetted test * More list * Remove atomic assign in list * Fixup white space
* gh-118486: Switch mkdir(mode=0o700) on Windows to use OWNER RIGHTS instead ↵Steve Dower2024-05-021-3/+16
| | | | of CURRENT_USER (GH-118515)
* Remove stray `__cplusplus` guard in sysmodule.c (#118511)Sam Gross2024-05-021-4/+0
|
* gh-118413: Fix test_release_task_refs on free-threaded build (#118494)Sam Gross2024-05-021-2/+1
| | | | | | The `time.sleep()` call should happen before the GC to give the worker threads time to clean-up their remaining references to objs. Additionally, use `support.gc_collect()` instead of `gc.collect()` just in case the extra GC calls matter.
* gh-90848: Fixed create_autospec ignoring configure_mock style kwargs (#118163)infohash2024-05-023-8/+26
|
* gh-93502: Add new C-API functions to trace object creation and destruction ↵Pablo Galindo Salgado2024-05-0210-8/+207
| | | | (#115945)
* gh-105879: Add support for keyword arguments to eval and exec (#105885)Raphael Gaschignard2024-05-025-33/+98
| | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* GH-118095: Unify the behavior of tier 2 FOR_ITER branch micro-ops (GH-118420)Mark Shannon2024-05-025-21/+56
| | | | | | * Target _FOR_ITER_TIER_TWO at POP_TOP following the matching END_FOR * Modify _GUARD_NOT_EXHAUSTED_RANGE, _GUARD_NOT_EXHAUSTED_LIST and _GUARD_NOT_EXHAUSTED_TUPLE so that they also target the POP_TOP following the matching END_FOR
* gh-82062: Fix support of parameter defaults on methods in extension modules ↵Sergey B Kirpichev2024-05-024-0/+25
| | | | | | | | | (GH-115270) Now inspect.signature() supports references to the module globals in parameter defaults on methods in extension modules. Previously it was only supported in functions. The workaround was to specify the fully qualified name, including the module name.
* gh-118486: Support mkdir(mode=0o700) on Windows (GH-118488)Steve Dower2024-05-025-2/+212
|
* gh-117903: Clarify that the staticmethod descriptor is callable (GH-117925)Serhiy Storchaka2024-05-021-2/+3
|
* gh-116180: Check the globals argument in PyRun_* C API (GH-116637)NGRsoftlab2024-05-022-21/+36
| | | | | It used to crash when passing NULL or non-dict as globals. Now it sets a SystemError.
* gh-118216: Don't consider dotted `__future__` imports (#118267)Crowthebird2024-05-025-2/+26
|
* GH-117442: Check eval-breaker at start (rather than end) of tier 2 loops ↵Mark Shannon2024-05-0210-174/+137
| | | | (GH-118482)
* gdb/libpython.py: Update PyLongObjectPtr docstring (GH-118438)Andrej2024-05-021-6/+10
|
* docs: typo: tiny grammar change: "pointed by" -> "pointed to by" (#118411)Andrew Zipperer2024-05-025-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * docs: tiny grammar change: "pointed by" -> "pointed to by" This commit uses "file pointed to by" to replace "file pointed by" in - doc for shutil.copytree - docstring for shutil.copytree - docstring _abc.PathBase.open - docstring for pathlib.Path.open - doc for os.copy_file_range - doc for os.splice The docs use "file pointed to by" more frequently than "file pointed by". So, this commit replaces the uses of "file pointed by" in order to make the uses consistent through the docs. ```bash $ grep -ri 'pointed to by' cpython/ ``` yields more results than ```bash $ grep -ri 'pointed by' cpython/ ``` Separately: There are two occurrences of "tree pointed by": - cpython/Doc/library/xml.etree.elementtree.rst for `xml.etree.ElementInclude.include` - cpython/Lib/xml/etree/ElementInclude.py for `include` For those uses of "tree pointed by", I expect "tree pointed to by" instead. However, I found enough uses online of (a) "tree pointed by" rather than (b) "tree pointed to by" to convince me that (a) is in common use. So, this commit does not replace those occurrences of "tree pointed by" to "tree pointed to by". But I will replace them if a reviewer believes it is correct to replace them. * docs: typo: "exists and executable" -> "exists and is executable" --------- Co-authored-by: Andrew-Zipperer <atzipperer@gmail.com>
* gh-118335: Rename --experimental-interpreter on Windows to ↵Guido van Rossum2024-05-022-4/+5
| | | | | --experimental-jit-interpreter (#118497) Also fix docs for this in whatsnew.
* gh-117953: Work Relative to Specific Extension Kinds in the Import Machinery ↵Eric Snow2024-05-013-66/+324
| | | | | (gh-118205) This change will make some later changes simpler.
* gh-118335: Make REGEN_JIT_COMMAND empty if tier2 interpreter enabled (#118493)Guido van Rossum2024-05-013-18/+31
| | | | Also patch up news blurb for gh-118339 (add warning that PYTHON_UOPS is now PYTHON_JIT).
* GH-118174: specify the type for the path argument of shutil.whichFilipe Laíns2024-05-011-2/+3
|
* gh-118413: Temporarily skip `test_release_task_refs` in free-threaded builds ↵Sam Gross2024-05-011-0/+1
| | | | (#118491)
* gh-117607: Speedup os.path.relpath() (GH-117608)Nice Zombies2024-05-013-12/+16
|
* GH-113464: Display a warning when building the JIT (GH-118481)Brandt Bucher2024-05-016-26/+38
|
* GH-118095: Make sure that progress is made if there are pending calls being ↵Mark Shannon2024-05-012-12/+11
| | | | handled. (GH-118484)
* gh-118433: Temporarily skip `test_interrupt_main_subthread` in free-threaded ↵mpage2024-05-011-1/+2
| | | | | | | | | builds (#118485) Free-threaded builds can intermittently tickle a longstanding bug (24 years!) in the implementation of `threading.Condition`, leading to flakiness in the test suite. Fixing the underlying issue will require more discussion, and will likely apply to most of the concurrency primitives in the `threading` module that are written in Python. See gh-118433 for more details.
* gh-118272: set stacktop to 0 before freeing contents, to avoid access to ↵Irit Katriel2024-05-011-2/+3
| | | | invalid objects during GC (#118478)
* build(deps-dev): bump types-psutil from 5.9.5.20240316 to 5.9.5.20240423 in ↵dependabot[bot]2024-05-011-1/+1
| | | | | | /Tools (#118464) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* gh-117225: Move colorize functionality to own internal module (#118283)Hugo van Kemenade2024-05-018-180/+218
|
* gh-117225: Document colour use in `doctest` (#118268)Hugo van Kemenade2024-05-012-3/+25
|
* gh-110850: Add PyTime_TimeRaw() function (#118394)Victor Stinner2024-05-017-35/+189
| | | | | | | | | | | | | | | | | Add "Raw" variant of PyTime functions: * PyTime_MonotonicRaw() * PyTime_PerfCounterRaw() * PyTime_TimeRaw() Changes: * Add documentation and tests. Tests release the GIL while calling raw clock functions. * py_get_system_clock() and py_get_monotonic_clock() now check that the GIL is hold by the caller if raise_exc is non-zero. * Reimplement "Unchecked" functions with raw clock functions. Co-authored-by: Petr Viktorin <encukou@gmail.com>
* Expand the 'Extending' docs with an example. (#113187)Jason R. Coombs2024-05-011-0/+78
| | | | | * Expand the 'Extending' docs to provide a minimal example. Closes python/importlib_metadata#427. Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* gh-116622: Android sysconfig updates (#118352)Malcolm Smith2024-05-016-5/+53
|
* Bump types-setuptools from 69.2.0.20240317 to 69.5.0.20240423 in /Tools ↵dependabot[bot]2024-05-011-1/+1
| | | | | | (#118463) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump mypy from 1.9.0 to 1.10.0 in /Tools (#118461)dependabot[bot]2024-05-011-1/+1
| | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* gh-99730: urllib.request: Keep HEAD method on redirect (GH-99731)Harmen Stoppels2024-05-013-0/+11
|
* GH-115802: Use the GHC calling convention in JIT code (GH-118287)Brandt Bucher2024-05-018-27/+117
|
* gh-117958: Expose JIT code via method in UOpExecutor (#117959)Anthony Shaw2024-05-012-1/+26
|
* gh-99180: Remove traceback anchors in return and assign statements that ↵Pablo Galindo Salgado2024-05-013-33/+240
| | | | cover all the displayed range (#112670)
* gh-116767: fix crash on 'async with' with many context managers (GH-118348)Irit Katriel2024-05-014-7/+50
| | | | | | | Account for `add_stopiteration_handler` pushing a block for `async with`. To allow generator functions that previously almost hit the `CO_MAXBLOCKS` limit by nesting non-async blocks, the limit is increased by 1. This increase allows one more block in non-generator functions.
* GH-118095: Make invalidating and clearing executors memory safe (GH-118459)Mark Shannon2024-05-015-42/+103
|
* Test syntax error on comma-less tuple-style sequence patterns (#115485)da-woods2024-05-011-0/+8
| | | | | Adds a test that length-1 tuple-style sequence patterns must end in a comma, since there isn't currently one. Spotted while reviewing Cython's proposed implementation of the pattern matching syntax (https://github.com/cython/cython/pull/4897#discussion_r1489177169) where there was a bug my the reimplementation that wasn't caught against the CPython tests here.