summaryrefslogtreecommitdiffstats
path: root/Include
Commit message (Collapse)AuthorAgeFilesLines
* gh-106320: Remove _PyOS_ReadlineTState API (#107034)Victor Stinner2023-07-221-1/+0
| | | | Remove _PyOS_ReadlineTState variable from the public C API. The symbol is still exported for the readline shared extension.
* gh-106320: Move private _PyGen API to the internal C API (#107032)Victor Stinner2023-07-222-6/+11
| | | | | | | | | | | | | Move private _PyGen API to internal C API: * _PyAsyncGenAThrow_Type * _PyAsyncGenWrappedValue_Type * _PyCoroWrapper_Type * _PyGen_FetchStopIterationValue() * _PyGen_Finalize() * _PyGen_SetStopIterationValue() No longer these symbols, except of the ones by the _asyncio shared extensions.
* gh-106320: Move _PyNone_Type to the internal C API (#107030)Victor Stinner2023-07-222-3/+4
| | | | Move private types _PyNone_Type and _PyNotImplemented_Type to internal C API.
* gh-106320: Move private _PyHash API to the internal C API (#107026)Victor Stinner2023-07-222-86/+83
| | | | | * No longer export most private _PyHash symbols, only export the ones which are needed by shared extensions. * Modules/_xxtestfuzz/fuzzer.c now uses the internal C API.
* gh-106320: Remove private _PyUnicode_AsString() alias (#107021)Victor Stinner2023-07-221-5/+0
| | | | | | | | Remove private _PyUnicode_AsString() alias to PyUnicode_AsUTF8(). It was kept for backward compatibility with Python 3.0 - 3.2. The PyUnicode_AsUTF8() is available since Python 3.3. The PyUnicode_AsUTF8String() function can be used to keep compatibility with Python 3.2 and older.
* gh-106004: Add PyDict_GetItemRef() function (#106005)Victor Stinner2023-07-211-0/+9
| | | | | * Add PyDict_GetItemRef() and PyDict_GetItemStringRef() functions. Add these functions to the stable ABI version 3.13. * Add unit tests on the PyDict C API in test_capi.
* GH-106701: Move _PyUopExecute to Python/executor.c (GH-106924)Brandt Bucher2023-07-201-0/+12
|
* gh-105481: do not auto-generate pycore_intrinsics.h (#106913)Irit Katriel2023-07-202-5/+17
|
* Export _PyEval_SetProfile() as a function, not data (#106887)Victor Stinner2023-07-191-1/+1
|
* gh-105481: Generate the opcode lists in dis from data extracted from ↵Irit Katriel2023-07-182-16/+24
| | | | bytecodes.c (#106758)
* bpo-42327: C API: Add PyModule_Add() function (GH-23443)Serhiy Storchaka2023-07-181-3/+9
| | | | | It is a fixed implementation of PyModule_AddObject() which consistently steals reference both on success and on failure.
* Small fixes to code generator (#106845)Guido van Rossum2023-07-181-5/+5
| | | | These repair nits I found in PR gh-106798 (issue gh-106797) and in PR gh-106716 (issue gh-106706).
* gh-106603: Make uop struct a triple (opcode, oparg, operand) (#106794)Guido van Rossum2023-07-172-18/+29
|
* gh-106581: Add 10 new opcodes by allowing `assert(kwnames == NULL)` (#106707)Guido van Rossum2023-07-171-0/+10
| | | | | | | | | | | | | By turning `assert(kwnames == NULL)` into a macro that is not in the "forbidden" list, many instructions that formerly were skipped because they contained such an assert (but no other mention of `kwnames`) are now supported in Tier 2. This covers 10 instructions in total (all specializations of `CALL` that invoke some C code): - `CALL_NO_KW_TYPE_1` - `CALL_NO_KW_STR_1` - `CALL_NO_KW_TUPLE_1` - `CALL_NO_KW_BUILTIN_O` - `CALL_NO_KW_BUILTIN_FAST` - `CALL_NO_KW_LEN` - `CALL_NO_KW_ISINSTANCE` - `CALL_NO_KW_METHOD_DESCRIPTOR_O` - `CALL_NO_KW_METHOD_DESCRIPTOR_NOARGS` - `CALL_NO_KW_METHOD_DESCRIPTOR_FAST`
* gh-106797: Remove warning logs from Python/generated_cases.c.h (gh-106798)Dong-hee Na2023-07-171-5/+5
|
* gh-81283: compiler: remove indent from docstring (#106411)Inada Naoki2023-07-151-0/+2
| | | Co-authored-by: Éric <merwok@netwok.org>
* gh-105481: expose opcode metadata via the _opcode module (#106688)Irit Katriel2023-07-142-10/+28
|
* gh-106529: Split FOR_ITER_{LIST,TUPLE} into uops (#106696)Guido van Rossum2023-07-141-7/+19
| | | | Also rename `_ITER_EXHAUSTED_XXX` to `_IS_ITER_EXHAUSTED_XXX` to make it clear this is a test.
* gh-106701: Move the hand-written Tier 2 uops to bytecodes.c (#106702)Guido van Rossum2023-07-131-50/+50
| | | | | | | This moves EXIT_TRACE, SAVE_IP, JUMP_TO_TOP, and _POP_JUMP_IF_{FALSE,TRUE} from ceval.c to bytecodes.c. They are no less special than before, but this way they are discoverable o the copy-and-patch tooling.
* GH-104909: Split `LOAD_ATTR_INSTANCE_VALUE` into micro-ops (GH-106678)Mark Shannon2023-07-131-9/+13
|
* gh-106529: Split FOR_ITER_RANGE into uops (#106638)Guido van Rossum2023-07-121-0/+6
| | | | For an example of what this does for Tier 1 and Tier 2, see https://github.com/python/cpython/issues/106529#issuecomment-1631649920
* GH-104909: Break LOAD_GLOBAL specializations in micro-ops. (GH-106677)Mark Shannon2023-07-122-3/+9
|
* gh-105481: move Python/opcode_metadata.h to ↵Irit Katriel2023-07-121-0/+1317
| | | | Include/internal/pycore_opcode_metadata.h (#106673)
* gh-106521: Remove _PyObject_LookupAttr() function (GH-106642)Serhiy Storchaka2023-07-121-1/+0
|
* gh-106307: C API: Add PyMapping_GetOptionalItem() function (GH-106308)Serhiy Storchaka2023-07-111-0/+15
| | | | Also add PyMapping_GetOptionalItemString() function.
* gh-106597: Add debugging struct with offsets for out-of-process tools (#106598)Pablo Galindo Salgado2023-07-112-1/+146
|
* gh-106521: Add PyObject_GetOptionalAttr() function (GH-106522)Serhiy Storchaka2023-07-113-11/+37
| | | | | | It is a new name of former _PyObject_LookupAttr(). Add also PyObject_GetOptionalAttrString().
* gh-106572: Convert PyObject_DelAttr() to a function (#106611)Victor Stinner2023-07-112-4/+4
| | | | | | | | * Convert PyObject_DelAttr() and PyObject_DelAttrString() macros to functions. * Add PyObject_DelAttr() and PyObject_DelAttrString() functions to the stable ABI. * Replace PyObject_SetAttr(obj, name, NULL) with PyObject_DelAttr(obj, name).
* gh-105227: Add PyType_GetDict() (GH-105747)Eric Snow2023-07-101-0/+1
| | | | | This compensates for static builtin types having `tp_dict` set to `NULL`. Co-authored-by: Petr Viktorin <encukou@gmail.com>
* GH-100288: Specialize LOAD_ATTR for simple class attributes. (#105990)Mark Shannon2023-07-102-45/+47
| | | * Add two more specializations of LOAD_ATTR.
* gh-106303: Use _PyObject_LookupAttr() instead of PyObject_GetAttr() (GH-106304)Serhiy Storchaka2023-07-094-0/+6
| | | | It simplifies and speed up the code.
* gh-105340: include hidden fast-locals in locals() (#105715)Carl Meyer2023-07-052-0/+4
| | | * gh-105340: include hidden fast-locals in locals()
* gh-106320: Remove _PyInterpreterState_HasFeature() (#106425)Victor Stinner2023-07-042-32/+32
| | | | | Remove the _PyInterpreterState_HasFeature() function from the C API: move it to the internal C API (pycore_interp.h). No longer export the function.
* GH-106360: Support very basic superblock introspection (#106422)Mark Shannon2023-07-042-3/+8
| | | * Add len() and indexing support to uop superblocks.
* gh-106320: Remove private pylifecycle.h functions (#106400)Victor Stinner2023-07-044-38/+41
| | | | | | | Remove private pylifecycle.h functions: move them to the internal C API ( pycore_atexit.h, pycore_pylifecycle.h and pycore_signal.h). No longer export most of these functions. Move _testcapi.test_atexit() to _testinternalcapi.
* gh-106320: Remove _PyUnicode_TransformDecimalAndSpaceToASCII() (#106398)Victor Stinner2023-07-042-39/+37
| | | | | | | | Remove private _PyUnicode_TransformDecimalAndSpaceToASCII() and other private _PyUnicode C API functions: move them to the internal C API (pycore_unicodeobject.h). No longer most of these functions. Replace _testcapi.unicode_transformdecimalandspacetoascii() with _testinternal._PyUnicode_TransformDecimalAndSpaceToASCII().
* gh-106320: Remove _PyBytesWriter C API (#106399)Victor Stinner2023-07-043-81/+83
| | | | Remove the _PyBytesWriter C API: move it to the internal C API (pycore_bytesobject.h).
* gh-106320: Remove private _PyUnicode codecs C API functions (#106385)Victor Stinner2023-07-042-106/+100
| | | | | Remove private _PyUnicode codecs C API functions: move them to the internal C API (pycore_unicodeobject.h). No longer export most of these functions.
* gh-106320: Fix _PyImport_GetModuleAttr() declaration (#106386)Victor Stinner2023-07-031-2/+2
| | | Replace PyAPI_DATA() with PyAPI_FUNC().
* gh-106320: Remove private _PyImport C API functions (#106383)Victor Stinner2023-07-032-20/+20
| | | | | | * Remove private _PyImport C API functions: move them to the internal C API (pycore_import.h). * No longer export most of these private functions. * _testcapi avoids private _PyImport_GetModuleAttrString().
* gh-86085: Remove _PyCodec_Forget() declaration (#106377)Victor Stinner2023-07-031-2/+0
| | | | The code was already removed by: commit c9f696cb96d1c362d5cad871f61da520572d9b08.
* gh-106320: Remove more private _PyUnicode C API functions (#106382)Victor Stinner2023-07-032-70/+69
| | | | | | Remove more private _PyUnicode C API functions: move them to the internal C API (pycore_unicodeobject.h). No longer export most pycore_unicodeobject.h functions.
* GH-104584: Fix ENTER_EXECUTOR (GH-106141)Mark Shannon2023-07-031-0/+2
| | | | | | * Check eval-breaker in ENTER_EXECUTOR. * Make sure that frame->prev_instr is set before entering executor.
* gh-106290: Fix edge cases around uops (#106319)Guido van Rossum2023-07-031-1/+1
| | | | | | | | | | - Tweak uops debugging output - Fix the bug from gh-106290 - Rename `SET_IP` to `SAVE_IP` (per https://github.com/faster-cpython/ideas/issues/558) - Add a `SAVE_IP` uop at the start of the trace (ditto) - Allow `unbound_local_error`; this gives us uops for `LOAD_FAST_CHECK`, `LOAD_CLOSURE`, and `DELETE_FAST` - Longer traces - Support `STORE_FAST_LOAD_FAST`, `STORE_FAST_STORE_FAST` - Add deps on pycore_uops.h to Makefile(.pre.in)
* gh-106320: Remove private _PyErr C API functions (#106356)Victor Stinner2023-07-032-42/+48
| | | | Remove private _PyErr C API functions: move them to the internal C API (pycore_pyerrors.h).
* gh-106320: Create pycore_modsupport.h header file (#106355)Victor Stinner2023-07-032-12/+29
| | | | | | | | | | Remove the following functions from the C API, move them to the internal C API: add a new pycore_modsupport.h internal header file: * PyModule_CreateInitialized() * _PyArg_NoKwnames() * _Py_VaBuildStack() No longer export these functions.
* gh-106320: Move _PyUnicodeWriter to the internal C API (#106342)Victor Stinner2023-07-034-141/+147
| | | | | | Move also _PyUnicode_FormatAdvancedWriter(). CJK codecs and multibytecodec.c now define the Py_BUILD_CORE_MODULE macro.
* gh-106320: Add pycore_complexobject.h header file (#106339)Victor Stinner2023-07-022-21/+33
| | | | | | Add internal pycore_complexobject.h header file. Move _Py_c_xxx() functions and _PyComplex_FormatAdvancedWriter() function to this new header file.
* gh-106320: Remove private _PyInterpreterState functions (#106325)Victor Stinner2023-07-023-60/+53
| | | | | | | | | Remove private _PyThreadState and _PyInterpreterState C API functions: move them to the internal C API (pycore_pystate.h and pycore_interp.h). Don't export most of these functions anymore, but still export functions used by tests. Remove _PyThreadState_Prealloc() and _PyThreadState_Init() from the C API, but keep it in the stable API.
* gh-106320: Remove private _PyTraceMalloc C API functions (#106324)Victor Stinner2023-07-024-73/+72
| | | | | | | * Remove private _PyTraceMalloc C API functions: move them to the internal C API. * Don't export most of these functions anymore, but still export _PyTraceMalloc_GetTraceback() used by tests. * Rename Include/tracemalloc.h to Include/cpython/tracemalloc.h