summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-109617: fix ncurses incompatibility on macOS with Xcode 15 (#111258)Davide Rizzo2024-05-045-21/+77
| | | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* gh-117953: Track Extra Details in Global Extensions Cache (gh-118532)Eric Snow2024-05-043-138/+578
| | | | | | | | | | | | We have only been tracking each module's PyModuleDef. However, there are some problems with that. For example, in some cases we load single-phase init extension modules from def->m_base.m_init or def->m_base.m_copy, but if multiple modules share a def then we can end up with unexpected behavior. With this change, we track the following: * PyModuleDef (same as before) * for some modules, its init function or a copy of its __dict__, but specific to that module * whether it is a builtin/core module or a "dynamic" extension * the interpreter (ID) that owns the cached __dict__ (only if cached) This also makes it easier to remember the module's kind (e.g. single-phase init) and if loading it previously failed, which I'm doing separately.
* gh-117139: Fix missing semicolon (GH-118573)Ken Jin2024-05-041-1/+1
|
* gh-118569: Add a test for dynamic PEP695 classes (#118570)Nikita Sobolev2024-05-041-0/+25
|
* GH-111744: Support opcode events in bdb (GH-111834)Tian Gao2024-05-044-17/+72
|
* build(deps): bump hypothesis from 6.100.0 to 6.100.2 in /Tools (#118462)dependabot[bot]2024-05-041-1/+1
| | | | | Bumps [hypothesis](https://github.com/HypothesisWorks/hypothesis) from 6.100.0 to 6.100.2. - [Release notes](https://github.com/HypothesisWorks/hypothesis/releases) - [Commits](https://github.com/HypothesisWorks/hypothesis/compare/hypothesis-python-6.100.0...hypothesis-python-6.100.2)
* fix comment typo in importlib (#118567)wim glenn2024-05-041-1/+1
|
* gh-74929: Implement PEP 667 (GH-115153)Tian Gao2024-05-0419-257/+921
|
* GH-118095: Use broader specializations of CALL in tier 1, for better tier 2 ↵Mark Shannon2024-05-0419-448/+863
| | | | | | | | | | support of calls. (GH-118322) * Add CALL_PY_GENERAL, CALL_BOUND_METHOD_GENERAL and call CALL_NON_PY_GENERAL specializations. * Remove CALL_PY_WITH_DEFAULTS specialization * Use CALL_NON_PY_GENERAL in more cases when otherwise failing to specialize
* gh-113081: Print colorized exception just like built-in traceback in pdb ↵Tian Gao2024-05-043-2/+6
| | | | (#113082)
* gh-111997: C-API for signalling monitoring events (#116413)Irit Katriel2024-05-0420-37/+1442
|
* GH-113464: Remove the extra jump via `_SIDE_EXIT` in `_EXIT_TRACE` (GH-118545)Mark Shannon2024-05-046-53/+31
|
* gh-110850: Use _PyDeadline_Get() in EnterNonRecursiveMutex() (#118556)Victor Stinner2024-05-041-6/+7
| | | | | | | | Use _PyDeadline_Init() and _PyDeadline_Get() in EnterNonRecursiveMutex() of thread_nt.h. _PyDeadline_Get() uses the monotonic clock which is now the same as the perf counter clock on all platforms. So this change does not cause any behavior change. It just reuses existing helper functions.
* gh-115532 Add kde_random() to the statistic module (#118210)Raymond Hettinger2024-05-044-63/+207
|
* GH-113464: Generate a more efficient JIT (GH-118512)Brandt Bucher2024-05-033-392/+418
|
* GH-118251: Fix incomplete ternary expression in JIT workflow (GH-118564)Brandt Bucher2024-05-031-1/+1
|
* gh-118527: Intern filename, name, and qualname in code objects. (#118558)Sam Gross2024-05-031-0/+5
| | | | | | This interns the strings for `co_filename`, `co_name`, and `co_qualname` on codeobjects in the free-threaded build. This partially addresses a reference counting bottleneck when creating closures concurrently. The closures take the name and qualified name from the code object.
* gh-118534: Fix load of `gil->locked` (#118553)Sam Gross2024-05-031-1/+1
|
* Minor improvements to the itertools recipes (#118563)Raymond Hettinger2024-05-031-24/+12
|
* GH-116380: Move pathlib globbing implementation into `pathlib._glob` (#118562)Barney Gale2024-05-034-309/+314
| | | | | | | | Moving this code under the `pathlib` package makes it quite a lot easier to backport in the `pathlib-abc` PyPI package. It was a bit foolish of me to add it to `glob` in the first place. Also add `translate()` to `__all__` in `glob`. This function is new in 3.13, so there's no NEWS needed.
* gh-117657: Disable the function/code cache in free-threaded builds (#118301)mpage2024-05-034-1/+23
| | | | This is only used by the specializing interpreter and the tier 2 optimizer, both of which are disabled in free-threaded builds.
* GH-118251: Skip fewer test in emulated JIT CI (GH-118536)Savannah Ostrowski2024-05-032-8/+84
|
* gh-107674: Improve performance of `sys.settrace` (GH-117133)Tian Gao2024-05-037-52/+63
| | | | | | * Check tracing in RESUME_CHECK * Only change to RESUME_CHECK if not tracing
* gh-83856: Honor atexit for all multiprocessing start methods (GH-114279)Tian Gao2024-05-035-5/+34
| | | | | Use atexit for all multiprocessing start methods to cleanup. See the GH-114279 PR discussion and related issue for details as to why.
* GH-118487: Add Black to `.pre-commit-config.yaml` for JIT files (GH-118537)Savannah Ostrowski2024-05-032-2/+17
|
* gh-115119: Update macOS installer to build with libmpdec 4.0.0 (GH-118382)Erlend E. Aasland2024-05-033-0/+13
| | | Co-authored-by: Ned Deily <nad@python.org>
* gh-115119: Update Windows installer to mpdecimal 4.0.0 (#118506)Erlend E. Aasland2024-05-034-6/+7
|
* docs: clarify csv.DictReader's treatment of the first data row (#118549)Ned Batchelder2024-05-031-2/+4
|
* gh-118527: Use deferred reference counting for C functions on modules (#118529)Sam Gross2024-05-031-0/+1
| | | | | This addresses a scaling bottleneck in the free-threaded build when calling functions like `math.floor()` concurrently from multiple threads.
* gh-116322: Add Py_mod_gil module slot (#116882)Brett Simmers2024-05-03123-62/+376
| | | | | | | | | | | | | | This PR adds the ability to enable the GIL if it was disabled at interpreter startup, and modifies the multi-phase module initialization path to enable the GIL when loading a module, unless that module's spec includes a slot indicating it can run safely without the GIL. PEP 703 called the constant for the slot `Py_mod_gil_not_used`; I went with `Py_MOD_GIL_NOT_USED` for consistency with gh-104148. A warning will be issued up to once per interpreter for the first GIL-using module that is loaded. If `-v` is given, a shorter message will be printed to stderr every time a GIL-using module is loaded (including the first one that issues a warning).
* gh-118495: Skip test using threads after forking when running with TSAN ↵mpage2024-05-031-3/+2
| | | | | | | (#118530) This is unsupported. Note that `skip_unless_reliable_fork()` checks for the conditions used by the decorators that were removed, along with checking for TSAN.
* gh-117514: Add `sys._is_gil_enabled()` function (#118514)Sam Gross2024-05-035-1/+67
| | | | | The function returns `True` or `False` depending on whether the GIL is currently enabled. In the default build, it always returns `True` because the GIL is always enabled.
* 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.