[issue29058] Mark new limited C API

Serhiy Storchaka report at bugs.python.org
Tue Dec 27 14:59:32 EST 2016


Serhiy Storchaka added the comment:

Sorry, but perhaps I don't fully understand you.

It is legitimately to just define Py_LIMITED_API without requiring specific version:

    #define Py_LIMITED_API

In that case you can use the stable API of the version 3.2, but can't use PyType_FromSpecWithBases() and PyModule_AddFunctions(), because they are correctly attributed as API of versions 3.3 and 3.5. You can also mistakenly use PyImport_ImportModuleLevelObject() added in 3.5, this is a matter of this issue. But you shouldn't.

The problem is that the warning should be emitted only for users that use incorrect API. But it shouldn't be emitted for users that use just 3.2 API (perhaps the code was written at the time of 3.2 and was not changed since).

----------
status: closed -> open

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29058>
_______________________________________


More information about the Python-bugs-list mailing list