summaryrefslogtreecommitdiffstats
path: root/Include
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-76785: Rename _xxsubinterpreters to _interpreters (gh-117791)Eric Snow2024-04-244-6/+6
| | | 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-241-0/+2
| | | 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-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/+1
| | | | sequences for introspection (#118007)
* gh-118189: Revert accidentally added incl.tar (#118190)Oleg Iarygin2024-04-231-0/+0
|
* gh-117953: Small Cleanup of Extensions-Related Machinery Code (gh-118167)Eric Snow2024-04-231-0/+1
| | | This is a collection of very basic cleanups I've pulled out of gh-118116. It is mostly renaming variables and moving a couple bits of code in functionally equivalent ways.
* gh-95754: Better error when script shadows a standard library or third party ↵Shantanu2024-04-234-0/+6
| | | | module (#113769)
* Remove more remnants of deepfreeze (#118159)Guido van Rossum2024-04-223-7/+0
|
* GH-115480: Reduce guard strength for binary ops when type of one operand is ↵Mark Shannon2024-04-223-82/+103
| | | | known already (GH-118050)
* gh-112075: Make instance attributes stored in inline "dict" thread safe ↵Dino Viehland2024-04-224-15/+35
| | | | | (#114742) Make instance attributes stored in inline "dict" thread safe on free-threaded builds
* gh-116818: Make `sys.settrace`, `sys.setprofile`, and monitoring thread-safe ↵Dino Viehland2024-04-197-1/+73
| | | | | | | (#116775) Makes sys.settrace, sys.setprofile, and monitoring generally thread-safe. Mostly uses a stop-the-world approach and synchronization around the code object's _co_instrumentation_version. There may be a little bit of extra synchronization around the monitoring data that's required to be TSAN clean.
* GH-116202: Incorporate invalidation check into _START_EXECUTOR. (GH-118044)Mark Shannon2024-04-191-1/+1
|
* GH-115419: Improve list of escaping functions (GH-118054)Mark Shannon2024-04-192-24/+24
|
* gh-112069: Make PySet_GET_SIZE to be atomic safe. (gh-118053)Donghee Na2024-04-181-0/+4
| | | gh-112069: Make PySet_GET_SIZE to be atomic operation
* gh-112069: Add _PySet_NextEntryRef to be thread-safe. (gh-117990)Donghee Na2024-04-181-1/+8
|
* gh-117987: Restore several functions removed in Python 3.13 alpha 1 (GH-117993)Victor Stinner2024-04-182-0/+7
| | | | | | | | | Restore these functions removed in Python 3.13 alpha 1: * Py_SetPythonHome() * Py_SetProgramName() * PySys_SetArgvEx() * PySys_SetArgv()
* gh-117680: make _PyInstructionSequence a PyObject and use it in tests (#117629)Irit Katriel2024-04-175-2/+38
|
* gh-117929: Restore removed PyEval_InitThreads() function (#117931)Victor Stinner2024-04-171-0/+2
|
* GH-117760: Streamline the trashcan mechanism (GH-117763)Mark Shannon2024-04-173-29/+26
|
* gh-117645: Increase WASI stack size from 512 KiB to 8 MiB (#117674)Victor Stinner2024-04-161-8/+3
| | | | | Increase also the initial memory from 10 MiB to 20 MiB. Reenable test_dynamic on WASI build.
* gh-115178: Add Counts of UOp Pairs to pystats (GH-115181)Jeff Glass2024-04-162-0/+9
|
* GH-115776: Static object are immortal, so mark them as such. (GH-117673)Mark Shannon2024-04-161-10/+7
|
* gh-117613: Enhance test_clinic @defining_class tests (#117896)Victor Stinner2024-04-164-0/+6
|
* gh-94673: Clarify About Runtime State Related to Static Builtin Types ↵Eric Snow2024-04-121-0/+37
| | | | | | | | (gh-117761) Guido pointed out to me that some details about the per-interpreter state for the builtin types aren't especially clear. I'm addressing that by: * adding a comment explaining that state * adding some asserts to point out the relationship between each index and the interp/global runtime state
* gh-117376: Partial implementation of deferred reference counting (#117696)Sam Gross2024-04-122-2/+18
| | | | | This marks objects as using deferred refrence counting using the `ob_gc_bits` field in the free-threaded build and collects those objects during GC.
* gh-117764: Use Argument Clinic for signal.set_wakeup_fd() (GH-117777)Serhiy Storchaka2024-04-124-0/+6
|
* gh-117431: Adapt bytes and bytearray .find() and friends to Argument Clinic ↵Erlend E. Aasland2024-04-121-5/+10
| | | | | | | | | | | | | | (#117502) This change gives a significant speedup, as the METH_FASTCALL calling convention is now used. The following bytes and bytearray methods are adapted: - count() - find() - index() - rfind() - rindex() Co-authored-by: Inada Naoki <songofacandy@gmail.com>
* gh-76785: Handle Legacy Interpreters Properly (gh-117490)Eric Snow2024-04-112-1/+5
| | | This is similar to the situation with threading._DummyThread. The methods (incl. __del__()) of interpreters.Interpreter objects must be careful with interpreters not created by interpreters.create(). The simplest thing to start with is to disable any method that modifies or runs in the interpreter. As part of this, the runtime keeps track of where an interpreter was created. We also handle interpreter "refcounts" properly.
* gh-116738: Make _abc module thread-safe (#117488)Brett Simmers2024-04-111-0/+12
| | | | A collection of small changes aimed at making the `_abc` module safe to use in a free-threaded build.
* gh-117649: Raise ImportError for unsupported modules in free-threaded build ↵Sam Gross2024-04-111-1/+10
| | | | | | | | | | (#117651) The free-threaded build does not currently support the combination of single-phase init modules and non-isolated subinterpreters. Ensure that `check_multi_interp_extensions` is always `True` for subinterpreters in the free-threaded build so that importing these modules raises an `ImportError`.
* gh-111506: Error if the limited API is used in free-threaded build (#117762)Sam Gross2024-04-111-0/+5
| | | | Issue a build time error if both `Py_LIMITED_API` and `Py_GIL_DISABLED` are defined.
* gh-76785: Add More Tests to test_interpreters.test_api (gh-117662)Eric Snow2024-04-114-0/+40
| | | In addition to the increase test coverage, this is a precursor to sorting out how we handle interpreters created directly via the C-API.
* gh-112536: Define `_Py_THREAD_SANITIZER` on GCC when TSan is enabled (#117702)Sam Gross2024-04-101-0/+3
| | | | | The `__has_feature(thread_sanitizer)` is a Clang-ism. Although new versions of GCC implement `__has_feature`, the `defined(__has_feature)` check still fails on GCC so we don't use that code path.
* Post 3.13.0a6Thomas Wouters2024-04-091-1/+1
|
* Python 3.13.0a6v3.13.0a6Thomas Wouters2024-04-091-2/+2
|
* gh-117439: Make refleak checking thread-safe without the GIL (#117469)Sam Gross2024-04-082-6/+10
| | | | | This keeps track of the per-thread total reference count operations in PyThreadState in the free-threaded builds. The count is merged into the interpreter's total when the thread exits.
* gh-111926: Make weakrefs thread-safe in free-threaded builds (#117168)mpage2024-04-085-20/+113
| | | | | | | | | Most mutable data is protected by a striped lock that is keyed on the referenced object's address. The weakref's hash is protected using the weakref's per-object lock. Note that this only affects free-threaded builds. Apart from some minor refactoring, the added code is all either gated by `ifdef`s or is a no-op (e.g. `Py_BEGIN_CRITICAL_SECTION`).
* Cases generator: Remove type_prop and passthrough (#117614)Ken Jin2024-04-071-22/+22
|
* gh-111140: PyLong_From/AsNativeBytes: Take *flags* rather than just ↵Steve Dower2024-04-051-5/+19
| | | | *endianness* (GH-116053)
* gh-117549: Match declaration order for _Py_BackoffCounter initializer (#117551)Michael Droettboom2024-04-041-1/+1
| | | Otherwise it might not compile with C++ (or certain C compilers/flags?).
* gh-112075: Make _PyDict_LoadGlobal thread safe (#117529)Dino Viehland2024-04-041-0/+1
| | | Make _PyDict_LoadGlobal threadsafe
* gh-117494: extract the Instruction Sequence data structure into a separate ↵Irit Katriel2024-04-043-41/+67
| | | | file (#117496)
* gh-116968: Reimplement Tier 2 counters (#117144)Guido van Rossum2024-04-045-57/+167
| | | | | | | | | | | | Introduce a unified 16-bit backoff counter type (``_Py_BackoffCounter``), shared between the Tier 1 adaptive specializer and the Tier 2 optimizer. The API used for adaptive specialization counters is changed but the behavior is (supposed to be) identical. The behavior of the Tier 2 counters is changed: - There are no longer dynamic thresholds (we never varied these). - All counters now use the same exponential backoff. - The counter for ``JUMP_BACKWARD`` starts counting down from 16. - The ``temperature`` in side exits starts counting down from 64.
* gh-114329: Fix PyList_GetItemRef() limited C API definition (#117520)Victor Stinner2024-04-031-0/+2
|
* gh-116168: Remove extra `_CHECK_STACK_SPACE` uops (#117242)Peter Lazorchak2024-04-032-107/+112
| | | This merges all `_CHECK_STACK_SPACE` uops in a trace into a single `_CHECK_STACK_SPACE_OPERAND` uop that checks whether there is enough stack space for all calls included in the entire trace.
* gh-117431: Adapt bytes and bytearray .startswith() and .endswith() to ↵Erlend E. Aasland2024-04-031-2/+6
| | | | | | Argument Clinic (#117495) This change gives a significant speedup, as the METH_FASTCALL calling convention is now used.
* gh-76785: Add PyInterpreterConfig Helpers (gh-117170)Eric Snow2024-04-021-0/+16
| | | These helpers make it easier to customize and inspect the config used to initialize interpreters. This is especially valuable in our tests. I found inspiration from the PyConfig API for the PyInterpreterConfig dict conversion stuff. As part of this PR I've also added a bunch of tests.
* GH-115776: Embed the values array into the object, for "normal" Python ↵Mark Shannon2024-04-028-60/+85
| | | | objects. (GH-116115)
* gh-117411: move PyFutureFeatures to pycore_symtable.h and make it private ↵Irit Katriel2024-04-024-27/+32
| | | | (#117412)
* gh-117323: Make `cell` thread-safe in free-threaded builds (#117330)Sam Gross2024-03-291-0/+48
| | | Use critical sections to lock around accesses to cell contents. The critical sections are no-ops in the default (with GIL) build.