Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
Open
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()_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 olddiscussion (2023)_PyWeakref_ClearRef()_Py_BreakPoint()_Py_GetGlobalRefTotal(),_Py_GetLegacyRefTotal(),_PyInterpreterState_GetRefTotal(): call Pythonsys.gettotalrefcount()function_Py_HashDouble(): seedecision issue #2 anddecision issue #10_Py_NewReference(),_Py_NewReferenceNoTotal(),_Py_ForgetReference(),_Py_ResurrectReference(): seeold issue_Py_ReachedRecursionLimitWithMargin()
If one of these functions is used, users should request a public C API replacing the private function.
I propose tonot schedule the removal of these functions for now.