summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* Remove stray `__cplusplus` guard in sysmodule.c (#118511)Sam Gross2024-05-021-4/+0
|
* gh-93502: Add new C-API functions to trace object creation and destruction ↵Pablo Galindo Salgado2024-05-021-1/+9
| | | | (#115945)
* gh-105879: Add support for keyword arguments to eval and exec (#105885)Raphael Gaschignard2024-05-022-28/+63
| | | 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-116180: Check the globals argument in PyRun_* C API (GH-116637)NGRsoftlab2024-05-021-9/+12
| | | | | 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-022-2/+2
|
* GH-117442: Check eval-breaker at start (rather than end) of tier 2 loops ↵Mark Shannon2024-05-025-61/+30
| | | | (GH-118482)
* gh-117953: Work Relative to Specific Extension Kinds in the Import Machinery ↵Eric Snow2024-05-012-65/+293
| | | | | (gh-118205) This change will make some later changes simpler.
* GH-118095: Make sure that progress is made if there are pending calls being ↵Mark Shannon2024-05-011-11/+10
| | | | handled. (GH-118484)
* gh-118272: set stacktop to 0 before freeing contents, to avoid access to ↵Irit Katriel2024-05-011-2/+3
| | | | invalid objects during GC (#118478)
* gh-117225: Move colorize functionality to own internal module (#118283)Hugo van Kemenade2024-05-011-0/+1
|
* gh-110850: Add PyTime_TimeRaw() function (#118394)Victor Stinner2024-05-011-24/+69
| | | | | | | | | | | | | | | | | 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>
* GH-115802: Use the GHC calling convention in JIT code (GH-118287)Brandt Bucher2024-05-012-15/+39
|
* gh-117958: Expose JIT code via method in UOpExecutor (#117959)Anthony Shaw2024-05-011-1/+24
|
* gh-116767: fix crash on 'async with' with many context managers (GH-118348)Irit Katriel2024-05-011-2/+16
| | | | | | | 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-013-40/+99
|
* gh-118335: Configure Tier 2 interpreter at build time (#118339)Guido van Rossum2024-05-0110-13/+57
| | | | | | | | | | | | | | | | | | | | | | The code for Tier 2 is now only compiled when configured with `--enable-experimental-jit[=yes|interpreter]`. We drop support for `PYTHON_UOPS` and -`Xuops`, but you can disable the interpreter or JIT at runtime by setting `PYTHON_JIT=0`. You can also build it without enabling it by default using `--enable-experimental-jit=yes-off`; enable with `PYTHON_JIT=1`. On Windows, the `build.bat` script supports `--experimental-jit`, `--experimental-jit-off`, `--experimental-interpreter`. In the C code, `_Py_JIT` is defined as before when the JIT is enabled; the new variable `_Py_TIER2` is defined when the JIT *or* the interpreter is enabled. It is actually a bitmask: 1: JIT; 2: default-off; 4: interpreter.
* gh-117657: Don't specialize RESUME_CHECK when specialization is disabled ↵Ken Jin2024-04-302-0/+4
| | | | (GH-118349)
* gh-118422: Fix run_fileexflags() test (#118429)Victor Stinner2024-04-302-51/+53
| | | | | Don't test the undefined behavior of fileno() on a closed file, but use fstat() as a reliable test if the file was closed or not.
* gh-118332: Fix deadlock involving stop the world (#118412)Sam Gross2024-04-302-4/+5
| | | | | | Avoid detaching thread state when stopping the world. When re-attaching the thread state, the thread would attempt to resume the top-most critical section, which might now be held by a thread paused for our stop-the-world request.
* gh-117657: Fix small issues with instrumentation and TSAN (#118064)Dino Viehland2024-04-305-8/+11
| | | Small TSAN fixups for instrumentation
* gh-118272: Clear generator frame's locals when the generator is closed (#118277)Irit Katriel2024-04-301-5/+12
| | | Co-authored-by: Thomas Grainger <tagrain@gmail.com>
* gh-118379: Use PyTuple_Pack instead of Py_BuildValue if possible (GH-118381)Nice Zombies2024-04-301-2/+2
|
* gh-116622: Redirect stdout and stderr to system log when embedded in an ↵Malcolm Smith2024-04-302-0/+78
| | | | Android app (#118063)
* GH-118095: Add tier 2 support for YIELD_VALUE (GH-118380)Mark Shannon2024-04-306-16/+86
|
* GH-118306: Update JIT to use LLVM 18 (GH-118307)Savannah Ostrowski2024-04-291-0/+3
|
* gh-117657: TSAN fix race on `gstate->young.count` (#118313)Alex Turner2024-04-291-12/+13
|
* gh-117953: Share More Machinery Code Between Builtin and Dynamic Extensions ↵Eric Snow2024-04-292-156/+194
| | | | | (gh-118204) This change will make some later changes simpler. It also brings more consistent behavior and lower maintenance costs.
* gh-117783: Immortalize objects that use deferred reference counting (#118112)Sam Gross2024-04-292-0/+41
| | | | | | | | | Deferred reference counting is not fully implemented yet. As a temporary measure, we immortalize objects that would use deferred reference counting to avoid multi-threaded scaling bottlenecks. This is only performed in the free-threaded build once the first non-main thread is started. Additionally, some tests, including refleak tests, suppress this behavior.
* gh-117953: Split Up _PyImport_LoadDynamicModuleWithSpec() (gh-118203)Eric Snow2024-04-292-137/+181
| | | | | | | Basically, I've turned most of _PyImport_LoadDynamicModuleWithSpec() into two new functions (_PyImport_GetModInitFunc() and _PyImport_RunModInitFunc()) and moved the rest of it out into _imp_create_dynamic_impl(). There shouldn't be any changes in behavior. This change makes some future changes simpler. This is particularly relevant to potentially calling each module init function in the main interpreter first. Thus the critical part of the PR is the addition of _PyImport_RunModInitFunc(), which is strictly focused on running the init func and validating the result. A later PR will take it a step farther by capturing error information rather than raising exceptions. FWIW, this change also helps readers by clarifying a bit more about what happens when an extension/builtin module is imported.
* gh-107674: Lazy load line number to improve performance of tracing (GH-118127)Tian Gao2024-04-292-15/+48
|
* GH-118095: Allow a variant of RESUME_CHECK in tier 2 (GH-118286)Mark Shannon2024-04-294-1/+77
|
* gh-109118: Make comprehensions work within annotation scopes, but without ↵Jelle Zijlstra2024-04-281-14/+4
| | | | | inlining (#118160) Co-authored-by: Carl Meyer <carl@oddbird.net>
* gh-116749: Disable GIL by default in free-threaded build (#118295)Sam Gross2024-04-261-3/+1
| | | | Switch GIL to disabled by default in free-threaded build so that the free-threaded CIs catch thread-safety issues.
* GH-118095: Add dynamic exit support and FOR_ITER_GEN support to tier 2 ↵Mark Shannon2024-04-267-34/+181
| | | | (GH-118279)
* gh-117680: Fix msvc warning in instruction_sequence.c (#118326)neonene2024-04-261-2/+2
|
* gh-117385: Remove unhooked events on sys.settrace (GH-117386)Tian Gao2024-04-261-3/+2
|
* gh-110693: Pending Calls Machinery Cleanups (gh-118296)Eric Snow2024-04-261-55/+104
| | | This does some cleanup in preparation for later changes.
* GH-118095: Handle `RETURN_GENERATOR` in tier 2 (GH-118180)Mark Shannon2024-04-259-72/+111
|
* gh-102511: Speed up os.path.splitroot() with native helpers (GH-118089)Nice Zombies2024-04-251-32/+115
|
* gh-117953: Fix Refleaks Introduced by gh-118194 (gh-118250)Eric Snow2024-04-241-1/+5
| | | | | A couple of refleaks slipped through in gh-118194. This takes care of them. (AKA _Py_ext_module_loader_info_init() does not steal references.)
* gh-117953: Add Internal struct _Py_ext_module_loader_info (gh-118194)Eric Snow2024-04-242-93/+151
| | | This helps with a later change that splits up _PyImport_LoadDynamicModuleWithSpec().
* gh-117953: Let update_global_state_for_extension() Caller Decide If ↵Eric Snow2024-04-241-20/+93
| | | | | Singlephase or Not (gh-118193) This change makes other upcoming changes simpler.
* gh-76785: Rename _xxsubinterpreters to _interpreters (gh-117791)Eric Snow2024-04-241-0/+3
| | | See https://discuss.python.org/t/pep-734-multiple-interpreters-in-the-stdlib/41147/26.
* gh-117953: Cleanups For fix_up_extension() in import.c (gh-118192)Eric Snow2024-04-244-97/+161
| | | These are cleanups I've pulled out of gh-118116. Mostly, this change moves code around to align with some future changes and to improve clarity a little. There is one very small change in behavior: we now add the module to the per-interpreter caches after updating the global state, rather than before.
* GH-115419: Move setting the instruction pointer to error exit stubs (GH-118088)Mark Shannon2024-04-244-4/+5
|
* GH-118095: Convert DEOPT_IFs on likely side exits to EXIT_IFs (GH-118106)Mark Shannon2024-04-242-12/+12
| | | Covert DEOPT_IFs on likely side exits to EXIT_IFs
* gh-117901: Add option for compiler's codegen to save nested instruction ↵Irit Katriel2024-04-241-0/+18
| | | | sequences for introspection (#118007)
* gh-118074: Immortal executors are not GC-able (#118182)Guido van Rossum2024-04-231-4/+1
| | | | | Better version of gh-118117. Just check for immortality instead of an address range check.
* gh-117657: Quiet TSAN warnings about remaining non-atomic accesses of ↵mpage2024-04-232-2/+3
| | | | | `tstate->state` (#118165) Quiet TSAN warnings about remaining non-atomic accesses of `tstate->state`