New submission from Serhiy Storchaka:

Functions added to a limited API after 3.2 should be available only when 
Py_LIMITED_API is not defined or is set to corresponding hexadecimal Python 
version (e.g. 0x03050000).

Proposed patch makes following names available only for corresponding versions 
of a limited API.

Removed declaration: PyErr_SetExcWithArgsKwargs().

Excluded from stable ABI: _PyBytes_DecodeEscape(), PyInit_imp().

3.3: Py_hexdigits, PyImport_ExecCodeModuleObject(), PyImport_AddModuleObject(), 
PyImport_ImportFrozenModuleObject(), PyMemoryView_FromMemory(), 
PyModule_NewObject(), PyModule_GetNameObject(), PyObject_GenericSetDict(), 
PyErr_GetExcInfo(), PyErr_SetExcInfo(), PyErr_SetImportError(), 
PyParser_SimpleParseStringFlagsFilename(), PyThread_GetInfo(), 
PyUnicode_Substring(), PyUnicode_AsUCS4(), PyUnicode_AsUCS4Copy(), 
PyUnicode_GetLength(), PyUnicode_ReadChar(), PyUnicode_WriteChar(), 
PyUnicode_DecodeCodePageStateful(), PyUnicode_EncodeCodePage(), 
PyUnicode_DecodeLocaleAndSize(), PyUnicode_DecodeLocale(), 
PyUnicode_EncodeLocale(), PyUnicode_FindChar(), and a number of OSError 
subclasses.

3.4: PyErr_SetFromErrnoWithFilenameObjects(), 
PyErr_SetExcFromWindowsErrWithFilenameObjects().

3.5: PyNumber_MatrixMultiply(), PyNumber_InPlaceMatrixMultiply(), 
PyCodec_NameReplaceErrors(), Py_DecodeLocale(), Py_EncodeLocale(), 
PyImport_ImportModuleLevelObject(), PyObject_Calloc(), 
PyExc_StopAsyncIteration, PyExc_RecursionError, PyMem_Calloc(), 
a number of PyODict_* macros.

3.6: Py_FileSystemDefaultEncodeErrors, PyOS_FSPath(), 
PyExc_ModuleNotFoundError, PyErr_SetImportErrorSubclass(), 
PyErr_ResourceWarning().

However it may be better that some was added to stable ABI by mistake. 
Py_hexdigits looks as a stuff for internal use, PyThread_GetInfo() and 
PyODict_* macros are not documented.

----------
components: Interpreter Core
files: limited-api.patch
keywords: patch
messages: 283910
nosy: haypo, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Mark new limited C API
versions: Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file46016/limited-api.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29058>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to