| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
Add _PyTypes_FiniTypes() best-effort function to clear static types:
don't deallocate a type if it still has subclasses.
remove_subclass() now sets tp_subclasses to NULL when removing the
last subclass.
|
|
|
|
|
|
|
|
| |
"python -X showrefcount" now shows the total reference count after
clearing and destroyed the main Python interpreter. Previously, it
was shown before.
Py_FinalizeEx() now calls _PyDebug_PrintTotalRefs() after
finalize_interp_delete().
|
|
|
|
|
|
|
|
| |
The _curses module now creates its ncurses_version type as a heap
type using PyStructSequence_NewType(), rather than using a static
type.
* Move _PyStructSequence_FiniType() definition to pycore_structseq.h.
* test.pythoninfo: log curses.ncurses_version.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add _PyStructSequence_FiniType() and _PyStaticType_Dealloc()
functions to finalize a structseq static type in Py_Finalize().
Currrently, these functions do nothing if Python is built in release
mode.
Clear static types:
* AsyncGenHooksType: sys.set_asyncgen_hooks()
* FlagsType: sys.flags
* FloatInfoType: sys.float_info
* Hash_InfoType: sys.hash_info
* Int_InfoType: sys.int_info
* ThreadInfoType: sys.thread_info
* UnraisableHookArgsType: sys.unraisablehook
* VersionInfoType: sys.version
* WindowsVersionType: sys.getwindowsversion()
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add RETURN_GENERATOR and JUMP_NO_INTERRUPT opcodes.
* Trim frame and generator by word each.
* Minor refactor of frame.c
* Update test.test_sys to account for smaller frames.
* Treat generator functions as normal functions when evaluating and specializing.
|
|
|
|
|
|
| |
Use common error message for non-string attribute name in the builtin
functions getattr and hasattr.
The special check no longer needed since Python 3.0.
|
| |
|
| |
|
|
|
|
|
| |
fields we can. (gh-30589)
https://bugs.python.org/issue45953
|
|
|
| |
https://bugs.python.org/issue45953
|
|
|
| |
This makes ntpath.abspath()/getpath_abspath() follow normpath(), since some WinAPIs such as PathCchSkipRoot() require backslashed paths.
|
|
|
| |
https://bugs.python.org/issue45953
|
|
|
|
|
| |
file. (gh-30587)
https://bugs.python.org/issue46370
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
state). (gh-29883)
Previously, the main interpreter was allocated on the heap during runtime initialization. Here we instead embed it into _PyRuntimeState, which means it is statically allocated as part of the _PyRuntime global. The same goes for the initial thread state (of each interpreter, including the main one). Consequently there are fewer allocations during runtime/interpreter init, fewer possible failures, and better memory locality.
FYI, this also helps efforts to consolidate globals, which in turns helps work on subinterpreter isolation.
https://bugs.python.org/issue45953
|
| |
|
| |
|
|
|
| |
First introduced in 0332e569c12d3dc97171546c6dc10e42c27de34b
|
|
|
|
|
| |
The empty bytes object (b'') and the 256 one-character bytes objects were allocated at runtime init. Now we statically allocate and initialize them.
https://bugs.python.org/issue45953
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Move almost all private functions of Include/cpython/fileutils.h to
the internal C API Include/internal/pycore_fileutils.h.
Only keep _Py_fopen_obj() in Include/cpython/fileutils.h, since it's
used by _testcapi which must not use the internal C API.
Move EncodeLocaleEx() and DecodeLocaleEx() functions from _testcapi
to _testinternalcapi, since the C API moved to the internal C API.
|
| |
|
|
|
|
| |
(GH-30473)
|
|
|
| |
Automerge-Triggered-By: GH:isidentical
|
|
|
|
|
| |
(GH-30439)
Automerge-Triggered-By: GH:iritkatriel
|
|
|
|
| |
_Py_normpath()/os.path.normpath (GH-30362)
|
|
|
|
| |
* Add a RESUME instruction to handle "call" events.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
* bpo-46202: remove opcode POP_EXCEPT_AND_RERAISE
* do not assume that an exception group is truthy
|
|
|
|
| |
changes. Move helpers to exceptions.c. Do not assume that exception groups are truthy. (GH-30289)
|
|
|
| |
Automerge-Triggered-By: GH:benjaminp
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* Do not PUSH/POP traceback or type to the stack as part of exc_info
* Remove exc_traceback and exc_type from _PyErr_StackItem
* Add to what's new, because this change breaks things like Cython
|
|
|
|
|
|
| |
(GH-30073)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
|
| |
|
|
|
|
|
|
|
| |
(GH-30129)
* Check __getitem__'s version for overflow.
* Use SPEC_FAIL_OUT_OF_VERSIONS instead
|
|
|
|
|
|
|
|
|
| |
stats (GH-30116)
* Simplify specialization stats collection macros.
* Add --enable-pystats option to configure.
* Update specialization summary script to handle larger number of kinds
|
|
|
|
| |
argument. (GH-29942)
|
|
|
|
|
|
| |
* Split YIELD_FROM opcode into SEND and JUMP_ABSOLUTE.
* Remove YIELD_FROM opcode.
|
|
|
|
|
|
|
|
|
|
| |
* Add 3 new opcodes for calls: PRECALL_METHOD, CALL_NO_KW, CALL_KW.
* Update specialization to handle new CALL opcodes.
* Specialize call to method descriptors.
* Remove old CALL opcodes: CALL_FUNCTION, CALL_METHOD, CALL_METHOD_KW, CALL_FUNCTION_KW.
|
| |
|
| |
|
|
|
|
|
|
|
| |
The array of small PyLong objects has been statically declared. Here I also statically initialize them. Consequently they are no longer initialized dynamically during runtime init.
I've also moved them under a new sub-struct in _PyRuntimeState, in preparation for static allocation and initialization of other global objects.
https://bugs.python.org/issue45953
|