-
-
Notifications
You must be signed in to change notification settings - Fork 33.3k
Open
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-C-APItype-featureA feature request or enhancementA feature request or enhancement
Description
I propose to deprecate 42 private functions of the C API:
_PyArg_ParseTupleAndKeywordsFast(): see [C API] Removed private _PyArg_Parser API has no replacement in Python 3.13 #112136_PyCode_CheckLineNumber()_PyDict_GetItem_KnownHash()_PyDict_NewPresized(): see [C API] Add PyDict_NewPresized() function #139772_PyErr_ChainExceptions1(): see _PyErr_ChainExceptions1 no longer avallable to extension modules in Python 3.13 alpha headers #116809_PyEval_SliceIndex()_PyEval_SliceIndexNotNone()_PyFrame_IsEntryFrame()_PyInterpreterState_GetEvalFrameFunc(),_PyInterpreterState_SetEvalFrameFunc(),_PyEval_EvalFrameDefault(): PEP 523_PyInterpreterState_RequireIDRef()_PyInterpreterState_RequiresIDRef()_PyLong_AsByteArray(): usePyLong_AsNativeBytes()_PyLong_Copy()_PyLong_FromByteArray(): usePyLong_FromNativeBytes()_PyLong_GCD(): call Pythonmath.gcd()function_PyLong_NumBits(): call Pythonint.bit_length()method_PyObject_CallMethodId(): usePyObject_CallMethod()_PyObject_Dump(): see [C API] Promote _PyObject_Dump() to a public function #141070_PyObject_FunctionStr()_PyObject_GetAttrId(): usePyObject_GetAttr()_PyObject_GetDictPtr(): see [C API] Add PyObject_GetDict() function #139852_PySlice_FromIndices(): usePySlice_New()_PySlice_GetLongIndices(): usePySlice_GetIndices()_PyStack_AsDict()_PyThread_CurrentFrames(): call Pythonsys._current_frames()function_PyType_Lookup(),_PyType_LookupRef(): see [C API] Add PyType_Lookup() function #139847_PyType_Name(): usePyType_GetName()_PyUnicode_FromId(): usePyUnicode_FromString()and cache the result; see the old discussion (2023)_PyWeakref_ClearRef()_Py_BreakPoint()_Py_GetGlobalRefTotal(),_Py_GetLegacyRefTotal(),_PyInterpreterState_GetRefTotal(): call Pythonsys.gettotalrefcount()function_Py_HashDouble(): see decision issue #2 and decision issue #10_Py_NewReference(),_Py_NewReferenceNoTotal(),_Py_ForgetReference(),_Py_ResurrectReference(): see old issue_Py_ReachedRecursionLimitWithMargin()
If one of these functions is used, users should request a public C API replacing the private function.
I propose to not schedule the removal of these functions for now.
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-C-APItype-featureA feature request or enhancementA feature request or enhancement