Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | gh-87135: Hang non-main threads that attempt to acquire the GIL during ↵ | Jeremy Maitin-Shepard | 2024-10-02 | 4 | -12/+39 | |
| | | | | | | | finalization (GH-105805) Instead of surprise crashes and memory corruption, we now hang threads that attempt to re-enter the Python interpreter after Python runtime finalization has started. These are typically daemon threads (our long standing mis-feature) but could also be threads spawned by extension modules that then try to call into Python. This marks the `PyThread_exit_thread` public C API as deprecated as there is no plausible safe way to accomplish that on any supported platform in the face of things like C++ code with finalizers anywhere on a thread's stack. Doing this was the least bad option. Co-authored-by: Gregory P. Smith <greg@krypto.org> | |||||
* | gh-116750: Add clear_tool_id function to unregister events and callbacks ↵ | Tian Gao | 2024-10-01 | 3 | -1/+113 | |
| | | | | (#124568) | |||||
* | gh-124218: Refactor per-thread reference counting (#124844) | Sam Gross | 2024-10-01 | 4 | -68/+72 | |
| | | | | | | | Currently, we only use per-thread reference counting for heap type objects and the naming reflects that. We will extend it to a few additional types in an upcoming change to avoid scaling bottlenecks when creating nested functions. Rename some of the files and functions in preparation for this change. | |||||
* | gh-124296: Remove private dictionary version tag (PEP 699) (#124472) | Sam Gross | 2024-10-01 | 4 | -11/+5 | |
| | ||||||
* | gh-123497: New limit for Python integers on 64-bit platforms (GH-123724) | Serhiy Storchaka | 2024-09-29 | 1 | -11/+12 | |
| | | | | | | | | | | | Instead of be limited just by the size of addressable memory (2**63 bytes), Python integers are now also limited by the number of bits, so the number of bit now always fit in a 64-bit integer. Both limits are much larger than what might be available in practice, so it doesn't affect users. _PyLong_NumBits() and _PyLong_Frexp() are now always successful. | |||||
* | gh-124665: Add `_PyCodec_UnregisterError` and `_codecs._unregister_error` ↵ | Bénédikt Tran | 2024-09-29 | 1 | -0/+22 | |
| | | | | (#124677) | |||||
* | gh-124442: make `__static_attributes__` deterministic by sorting (#124492) | Kira | 2024-09-28 | 1 | -1/+11 | |
| | | | | | Signed-off-by: kp2pml30 <kp2pml30@gmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> | |||||
* | gh-107954: Fix configuration type for the perf profiler (#124636) | Pablo Galindo Salgado | 2024-09-27 | 1 | -1/+1 | |
| | ||||||
* | gh-119180: No longer set `__annotations__` in `__main__` (#124634) | Jelle Zijlstra | 2024-09-27 | 1 | -7/+1 | |
| | ||||||
* | gh-116510: Fix crash during sub-interpreter shutdown (gh-124645) | Neil Schemenauer | 2024-09-27 | 1 | -3/+26 | |
| | | | | | Fix a bug that can cause a crash when sub-interpreters use "basic" single-phase extension modules. Shared objects could refer to PyGC_Head nodes that had been freed as part of interpreter shutdown. | |||||
* | GH-123516: Improve JIT memory consumption by invalidating cold executors ↵ | Savannah Ostrowski | 2024-09-27 | 6 | -0/+70 | |
| | | | | | (GH-124443) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> | |||||
* | gh-119333: get interp from tstate for PyContext watchers(#124444) | Jason Fried | 2024-09-26 | 1 | -4/+4 | |
| | | | Co-authored-by: Kumar Aditya <kumaraditya@python.org> | |||||
* | gh-117376: Fix off-by-ones in conversion functions (GH-124301) | Ken Jin | 2024-09-25 | 3 | -6/+6 | |
| | | | Fix off-by-ones in conversion function | |||||
* | gh-124285: Fix bug where bool() is called multiple times for the same part ↵ | Irit Katriel | 2024-09-25 | 3 | -6/+81 | |
| | | | | of a boolean expression (#124394) | |||||
* | gh-123923: Defer refcounting for `f_funcobj` in `_PyInterpreterFrame` (#124026) | Sam Gross | 2024-09-24 | 9 | -111/+87 | |
| | | | | | | 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-124188: Fix PyErr_ProgramTextObject() (GH-124189) | Serhiy Storchaka | 2024-09-24 | 1 | -35/+56 | |
| | | | | | | | | * Detect source file encoding. * Use the "replace" error handler even for UTF-8 (default) encoding. * Remove the BOM. * Fix detection of too long lines if they contain NUL. * Return the head rather than the tail for truncated long lines. | |||||
* | gh-119333: Add C api to have contextvar enter/exit callbacks (#119335) | Jason Fried | 2024-09-24 | 2 | -0/+81 | |
| | | | Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> | |||||
* | GH-124284: Add stats for refcount operations on immortal objects (GH-124288) | Mark Shannon | 2024-09-23 | 2 | -4/+11 | |
| | ||||||
* | gh-111513: Improve datetime.fromtimestamp's error message (#124249) | AN Long | 2024-09-20 | 1 | -0/+4 | |
| | ||||||
* | gh-123880: Allow recursive import of single-phase-init modules (GH-123950) | Petr Viktorin | 2024-09-20 | 1 | -5/+13 | |
| | | | | Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Co-authored-by: Brett Cannon <brett@python.org> | |||||
* | gh-124160: Pass main_tstate to update_global_state_for_extension() (#124164) | luk1337 | 2024-09-19 | 1 | -1/+1 | |
| | ||||||
* | gh-116022: Improve `repr()` of AST nodes (#117046) | Tomas R | 2024-09-18 | 1 | -0/+222 | |
| | | | | | | Co-authored-by: AN Long <aisk@users.noreply.github.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> | |||||
* | gh-123969: refactor _PyErr_RaiseSyntaxError and _PyErr_EmitSyntaxWarning out ↵ | Irit Katriel | 2024-09-16 | 2 | -30/+53 | |
| | | | | of compiler (#123972) | |||||
* | gh-124058: remove _PyCompile_IsNestedScope, roll it into ↵ | Irit Katriel | 2024-09-16 | 2 | -11/+5 | |
| | | | | _PyCompile_IsInteractive (#124061) | |||||
* | gh-124068: Fix reference leak with generators in the free-threaded build ↵ | Sam Gross | 2024-09-14 | 1 | -0/+13 | |
| | | | | | | | (#124069) If the generator is already cleared, then most fields in the generator's frame are not valid other than f_executable. The invalid fields may contain dangling pointers and should not be used. | |||||
* | gh-121459: Deferred LOAD_GLOBAL (GH-123128) | Ken Jin | 2024-09-13 | 5 | -28/+30 | |
| | | | | 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-124022: Fix bug where class docstring is removed in interactive mode ↵ | Irit Katriel | 2024-09-13 | 2 | -5/+5 | |
| | | | | | | | (#124023) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> | |||||
* | gh-124019: do not call codegen_annotations_in_scope if there are no ↵ | Irit Katriel | 2024-09-12 | 1 | -14/+10 | |
| | | | | annotations (#124020) | |||||
* | gh-124013: remove _PyCompile_IsTopLevelAwait (#124014) | Irit Katriel | 2024-09-12 | 2 | -25/+0 | |
| | ||||||
* | gh-123923: Defer refcounting for `f_executable` in `_PyInterpreterFrame` ↵ | Sam Gross | 2024-09-12 | 9 | -76/+102 | |
| | | | | | | | | (#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-123996: Explicitly mark 'self_or_null' as an array of size 1 to ensure ↵ | Mark Shannon | 2024-09-12 | 4 | -322/+291 | |
| | | | | that it is kept in memory for calls (GH-124003) | |||||
* | gh-123958: apply docstring removal optimization in ast_opt instead of ↵ | Irit Katriel | 2024-09-11 | 2 | -22/+37 | |
| | | | | codegen (#123959) | |||||
* | gh-123881: make compiler add the .generic_base base class without ↵ | Irit Katriel | 2024-09-10 | 2 | -46/+52 | |
| | | | | | | constructing AST nodes (#123883) | |||||
* | gh-122239: Add actual count in unbalanced unpacking error message when ↵ | Tushar Sadhwani | 2024-09-10 | 1 | -0/+11 | |
| | | | | possible (#122244) | |||||
* | gh-123892: Add "_wmi" to sys.stdlib_module_names (#123893) | Victor Stinner | 2024-09-10 | 1 | -0/+1 | |
| | ||||||
* | gh-121404: split compile.c into compile.c and codegen.c (#123651) | Irit Katriel | 2024-09-09 | 3 | -6644/+6521 | |
| | ||||||
* | gh-123275: Support `-Xgil=1` and `PYTHON_GIL=1` on non-free-threaded builds ↵ | Peter Bierma | 2024-09-05 | 1 | -4/+8 | |
| | | | | (gh-123276) | |||||
* | GH-123545: Remove duplicate Py_DECREF when handling _PyOptimizer_Optimize ↵ | Savannah Ostrowski | 2024-09-05 | 2 | -8/+0 | |
| | | | | errors (GH-123546) | |||||
* | gh-107954, PEP 741: Add PyInitConfig_AddModule() function (#123668) | Victor Stinner | 2024-09-04 | 1 | -0/+35 | |
| | ||||||
* | gh-107954, PEP 741: Adjust Python initialization config (#123663) | Victor Stinner | 2024-09-04 | 1 | -3/+9 | |
| | | | | | | | Setting dev_mode to 1 in an isolated configuration now enables also faulthandler. Moreover, setting "module_search_paths" option with PyInitConfig_SetStrList() now sets "module_search_paths_set" to 1. | |||||
* | gh-121804: always show error location for SyntaxError's in basic repl (#123202) | Sergey B Kirpichev | 2024-09-03 | 1 | -0/+31 | |
| | ||||||
* | gh-107954, PEP 741: Add PyInitConfig C API (#123502) | Victor Stinner | 2024-09-03 | 1 | -8/+485 | |
| | | | Add Doc/c-api/config.rst documentation. | |||||
* | gh-107954, PEP 741: Add PyConfig_Get()/Set() functions (#123472) | Victor Stinner | 2024-09-02 | 2 | -194/+844 | |
| | | | | | | | | | | | 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-121404: enforce that codegen doesn't access compiler, and compiler ↵ | Irit Katriel | 2024-09-02 | 1 | -85/+129 | |
| | | | | doesn't use codegen macros (#123575) | |||||
* | gh-123091: Use more _Py_IsImmortalLoose() (GH-123602) | Petr Viktorin | 2024-09-02 | 1 | -1/+1 | |
| | | | | | | | 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 Stinner | 2024-09-02 | 3 | -6/+6 | |
| | | | | Use _Py_IsImmortalLoose() in bytesobject.c, typeobject.c and ceval.c. | |||||
* | gh-123553: Fix compile warning in `compile.c` (#123578) | sobolevn | 2024-09-01 | 1 | -0/+2 | |
| | ||||||
* | gh-123553: Fix compiler warning in `Python/compile.c` (#123554) | Kirill Podoprigora | 2024-09-01 | 1 | -0/+2 | |
| | ||||||
* | gh-121404: rearrange code in compile.c so that codegen functions come first ↵ | Irit Katriel | 2024-08-30 | 1 | -1033/+1071 | |
| | | | | and compiler functions second (#123510) | |||||
* | gh-122854: Add Py_HashBuffer() function (#122855) | Victor Stinner | 2024-08-30 | 2 | -7/+10 | |
| |