[issue35134] Move !Py_LIMITED_API to Include/pycapi/

2018-11-20 Thread STINNER Victor
STINNER Victor added the comment: I propose the following organization: * Include/*.h should be the "stable API" * Include/unstable/*.h is the "unstable API" (if Py_LIMITED_API is *not* defined at all) * Include/internal/pycore_*.h is the "internal" API It should become easier to see what

[issue35134] Move !Py_LIMITED_API to Include/pycapi/

2018-11-20 Thread STINNER Victor
STINNER Victor added the comment: I created a new PR 10624: * move "#ifndef Py_LIMITED_API" code to a new unstable/objimpl.h header file * Include/unstable/ files (Include/unstable/objimpl.h) are no longer prefixed with "unstable_". Include/unstable/ directory must not be added to the

[issue35134] Move !Py_LIMITED_API to Include/pycapi/

2018-11-20 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9872 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35134] Move !Py_LIMITED_API to Include/pycapi/

2018-11-05 Thread Nick Coghlan
Nick Coghlan added the comment: On actually looking at the initial changes in the PR: * declarations that aren't part of the stable ABI in any version (i.e. "#ifndef PY_LIMITED_API", "#if !defined(PY_LIMITED_API)") should move to the new directory * declarations that are part of the stable

[issue35134] Move !Py_LIMITED_API to Include/pycapi/

2018-11-05 Thread Nick Coghlan
Nick Coghlan added the comment: > To be honest, I'm not sure that I understand how "Py_LIMITED_API+0 >= > 0x0305" works and should be used. It's described here: https://docs.python.org/3/c-api/stable.html If a stable ABI consumer just declares "#define PY_LIMITED_API 1", then they'll

[issue35134] Move !Py_LIMITED_API to Include/pycapi/

2018-11-05 Thread Nick Coghlan
Change by Nick Coghlan : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35134] Move !Py_LIMITED_API to Include/pycapi/

2018-11-02 Thread STINNER Victor
STINNER Victor added the comment: > Do you want to keep only stable ABI v.3.2 and move both newer stable API and > non-stable API to the pycapi/ subdirectory? Sorry, I don't found a sense in > this. The raw definition could be that Include/*.h is part of the stable ABI, and

[issue35134] Move !Py_LIMITED_API to Include/pycapi/

2018-11-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Do you want to keep only stable ABI v.3.2 and move both newer stable API and non-stable API to the pycapi/ subdirectory? Sorry, I don't found a sense in this. -- ___ Python tracker

[issue35134] Move !Py_LIMITED_API to Include/pycapi/

2018-11-02 Thread STINNER Victor
STINNER Victor added the comment: > There are not just two sides. It is common to wrap new stable C API with > something like: > #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x0305 > What will you do with this? objimpl.h always includes pycapi/pycapi_objimpl.h, so I don't think

[issue35134] Move !Py_LIMITED_API to Include/pycapi/

2018-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are not just two sides. It is common to wrap new stable C API with something like: #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x0305 What will you do with this? -- nosy: +serhiy.storchaka

[issue35134] Move !Py_LIMITED_API to Include/pycapi/

2018-11-01 Thread STINNER Victor
Change by STINNER Victor : -- title: Move Py_LIMITED_API to Include/pycapi/ -> Move !Py_LIMITED_API to Include/pycapi/ ___ Python tracker ___

[issue35134] Move Py_LIMITED_API to Include/pycapi/

2018-11-01 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +9596 stage: -> patch review ___ Python tracker ___ ___

[issue35134] Move Py_LIMITED_API to Include/pycapi/

2018-11-01 Thread STINNER Victor
New submission from STINNER Victor : The PEP 384 "Defining a Stable ABI" introduced Py_LIMITED_API define to exclude functions from the Python C API. The problem is when a new API is introduced, it has to explicitly be excluded using "#ifndef Py_LIMITED_API". If the author forgets it, the