summaryrefslogtreecommitdiffstats
path: root/Include
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-123884 Tee of tee was not producing n independent iterators (gh-124490)Raymond Hettinger2024-09-254-7/+0
|
* gh-124285: Fix bug where bool() is called multiple times for the same part ↵Irit Katriel2024-09-253-25/+45
| | | | of a boolean expression (#124394)
* gh-123923: Defer refcounting for `f_funcobj` in `_PyInterpreterFrame` (#124026)Sam Gross2024-09-242-9/+28
| | | | | | Use a `_PyStackRef` and defer the reference to `f_funcobj` when possible. This avoids some reference count contention in the common case of executing the same code object from multiple threads concurrently in the free-threaded build.
* gh-124127: Make Py_REFCNT() opaque in limited C API 3.14 (#124128)Victor Stinner2024-09-241-13/+21
|
* gh-119333: Add C api to have contextvar enter/exit callbacks (#119335)Jason Fried2024-09-243-0/+35
| | | Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-123990: Good bye WITH_FREELISTS macro (gh-124358)Donghee Na2024-09-242-17/+0
|
* gh-124344: Make `_PyObject_IS_GC()` use underscored `PyType_IS_GC()` (#124349)neonene2024-09-231-4/+4
| | | move up _PyType_IS_GC and use it
* GH-124284: Add stats for refcount operations on immortal objects (GH-124288)Mark Shannon2024-09-234-0/+22
|
* GH-113655: Lower the C recursion limit for HPPA, PPC64 and SPARC (#124264)Sam James2024-09-231-0/+6
| | | | | | | | | Lower the C recursion limit for HPPA, PPC64 and SPARC, as they use relatively large stack frames that cause e.g. `test_descr` to hit a stack overflow. According to quick testing, it seems that values around 8000 are max for HPPA and PPC64 (ELFv1 ABI) and 7000 for SPARC64. To keep things safe, let's use 5000 for PPC64 and 4000 for SPARC. Co-authored-by: Michał Górny <mgorny@gentoo.org>
* gh-124153: Implement `PyType_GetBaseByToken()` and `Py_tp_token` slot ↵neonene2024-09-183-0/+9
| | | | (GH-124163)
* gh-124064: Fix -Wconversion warnings in pycore_{long,object}.h (#124177)Victor Stinner2024-09-174-14/+15
| | | | Change also the fix for pycore_gc.h and pycore_stackref.h: declare constants as uintptr_t, rather than casting constants.
* gh-124064: Fix -Wconversion warnings in pycore_{gc,list,stackref}.h (#124174)Victor Stinner2024-09-173-4/+4
|
* gh-123969: refactor _PyErr_RaiseSyntaxError and _PyErr_EmitSyntaxWarning out ↵Irit Katriel2024-09-162-2/+5
| | | | of compiler (#123972)
* gh-124058: remove _PyCompile_IsNestedScope, roll it into ↵Irit Katriel2024-09-161-2/+1
| | | | _PyCompile_IsInteractive (#124061)
* gh-121459: Deferred LOAD_GLOBAL (GH-123128)Ken Jin2024-09-132-1/+4
| | | | Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Sam Gross <655866+colesbury@users.noreply.github.com>
* gh-100554: Add ``Py_tp_vectorcall`` slot to set ↵Wenzel Jakob2024-09-131-0/+4
| | | | ``PyTypeObject.tp_vectorcall`` using the ``PyType_FromSpec`` function family. (#123332)
* gh-124022: add missing #include (#124052)Irit Katriel2024-09-131-0/+2
|
* gh-124022: Fix bug where class docstring is removed in interactive mode ↵Irit Katriel2024-09-131-1/+2
| | | | | | | (#124023) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-124013: remove _PyCompile_IsTopLevelAwait (#124014)Irit Katriel2024-09-121-4/+0
|
* gh-123923: Defer refcounting for `f_executable` in `_PyInterpreterFrame` ↵Sam Gross2024-09-123-6/+22
| | | | | | | | (#123924) Use a `_PyStackRef` and defer the reference to `f_executable` when possible. This avoids some reference count contention in the common case of executing the same code object from multiple threads concurrently in the free-threaded build.
* gh-123881: make compiler add the .generic_base base class without ↵Irit Katriel2024-09-101-1/+0
| | | | | | constructing AST nodes (#123883)
* gh-121404: split compile.c into compile.c and codegen.c (#123651)Irit Katriel2024-09-092-0/+125
|
* gh-117482: Simplify the Fix For Builtin Types Slot Wrappers (GH-122865)Eric Snow2024-09-091-1/+0
| | | | | | | | | | | | | | | | | In gh-121602, I applied a fix to a builtin types initialization bug. That fix made sense in the context of some broader future changes, but introduced a little bit of extra complexity. That fix has turned out to be incomplete for some of the builtin types we haven't been testing. I found that out while improving the tests. A while back, @markshannon suggested a simpler fix that doesn't have that problem, which I've already applied to 3.12 and 3.13. I'm switching to that here. Given the potential long-term benefits of the more complex (but still incomplete) approach, I'll circle back to it in the future, particularly after I've improved the tests so no corner cases slip through the cracks. (This is effectively a "forward-port" of 716c677 from 3.13.)
* gh-123747: Avoid static_assert() in internal header files (#123779)Victor Stinner2024-09-062-4/+9
|
* gh-97588: Move ctypes struct/union layout logic to Python (GH-123352)Petr Viktorin2024-09-054-28/+42
| | | Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* gh-107954, PEP 741: Add PyInitConfig_AddModule() function (#123668)Victor Stinner2024-09-041-0/+4
|
* gh-107954, PEP 741: Add PyInitConfig C API (#123502)Victor Stinner2024-09-031-0/+41
| | | Add Doc/c-api/config.rst documentation.
* gh-107954, PEP 741: Add PyConfig_Get()/Set() functions (#123472)Victor Stinner2024-09-023-1/+12
| | | | | | | | | | | Add PyConfig_Get(), PyConfig_GetInt(), PyConfig_Set() and PyConfig_Names() functions to get and set the current runtime Python configuration. Add visibility and "sys spec" to config and preconfig specifications. _PyConfig_AsDict() now converts PyConfig.xoptions as a dictionary. Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* gh-123091: Use more _Py_IsImmortalLoose() (GH-123602)Petr Viktorin2024-09-021-2/+2
| | | | | | | Switch more _Py_IsImmortal(...) assertions to _Py_IsImmortalLoose(...) The remaining calls to _Py_IsImmortal are in free-threaded-only code, initialization of core objects, tests, and guards that fall back to code that works with mortal objects.
* gh-123091: Use _Py_IsImmortalLoose() (#123511)Victor Stinner2024-09-022-4/+4
| | | | Use _Py_IsImmortalLoose() in bytesobject.c, typeobject.c and ceval.c.
* gh-122854: Add Py_HashBuffer() function (#122855)Victor Stinner2024-08-302-3/+2
|
* gh-121645: Add PyBytes_Join() function (#121646)Victor Stinner2024-08-301-3/+4
| | | | * Replace _PyBytes_Join() with PyBytes_Join(). * Keep _PyBytes_Join() as an alias to PyBytes_Join().
* gh-123484: Fix the debug offsets for PyLongObject (#123485)Matt Wozniski2024-08-301-2/+2
|
* gh-121485: Always use 64-bit integers for integers bits count (GH-121486)Serhiy Storchaka2024-08-302-5/+5
| | | | | Use 64-bit integers instead of platform specific size_t or Py_ssize_t to represent the number of bits in Python integer.
* gh-120389: Add PyLong_FromInt64() and PyLong_AsInt64() (#120390)Victor Stinner2024-08-281-0/+12
| | | | | | | | | | | | Add new functions to convert C <stdint.h> numbers from/to Python int: * PyLong_FromInt32() * PyLong_FromUInt32() * PyLong_FromInt64() * PyLong_FromUInt64() * PyLong_AsInt32() * PyLong_AsUInt32() * PyLong_AsInt64() * PyLong_AsUInt64()
* gh-123271: Make builtin zip method safe under free-threading (#123272)Pieter Eendebak2024-08-271-0/+17
| | | | | | | | | | | | | | | | The `zip_next` function uses a common optimization technique for methods that generate tuples. The iterator maintains an internal reference to the returned tuple. When the method is called again, it checks if the internal tuple's reference count is 1. If so, the tuple can be reused. However, this approach is not safe under the free-threading build: after checking the reference count, another thread may perform the same check and also reuse the tuple. This can result in a double decref on the items of the replaced tuple and a double incref (memory leak) on the items of the tuple being set. This adds a function, `_PyObject_IsUniquelyReferenced` that encapsulates the stricter logic necessary for the free-threaded build: the internal tuple must be owned by the current thread, have a local refcount of one, and a shared refcount of zero.
* GH-123232: Factor BINARY_SLICE and STORE_SLICE to handle stats properly for ↵Mark Shannon2024-08-271-163/+163
| | | | tier 2. (GH-123381)
* GH-115775: Use `__static_attributes__` to initialize shared keys (GH-118468)Mark Shannon2024-08-271-1/+1
|
* gh-117376: Make `Py_DECREF` a macro in ceval.c in free-threaded build (#122975)Sam Gross2024-08-231-12/+9
| | | | | | | | | | | `Py_DECREF` and `PyStackRef_CLOSE` are now implemented as macros in the free-threaded build in ceval.c. There are two motivations; * MSVC has problems inlining functions in ceval.c in the PGO build. * We will want to mark escaping calls in order to spill the stack pointer in ceval.c and we will want to do this around `_Py_Dealloc` (or `_Py_MergeZeroLocalRefcount` or `_Py_DecRefShared`), not around the entire `Py_DECREF` or `PyStackRef_CLOSE` call.
* GH-123040: Specialize shadowed `LOAD_ATTR`. (GH-123219)Mark Shannon2024-08-232-32/+40
|
* GH-123197: Only count an instruction as deferred if it hasn't deopted first. ↵Mark Shannon2024-08-221-0/+2
| | | | | (GH-123222) Only count an instruction as deferred if hasn't deopted first.
* GH-115776: Allow any fixed sized object to have inline values (GH-123192)Mark Shannon2024-08-211-2/+3
|
* GH-123185: Check for `NULL` after calling `_PyEvalFramePushAndInit` (GH-123194)Mark Shannon2024-08-211-1/+1
|
* GH-118093: Make `CALL_ALLOC_AND_ENTER_INIT` suitable for tier 2. (GH-123140)Mark Shannon2024-08-206-152/+169
| | | | | * Convert CALL_ALLOC_AND_ENTER_INIT to micro-ops such that tier 2 supports it * Allow inexact arguments for CALL_ALLOC_AND_ENTER_INIT.
* gh-122974: Suppress GCC array bound warnings in free-threaded build (#123071)Sam Gross2024-08-171-0/+12
| | | | GCC 11 and newer warn about the access to `unique_id` in non-debug builds due to inlining the call on static non-heap types.
* GH-118093: Specialize `CALL_KW` (GH-123006)Mark Shannon2024-08-166-205/+264
|
* Add debug offsets for free threaded builds (#123041)Pablo Galindo Salgado2024-08-152-3/+82
|
* gh-117139: Garbage collector support for deferred refcounting (#122956)Sam Gross2024-08-153-3/+29
| | | | | | | | | | The free-threaded GC now visits interpreter stacks to keep objects that use deferred reference counting alive. Interpreter frames are zero initialized in the free-threaded GC so that the GC doesn't see garbage data. This is a temporary measure until stack spilling around escaping calls is implemented. Co-authored-by: Ken Jin <kenjin@python.org>
* gh-122584: Import mimalloc headers in a C++ context (#122587)Michael Droettboom2024-08-151-0/+9
|
* GH-118093: Turn some DEOPT_IFs into EXIT_IFs (GH-122998)Brandt Bucher2024-08-142-15/+15
|