| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
(#101038)
This PR fixes object allocation in long_subtype_new to ensure that there's at least one digit in all cases, and makes sure that the value of that digit is copied over from the source long.
Needs backport to 3.11, but not any further: the change to require at least one digit was only introduced for Python 3.11.
Fixes #101037.
|
|
|
|
|
|
|
|
|
|
| |
The objective of this change is to help make the GILState-related code easier to understand. This mostly involves moving code around and some semantically equivalent refactors. However, there are a also a small number of slight changes in structure and behavior:
* tstate_current is moved out of _PyRuntimeState.gilstate
* autoTSSkey is moved out of _PyRuntimeState.gilstate
* autoTSSkey is initialized earlier
* autoTSSkey is re-initialized (after fork) earlier
https://github.com/python/cpython/issues/59956
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
(_PyFrame_Initialize) (GH-100759)
|
|
|
| |
* Remove UNARY_POSITIVE, LIST_TO_TUPLE and ASYNC_GEN_WRAP, replacing them with intrinsics.
|
|
|
|
|
|
|
|
| |
* Remove PRINT_EXPR instruction
* Remove STOPITERATION_ERROR instruction
* Remove IMPORT_STAR instruction
|
| |
|
| |
|
|
|
|
| |
into the new function _PyFrame_NumSlotsForCodeObject (#100722)
|
|
|
|
|
|
|
|
|
|
| |
When executing the BUILD_LIST opcode, steal the references from the stack,
in a manner similar to the BUILD_TUPLE opcode. Implement this by offloading
the logic to a new private API, _PyList_FromArraySteal(), that works similarly
to _PyTuple_FromArraySteal().
This way, instead of performing multiple stack pointer adjustments while the
list is being initialized, the stack is adjusted only once and a fast memory
copy operation is performed in one fell swoop.
|
| |
|
|
|
|
|
| |
Not comprehensive, best effort warning. There are cases when threads exist on some platforms that this code cannot detect. macOS when API permissions allow and Linux with a readable /proc procfs present are the currently supported cases where a warning should show up reliably.
Starting with a DeprecationWarning for now, it is less disruptive than something like RuntimeWarning and most likely to only be seen in people's CI tests - a good place to start with this messaging.
|
|
|
|
|
| |
(GH-100289)" (#100468)
This reverts commit c3c7848a48b74a321632202e4bdcf2f465fb1cc6.
|
| |
|
| |
|
|
|
|
| |
fault when accessing `frame.f_back` (#100182)
|
|
|
|
| |
digit integers (#100064)
|
|
|
|
|
| |
* Don't attempt to specialize for LOAD_ATTR on instance if class has attribute
* Improvement to LOAD_ATTR and STORE_ATTR specialization stats.
|
| |
|
| |
|
|
|
|
|
| |
Typo introduced in #100223.
Automerge-Triggered-By: GH:brandtbucher
|
|
|
|
|
|
| |
* Initialize `type_watchers` array to `NULL`s
* Optimize code watchers notification
* Optimize func watchers notification
|
|
|
|
|
|
|
|
| |
* move _PyRuntime.global_objects.interned to _PyRuntime.cached_objects.interned_strings (and use _Py_CACHED_OBJECT())
* rename _PyRuntime.global_objects to _PyRuntime.static_objects
(This also relates to gh-96075.)
https://github.com/python/cpython/issues/90111
|
|
|
|
| |
unit. (GH-100223)
|
|
|
| |
https://github.com/python/cpython/issues/81057
|
|
|
| |
https://github.com/python/cpython/issues/81057
|
|
|
| |
https://github.com/python/cpython/issues/81057
|
|
|
|
|
| |
The build was broken by gh-100084.
https://github.com/python/cpython/issues/81057
|
|
|
|
|
|
| |
* Add version number to code object for better versioning of functions.
* Improves specialization for closures and list comprehensions.
|
| |
|
|
|
| |
* Specialize FOR_ITER for tuples
|
|
|
| |
https://github.com/python/cpython/issues/81057
|
|
|
| |
https://github.com/python/cpython/issues/81057
|
|
|
| |
https://github.com/python/cpython/issues/81057
|
|
|
| |
https://github.com/python/cpython/issues/81057
|
|
|
| |
https://github.com/python/cpython/issues/81057
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Py_CLEAR(), Py_SETREF() and Py_XSETREF() macros now only evaluate
their arguments once. If an argument has side effects, these side
effects are no longer duplicated.
Use temporary variables to avoid duplicating side effects of macro
arguments. If available, use _Py_TYPEOF() to avoid type punning.
Otherwise, use memcpy() for the assignment to prevent a
miscompilation with strict aliasing caused by type punning.
Add _Py_TYPEOF() macro: __typeof__() on GCC and clang.
Add test_py_clear() and test_py_setref() unit tests to _testcapi.
|
|
|
|
| |
The PyUnicode_KIND() macro is modified to use _Py_RVALUE(), so it can
no longer be used as a l-value.
|
| |
|
| |
|
|
|
|
|
|
|
| |
(gh-99742)
_xxsubinterpreters is an internal module used for testing.
https://github.com/python/cpython/issues/99741
|
| |
|
|
|
|
|
| |
This cleanup up resolves a few subtle bugs and makes the implementation for multi-phase init much cleaner.
https://github.com/python/cpython/issues/99741
|
|
|
|
|
| |
There were some minor issues that showed up while I was working on porting _xxsubinterpreters to multi-phase init. This fixes them.
https://github.com/python/cpython/issues/99741
|