This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details
Type: Stage: resolved
Components: Interpreter Core Versions: Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: brett.cannon, eric.snow, erlendaasland, jkloth, ncoghlan, nw0, serhiy.storchaka, shihai1991, vstinner
Priority: normal Keywords: patch

Created on 2018-11-01 12:46 by vstinner, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 10285 closed vstinner, 2018-11-01 13:04
PR 10624 merged vstinner, 2018-11-20 22:37
PR 10679 merged vstinner, 2018-11-23 16:17
PR 10680 merged vstinner, 2018-11-23 16:43
PR 10727 merged vstinner, 2018-11-26 20:50
PR 10728 merged vstinner, 2018-11-26 21:09
PR 10731 merged vstinner, 2018-11-26 22:24
PR 10732 merged vstinner, 2018-11-26 22:43
PR 10733 merged vstinner, 2018-11-26 22:59
PR 10739 merged vstinner, 2018-11-27 11:20
PR 10754 merged vstinner, 2018-11-27 22:28
PR 10764 merged vstinner, 2018-11-28 11:47
PR 12840 merged vstinner, 2019-04-15 14:37
PR 12842 merged vstinner, 2019-04-15 15:03
PR 13430 merged vstinner, 2019-05-19 21:55
PR 13431 merged vstinner, 2019-05-19 22:24
PR 14213 merged vstinner, 2019-06-18 22:27
PR 18052 merged ncoghlan, 2020-01-20 22:19
PR 18395 merged vstinner, 2020-02-07 07:53
PR 18490 closed vstinner, 2020-02-12 20:33
PR 18493 merged vstinner, 2020-02-12 22:08
PR 18494 merged vstinner, 2020-02-12 22:25
PR 19756 merged vstinner, 2020-04-28 14:45
PR 23701 merged vstinner, 2020-12-08 17:13
PR 23988 merged nw0, 2020-12-29 09:53
PR 24550 merged nw0, 2021-02-16 14:13
PR 24561 merged nw0, 2021-02-18 10:55
PR 24770 closed nw0, 2021-03-06 05:42
PR 24922 merged shihai1991, 2021-03-18 17:43
PR 28957 merged vstinner, 2021-10-14 21:10
PR 28958 merged vstinner, 2021-10-14 22:16
PR 28964 merged vstinner, 2021-10-14 23:54
PR 28968 merged vstinner, 2021-10-15 07:20
PR 29042 merged vstinner, 2021-10-18 22:38
PR 29044 merged vstinner, 2021-10-18 23:39
PR 30923 merged vstinner, 2022-01-26 16:02
PR 32383 merged vstinner, 2022-04-06 22:38
PR 32384 merged vstinner, 2022-04-06 22:46
PR 32385 merged vstinner, 2022-04-06 22:58
Messages (61)
msg329060 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-01 12:46
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 function is added to be stable API by mistake.

I propose to move the API which should be excluded from the stable ABI to a new subdirectory: Include/pycapi/.

To not break the backward compatibility, I propose to automatically include new header files from existing header files. For example, Include/pycapi/pyapi_objimpl.h would be automatically included by Include/pycapi/pycapi_objimpl.h.

New header files would have a "pycapi_" prefix to avoid conflict Include/ header files, if Include/pycapi/ directory is in the header search paths.

This change is a follow-up of bpo-35081 which moved Py_BUILD_CORE code to Include/internal/.

It is also part of a larger project to cleanup the C API, see:

* https://pythoncapi.readthedocs.io/split_include.html
* https://pythoncapi.readthedocs.io/

The change is backward compatible: #include <Python.h> will still provide exactly the same API.
msg329087 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-11-01 21:06
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 >= 0x03050000

What will you do with this?
msg329123 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-02 10:55
> 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 >= 0x03050000
> What will you do with this?

objimpl.h always includes pycapi/pycapi_objimpl.h, so I don't think that we need a strong rules. I propose to always add move code using "#if ... Py_LIMITED_API" to the pycapi/ subdirectory, even if it uses "#if !defined(Py_LIMITED_API)".
msg329124 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-11-02 11:18
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.
msg329126 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-02 11:38
> 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 Include/pycapi/*.h are the definitions using Py_LIMITED_API and so can be stable or not stable depending on Py_LIMITED_API value :-)

To be honest, I'm not sure that I understand how "Py_LIMITED_API+0 >= 0x03050000" works and should be used.

I understand that you would prefer to leave PyObject_Calloc() in Include/objimpl.h. Honestly, I have no strong opinion on that. We can leave it there if you prefer.

--

Maybe the rule "move everything using Py_LIMITED_API to pycapi" is misleading.

My intent is that API in Include/*.h should not leak implementation details. It should be the starting point to design a new C API which does not leak any implementation detail:
http://pythoncapi.readthedocs.io/

It's easier with an example:


#define _PyObject_GC_TRACK(o) do { \
    PyGC_Head *g = _Py_AS_GC(o); \
    if (g->_gc_next != 0) { \
        Py_FatalError("GC object already tracked"); \
    } \
    assert((g->_gc_prev & _PyGC_PREV_MASK_COLLECTING) == 0); \
    ...

This macro is private: it starts with "_Py", so it doesn't belong to Include/*.h. Moreover, it access private fields like PyGC_Head._gc_prev.

From my point of view, the ideal API would not access *any* structure field and PyGC_Header structure must not be used nor part of the C API.

--

After saying that, I looked again at my PR, and I still see private functions in objimpl.h. Example:

PyAPI_FUNC(PyObject *) _PyObject_New(PyTypeObject *);
PyAPI_FUNC(PyVarObject *) _PyObject_NewVar(PyTypeObject *, Py_ssize_t);

#define PyObject_New(type, typeobj) \
                ( (type *) _PyObject_New(typeobj) )
#define PyObject_NewVar(type, typeobj, n) \
                ( (type *) _PyObject_NewVar((typeobj), (n)) )

These functions are not excluded from Py_LIMITED_API. Since they are private, we are free to remove them whenever we want, so IMHO it's fine to exclude from Py_LIMITED_API right now if we want.

Another example:

static inline PyObject*
PyObject_INIT(PyObject *op, PyTypeObject *typeobj)
{
    assert(op != NULL);
    Py_TYPE(op) = typeobj;
    _Py_NewReference(op);
    return op;
}

It's a public function but it calls the private function _Py_NewReference(). So _Py_NewReference() must be part of Py_LIMITED_API somehow...

In release mode (if Py_TRACE_REFS is not defined), _Py_NewReference() is defined like that:

/* Without Py_TRACE_REFS, there's little enough to do that we expand code
   inline. */
static inline void _Py_NewReference(PyObject *op)
{
    if (_Py_tracemalloc_config.tracing) {
        _PyTraceMalloc_NewReference(op);
    }
    _Py_INC_TPALLOCS(op);
    _Py_INC_REFTOTAL;
    Py_REFCNT(op) = 1;
}

It does access to the private _Py_tracemalloc_config variable and private macros/functions _Py_INC_TPALLOCS(op) and _Py_INC_REFTOTAL.

We *can* always define _Py_NewReference() as a function call if Py_LIMITED_API is defined, but it would have an impact on performance.

Right now, I don't want to risk to introduce a performance slowdown.

I have a "Proof-of-concept" implementation of my proposed "new C API":
https://github.com/pythoncapi/cpython/

My implementation currently uses 3 defines:

* Py_NEWCAPI_NO_MACRO: replace macros with function calls PyTuple_GET_SIZE() becomes PyTuple_Size()
* Py_NEWCAPI_NO_STRUCT: must not use PyObject.ob_refcnt or any other field of Python object structures; structures should hide their fields: compilation error.
* Py_NEWCAPI: new C API without borrowed references, without macro, without struct

But this project is highly experimental and I don't want to make it upstream before we measured properly the impact on the performance, the API has been properly reviewed and discussed, and the overall project has been approved by core developers. For example, by writing a PEP :-)

--

In short, I'm not sure of what can or should be done right now for Include/pycapi/ :-)

I wrote the PR to open the discussion :-)
msg329290 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2018-11-05 11:44
> To be honest, I'm not sure that I understand how "Py_LIMITED_API+0 >= 0x03050000" 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 get the original stable ABI as defined in Python 3.2.

If they don't care about versions prior to 3.6, they can instead declare "#define PY_LIMITED_API 0x03060000", and get access to the functions added to the stable ABI in 3.3, 3.4, 3.5, and 3.6.

For this PR though, I think it's OK to ignore that detail, as once all the internal APIs are in "Include/internal", and all the APIs that don't offer ABI stability guarantees are in "Include/TBD" (see note below), then the general rule to follow is that everything added to the headers directly in "Include/" needs a Py_LIMITED_API guard that matches the upcoming release.


Note: I wrote "TBD" rather than "pycapi" above, as "pycapi" sounds like the name of a preferred public API to me, rather than "code compiled against this API is not portable to later versions, and may not be portable to other implementations". Given the name of the macro, "Include/unlimited/*.h" may make sense, especially if those header files are all written to error out at compile time if PY_LIMITED_API is defined. "Include/unstable_abi/*.h" would be another self-describing name.
msg329292 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2018-11-05 11:53
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 ABI in *some* version should remain where they are (i.e. in "Include/*.h")

In your initial PR, the only API that subtle distinction affects is PyObject_Calloc (since that's a new addition to the stable ABI in 3.5+), and moving that back to the public header means you can add the desired "Py_LIMITED_API is not defined" check to the header in the new directory.
msg330161 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-20 22:46
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 search paths for headers (gcc -I Include/unstable/). unstable/objimpl.h must not be included directly: it fails with a compiler error.
msg330162 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-20 22:53
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 is exposed or not to the stable ABI just by looking at Include.*.h.

It should also become easier to spot in a review when a pull request something to the stable ABI, whereas it should be added to the unstable or internal API.
msg330165 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-20 23:55
Just to avoid the risk of name conflict, would it make sense to rename "unstable" to "pyunstable" or something else with "py" inside? I'm not sure if #include "unstable/objimpl.h" first looks the same directory than the header file that does the include?

Note: I tested "make install" and I get a /opt/py38/include/python3.8dm/unstable/ directory which contains a single file (yet): objimpl.h.
msg330246 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2018-11-22 11:35
I think the rules for C includes are that `"path/header.h"` looks next to the current file first, whereas `<path/header.h>` looks only in include directories.

However, given your technique of mostly hiding the new directory name from API consumers, what do you think of calling the new directory "cpython" rather than "unstable"?

The idea there would be that the "unstable ABI" eventually become known as "the CPython C API" (since it exposes a lot of CPython implementation details", while the limited API could become known as "the portable cross-implementation Python C API".

(I know, I know, you were aiming to avoid further bikeshedding on the name, but "cpython" would namespace things nicely even if a compiler does something weird with header file lookups, and helps make it clearer to CPython contributors that we still need to care about public API stability in that directory, we just don't need to care about cross-implementation portability)
msg330261 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-22 14:25
> I think the rules for C includes are that `"path/header.h"` looks next to the current file first, whereas `<path/header.h>` looks only in include directories.

Oh ok, thanks.


> However, given your technique of mostly hiding the new directory name from API consumers, what do you think of calling the new directory "cpython" rather than "unstable"?

I'm not comfortable with "CPython" name. For me, everything the "CPython C API" is the concatenation of all files in Include/ but also in subdirectories. Right now, it's unclear what is the "Python" API ("portable" API, without implemenetation details) vs the "CPython API" (implementation details).

"unstable" comes from the PEP 384: "Defining a Stable ABI". IMHO what is not in the "Stable ABI" is the "Unstable ABI". By extension, APIs excluded by Py_LIMITED_API make the "unstable API".

From my point of view, "CPython API" would be more internal/ + unstable/ APIs.


> The idea there would be that the "unstable ABI" eventually become known as "the CPython C API" (since it exposes a lot of CPython implementation details", while the limited API could become known as "the portable cross-implementation Python C API".

Everybody seems to be confused by what is the "Python C API"... I see even more confusion if we have a "CPython C API". Do you see? "CPython" vs "Python", "Python C" vs "CPython"...

IMHO "unstable" is more explicit :-) It means: "don't touch this" :-D
msg330276 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2018-11-22 19:05
The "unstable" name bugs me as it suggests we might change it without notice which isn't true at all. It's more a limited versus broad API. So maybe rename the directory "broad"?
msg330282 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-22 21:49
Brett:
> The "unstable" name bugs me as it suggests we might change it without notice which isn't true at all. It's more a limited versus broad API. So maybe rename the directory "broad"?

Brett: Nick proposed "Include\cpython", do you prefer this name?
msg330283 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-22 21:53
Another proposal: Include\impl\ as in "implementation details".
msg330285 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-22 22:22
I created a poll on discuss.python.org for the name of the new subdirectory :-)
https://discuss.python.org/t/poll-what-is-your-favorite-name-for-the-new-include-subdirectory/477
msg330296 - (view) Author: Jeremy Kloth (jkloth) * Date: 2018-11-23 03:04
As a heavy user of the non-limited Python C API, I would like to offer my suggestions for consideration.  (I'm not allowed to post in discourse)

First off, to me, 'unstable' comes off quite negative, i.e. risky or erratic.  Brett's suggestion of 'broad' is, well, seemingly too "broad" :)

In no particular order, some ideas:

- 'extended' or 'extra'; as opposed to limited (from the macro)

- 'volatile'; synonym for 'unstable' but with the benefit of being a C concept.  I like this one as the APIs covered by this include would have access to the "volatile" object details.  Things like borrowed references, direct array access or even the structure fields of the objects themselves.

- 'crunchy'; Monty Python reference, "If we took the bones out, it wouldn't be crunchy, would it?"
  https://en.wikipedia.org/wiki/Crunchy_Frog
msg330324 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-23 13:39
Jeremy Kloth:
> First off, to me, 'unstable' comes off quite negative, i.e. risky or erratic.

Ok, the 3rd people who dislike my "unstable" name, so it sounds really bad :-)

Jeremy Kloth: 
> 'volatile'; synonym for 'unstable' but with the benefit of being a C concept.

I don't think that it's true that the "#ifndef Py_LIMITED_API" is unstable or volatile. Most of this API didn't change much in the last 10 years. So sorry, "unstable" was really a bad name.

Brett Cannon:
> It's more a limited versus broad API. So maybe rename the directory "broad"?

Jeremy Kloth: 
> - 'extended' or 'extra'; as opposed to limited (from the macro)

The name by itself doesn't explain why an API should be in Include/ or Include/<name>/. What is extra or not?


Jeremy Kloth: 
> - 'crunchy'; Monty Python reference, "If we took the bones out, it wouldn't be crunchy, would it?"   https://en.wikipedia.org/wiki/Crunchy_Frog

Sorry, I dislike humor in an API. An API has to make sense :-(


--

Ok, after I read all proposition, I now prefer "cpython".

Extract of my updated PR which gives the rationale:

   Include/.h should be the "portable Python API", whereas
   Include/cpython/.h should be the "CPython API": CPython
   implementation details.

It now makes sense to me what should go to Include/ and what should go to Include/cpython/.

Obviously, Include/cpython/ is incomplete. It's only the public flavor of the "CPython API". There is also the private CPython internal API in Include/internal/.
msg330331 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-23 15:28
Nick Coghlan, Steve Dower and Paul Moore and me prefer "cpython" name, so let's go with that one!
msg330336 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-23 16:00
New changeset e421106b9e4d780c083113e4180d58d68acc69ab by Victor Stinner in branch 'master':
bpo-35134: Create Include/cpython/ subdirectory (GH-10624)
https://github.com/python/cpython/commit/e421106b9e4d780c083113e4180d58d68acc69ab
msg330337 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-23 16:47
Number lines containing Py_LIMITED_API in Include/ dir:

13:pyerrors.h
12:abstract.h
11:pylifecycle.h
11:dictobject.h
10:pystate.h
8:longobject.h
7:modsupport.h
7:ceval.h
7:bytesobject.h
6:pythonrun.h
5:warnings.h
5:tupleobject.h
5:methodobject.h
5:complexobject.h
...
msg330446 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-26 16:09
New changeset 6eb996685e25c09499858bee4be258776e603c6f by Victor Stinner in branch 'master':
bpo-35134: Create Include/cpython/object.h (GH-10679)
https://github.com/python/cpython/commit/6eb996685e25c09499858bee4be258776e603c6f
msg330447 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-26 16:29
New changeset 75e4699b31d1d88abad097ad13466c5c07711324 by Victor Stinner in branch 'master':
bpo-35134: Create Include/cpython/unicodeobject.h (GH-10680)
https://github.com/python/cpython/commit/75e4699b31d1d88abad097ad13466c5c07711324
msg330463 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-26 21:11
New changeset 5a8c240b1d97de0bd6ced2a57cbcf26da19c1fcc by Victor Stinner in branch 'master':
bpo-35134: Add Include/cpython/pyerrors.h (GH-10727)
https://github.com/python/cpython/commit/5a8c240b1d97de0bd6ced2a57cbcf26da19c1fcc
msg330467 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-26 21:42
New changeset 4060283fcec7bb2bde4eb3c42b0a6ec99cf1d391 by Victor Stinner in branch 'master':
bpo-35134: Create Include/cpython/abstract.h (GH-10728)
https://github.com/python/cpython/commit/4060283fcec7bb2bde4eb3c42b0a6ec99cf1d391
msg330477 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-26 23:12
New changeset dd12aa0aea733820807ec4f99e4e476064a0ee41 by Victor Stinner in branch 'master':
bpo-35134: Create Include/cpython/pylifecycle.h (GH-10731)
https://github.com/python/cpython/commit/dd12aa0aea733820807ec4f99e4e476064a0ee41
msg330478 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-26 23:12
New changeset ffedd9ad2a8be4bf82a4d8f2bac3eaee5b44191e by Victor Stinner in branch 'master':
bpo-35134: Create Include/cpython/dictobject.h (GH-10732)
https://github.com/python/cpython/commit/ffedd9ad2a8be4bf82a4d8f2bac3eaee5b44191e
msg330480 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-26 23:20
New changeset f2a9d5c8378cd7eca90b3b197e2cc0989da55014 by Victor Stinner in branch 'master':
bpo-35134: Create Include/cpython/pystate.h (GH-10733)
https://github.com/python/cpython/commit/f2a9d5c8378cd7eca90b3b197e2cc0989da55014
msg330512 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-27 11:42
New changeset 480833808e918a1dcebbbcfd07d5a8de3c5c2a66 by Victor Stinner in branch 'master':
bpo-35134: Update "make tags": add Include/cpython/ (GH-10739)
https://github.com/python/cpython/commit/480833808e918a1dcebbbcfd07d5a8de3c5c2a66
msg330556 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-27 21:18
Oh cpython/pystate.h introduced this warning, when building Python with clang in release mode:

In file included from Parser/node.c:3:
In file included from ./Include/Python.h:107:
In file included from ./Include/traceback.h:8:
In file included from ./Include/pystate.h:123:
./Include/cpython/pystate.h:217:3: warning: redefinition of typedef 'PyThreadState' is a C11 feature [-Wtypedef-redefinition]
} PyThreadState;
  ^
./Include/pystate.h:27:20: note: previous definition is here
typedef struct _ts PyThreadState;
                   ^
msg330557 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-27 22:55
New changeset 9bdd2de84c1af55fbc006d3f892313623bd0195c by Victor Stinner in branch 'master':
bpo-35134: Don't define types twice in header files (GH-10754)
https://github.com/python/cpython/commit/9bdd2de84c1af55fbc006d3f892313623bd0195c
msg330594 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-28 12:01
New changeset 54ba556c6c7d8fd5504dc142c2e773890c55a774 by Victor Stinner in branch 'master':
bpo-35134: Create Include/cpython/tupleobject.h (GH-10764)
https://github.com/python/cpython/commit/54ba556c6c7d8fd5504dc142c2e773890c55a774
msg340283 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-04-15 15:00
New changeset 9820c07e4146e18bddc9ac1586cee7e542903de0 by Victor Stinner in branch 'master':
bpo-35134: Add Include/cpython/pymem.h (GH-12840)
https://github.com/python/cpython/commit/9820c07e4146e18bddc9ac1586cee7e542903de0
msg340285 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-04-15 15:29
New changeset aba7d662abbb847f9f45c6db58242a9b4bf65bff by Victor Stinner in branch 'master':
bpo-35134: Add cpython/pymem.h to build system (GH-12842)
https://github.com/python/cpython/commit/aba7d662abbb847f9f45c6db58242a9b4bf65bff
msg342876 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-05-19 22:15
New changeset ed48866c55b8e4ee14faa8b5ad97819e8e74c98b by Victor Stinner in branch 'master':
bpo-35134: Split traceback.h header (GH-13430)
https://github.com/python/cpython/commit/ed48866c55b8e4ee14faa8b5ad97819e8e74c98b
msg342881 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-05-20 00:22
New changeset fd1e0e93b15af018184476ea0b3af0eabef37d89 by Victor Stinner in branch 'master':
bpo-35134: Register new traceback.h header files (GH-13431)
https://github.com/python/cpython/commit/fd1e0e93b15af018184476ea0b3af0eabef37d89
msg346014 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-06-18 22:48
New changeset 01b63ecac66581f80ba953d9182751e591c2b2ba by Victor Stinner in branch 'master':
bpo-35134: Add Include/cpython/import.h header file (GH-14213)
https://github.com/python/cpython/commit/01b63ecac66581f80ba953d9182751e591c2b2ba
msg360338 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2020-01-20 22:21
New changeset 1e420f849d0c094098543d2c27d35eaec69b2784 by Nick Coghlan in branch 'master':
bpo-35134: Migrate frameobject.h contents to cpython/frameobject.h (GH-18052)
https://github.com/python/cpython/commit/1e420f849d0c094098543d2c27d35eaec69b2784
msg361542 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-02-07 08:20
New changeset bec4186c67345f1e6cd3f8a531bc228f14d7ed7b by Victor Stinner in branch 'master':
bpo-35134: Create Include/cpython/listobject.h (GH-18395)
https://github.com/python/cpython/commit/bec4186c67345f1e6cd3f8a531bc228f14d7ed7b
msg361922 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-02-12 22:54
New changeset 98921aeaf5879b51e2dd1870c9285cfa8d1a52c7 by Victor Stinner in branch 'master':
bpo-35134: Add Include/cpython/bytesobject.h file (GH-18494)
https://github.com/python/cpython/commit/98921aeaf5879b51e2dd1870c9285cfa8d1a52c7
msg361923 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-02-12 22:55
New changeset 8c3aee65ed3aff3668da330ccd6f9ba7b2aa4567 by Victor Stinner in branch 'master':
bpo-35134: Add Include/cpython/fileutils.h header file (GH-18493)
https://github.com/python/cpython/commit/8c3aee65ed3aff3668da330ccd6f9ba7b2aa4567
msg367536 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-04-28 15:07
New changeset b8f704d2190125a7750b50cd9b67267b9c20fd43 by Victor Stinner in branch 'master':
bpo-40421: Add Include/cpython/code.h header file (GH-19756)
https://github.com/python/cpython/commit/b8f704d2190125a7750b50cd9b67267b9c20fd43
msg382771 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-12-08 22:51
New changeset fe6e5e7cfd68eeaa69fd1511f354a1b4d8d90990 by Victor Stinner in branch 'master':
bpo-35134: Add Include/cpython/pythonrun.h file (GH-23701)
https://github.com/python/cpython/commit/fe6e5e7cfd68eeaa69fd1511f354a1b4d8d90990
msg383970 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-12-29 09:58
Victor, could you please add README files in directories cpython and internals? It is not clear what headers are considered more private.
msg387105 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-02-16 12:05
New changeset 17dbd4078b68db8954df6b5cdc40b786bc4ad7af by Nicholas Sim in branch 'master':
bpo-35134, Include: Move pytime.h to cpython/pytime.h (GH-23988)
https://github.com/python/cpython/commit/17dbd4078b68db8954df6b5cdc40b786bc4ad7af
msg387179 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-02-17 18:30
New changeset 366dc3a1354078e38808b9c16276e97cca5b8aaf by Nicholas Sim in branch 'master':
bpo-35134: Move Include/{pyarena.h,pyctype.h} to Include/cpython/ (GH-24550)
https://github.com/python/cpython/commit/366dc3a1354078e38808b9c16276e97cca5b8aaf
msg387327 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-02-19 14:55
New changeset 4a6bf276ed3e6687394afe26b0d9a061ac06fc6b by Nicholas Sim in branch 'master':
bpo-35134: Move non-limited C API files to Include/cpython/ (GH-24561)
https://github.com/python/cpython/commit/4a6bf276ed3e6687394afe26b0d9a061ac06fc6b
msg389285 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-03-22 08:32
New changeset 56f031ec5281723b7c617edfa5748f2ae6a4c347 by Hai Shi in branch 'master':
bpo-35134: Add include/cpython/compile.h (GH-24922)
https://github.com/python/cpython/commit/56f031ec5281723b7c617edfa5748f2ae6a4c347
msg394491 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-05-26 22:46
Include/README.rst and https://devguide.python.org/c-api/ now define guideliens for header files and the 3 APIs. I consider that this issue is now fixed. Even if there are still non-limited API declared in Include/*.h, changing that can be done in follow-up issues.
msg403952 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2021-10-14 21:23
Thanks, Victor!
msg403955 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-10-14 21:41
New changeset 0a883a76cda8205023c52211968bcf87bd47fd6e by Victor Stinner in branch 'main':
bpo-35134: Add Include/cpython/floatobject.h (GH-28957)
https://github.com/python/cpython/commit/0a883a76cda8205023c52211968bcf87bd47fd6e
msg403957 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-10-14 22:17
I reopen the issue since there is new activity on it :-)
msg403964 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-10-14 23:52
commit 37b1d607bf0f1a9c1e89b1715349efc24dc180e0 (upstream/main, main)
Author: Victor Stinner <vstinner@python.org>
Date:   Fri Oct 15 01:50:28 2021 +0200

    po-35134: Move Include/funcobject.h to Include/cpython/ (GH-28958)
    
    Remove redundant "#ifndef Py_LIMITED_API" in funcobject.h.
msg403967 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-10-15 00:40
New changeset 77b24ba505744532d7cfd721b1c92d205e145180 by Victor Stinner in branch 'main':
bpo-35134: Move Include/cellobject.h to Include/cpython/ (GH-28964)
https://github.com/python/cpython/commit/77b24ba505744532d7cfd721b1c92d205e145180
msg403983 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-10-15 07:46
New changeset 8e5de40f90476249e9a2e5ef135143b5c6a0b512 by Victor Stinner in branch 'main':
bpo-35134: Move classobject.h to Include/cpython/ (GH-28968)
https://github.com/python/cpython/commit/8e5de40f90476249e9a2e5ef135143b5c6a0b512
msg404248 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-10-18 23:32
New changeset aad88d33d9db0a93e480f0234292b948890dfc2a by Victor Stinner in branch 'main':
bpo-35134: Split warnings.h and weakrefobject.h (GH-29042)
https://github.com/python/cpython/commit/aad88d33d9db0a93e480f0234292b948890dfc2a
msg404252 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-10-19 00:05
New changeset 5f09bb021a2862ba89c3ecb53e7e6e95a9e07e1d by Victor Stinner in branch 'main':
bpo-35134: Add Include/cpython/longobject.h (GH-29044)
https://github.com/python/cpython/commit/5f09bb021a2862ba89c3ecb53e7e6e95a9e07e1d
msg411772 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2022-01-26 16:32
New changeset d4a85f104bf9d2e368f25c9a567eaaa2cc39a96a by Victor Stinner in branch 'main':
bpo-35134: Add Include/cpython/descrobject.h (GH-30923)
https://github.com/python/cpython/commit/d4a85f104bf9d2e368f25c9a567eaaa2cc39a96a
msg416906 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2022-04-06 23:05
New changeset ca219f6dfc57f8f4984f96df0f733b7de92fe91c by Victor Stinner in branch 'main':
bpo-35134: Add Include/cpython/complexobject.h header (GH-32383)
https://github.com/python/cpython/commit/ca219f6dfc57f8f4984f96df0f733b7de92fe91c
msg416910 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2022-04-06 23:26
New changeset 5c4d1f6e0e192653560ae2941a6677fbf4fbd1f2 by Victor Stinner in branch 'main':
bpo-35134: Add Include/cpython/setobject.h header (GH-32384)
https://github.com/python/cpython/commit/5c4d1f6e0e192653560ae2941a6677fbf4fbd1f2
msg416912 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2022-04-07 00:29
New changeset 85addfb9c6496eb3d26082348cf5aca848c877ef by Victor Stinner in branch 'main':
bpo-35134: Remove the Include/code.h header file (GH-32385)
https://github.com/python/cpython/commit/85addfb9c6496eb3d26082348cf5aca848c877ef
History
Date User Action Args
2022-04-11 14:59:07adminsetgithub: 79315
2022-04-07 00:29:55vstinnersetmessages: + msg416912
2022-04-06 23:26:28vstinnersetmessages: + msg416910
2022-04-06 23:05:35vstinnersetmessages: + msg416906
2022-04-06 22:58:30vstinnersetpull_requests: + pull_request30423
2022-04-06 22:46:26vstinnersetpull_requests: + pull_request30422
2022-04-06 22:38:31vstinnersetpull_requests: + pull_request30421
2022-01-30 23:33:02vstinnersetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2022-01-26 16:32:56vstinnersetmessages: + msg411772
2022-01-26 16:02:45vstinnersetpull_requests: + pull_request29102
2021-10-19 00:05:03vstinnersetmessages: + msg404252
2021-10-18 23:39:27vstinnersetpull_requests: + pull_request27315
2021-10-18 23:32:05vstinnersetmessages: + msg404248
2021-10-18 22:38:23vstinnersetpull_requests: + pull_request27313
2021-10-15 07:46:37vstinnersetmessages: + msg403983
2021-10-15 07:20:27vstinnersetpull_requests: + pull_request27256
2021-10-15 00:40:09vstinnersetmessages: + msg403967
2021-10-14 23:54:06vstinnersetstage: resolved -> patch review
pull_requests: + pull_request27253
2021-10-14 23:52:56vstinnersetmessages: + msg403964
2021-10-14 22:17:32vstinnersetpull_requests: - pull_request23644
2021-10-14 22:17:13vstinnersetstatus: closed -> open
resolution: fixed -> (no value)
messages: + msg403957
2021-10-14 22:16:52vstinnersetpull_requests: + pull_request27247
2021-10-14 21:41:14vstinnersetmessages: + msg403955
2021-10-14 21:23:15eric.snowsetmessages: + msg403952
2021-10-14 21:10:33vstinnersetpull_requests: + pull_request27246
2021-05-26 22:46:00vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg394491

stage: patch review -> resolved
2021-03-22 08:32:21vstinnersetmessages: + msg389285
2021-03-18 17:43:33shihai1991setnosy: + shihai1991
pull_requests: + pull_request23686
2021-03-15 21:02:50erlendaaslandsetnosy: + erlendaasland
pull_requests: + pull_request23644
2021-03-06 05:42:14nw0setpull_requests: + pull_request23538
2021-02-19 14:55:53vstinnersetmessages: + msg387327
2021-02-18 10:55:10nw0setpull_requests: + pull_request23342
2021-02-17 18:30:57vstinnersetmessages: + msg387179
2021-02-16 14:13:53nw0setpull_requests: + pull_request23333
2021-02-16 12:05:06vstinnersetmessages: + msg387105
2020-12-29 09:58:47serhiy.storchakasetmessages: + msg383970
2020-12-29 09:53:18nw0setnosy: + nw0
pull_requests: + pull_request22830
2020-12-08 22:51:57vstinnersetmessages: + msg382771
2020-12-08 17:13:14vstinnersetpull_requests: + pull_request22568
2020-04-28 15:07:16vstinnersetmessages: + msg367536
2020-04-28 14:45:35vstinnersetpull_requests: + pull_request19078
2020-02-12 22:55:13vstinnersetmessages: + msg361923
2020-02-12 22:54:34vstinnersetmessages: + msg361922
2020-02-12 22:25:52vstinnersetpull_requests: + pull_request17867
2020-02-12 22:08:48vstinnersetpull_requests: + pull_request17866
2020-02-12 20:33:22vstinnersetpull_requests: + pull_request17863
2020-02-07 08:20:25vstinnersetmessages: + msg361542
2020-02-07 07:53:02vstinnersetpull_requests: + pull_request17771
2020-01-20 22:21:39ncoghlansetmessages: + msg360338
2020-01-20 22:19:51ncoghlansetpull_requests: + pull_request17475
2019-06-18 22:48:13vstinnersetmessages: + msg346014
2019-06-18 22:27:53vstinnersetpull_requests: + pull_request14051
2019-05-20 00:22:35vstinnersetmessages: + msg342881
2019-05-19 22:24:17vstinnersetpull_requests: + pull_request13341
2019-05-19 22:15:00vstinnersetmessages: + msg342876
2019-05-19 21:55:11vstinnersetpull_requests: + pull_request13340
2019-04-15 15:29:36vstinnersetmessages: + msg340285
2019-04-15 15:03:17vstinnersetpull_requests: + pull_request12767
2019-04-15 15:00:22vstinnersetmessages: + msg340283
2019-04-15 14:37:05vstinnersetpull_requests: + pull_request12765
2019-02-01 19:05:00eric.snowsetnosy: + eric.snow
2018-11-28 12:01:37vstinnersetmessages: + msg330594
2018-11-28 11:47:47vstinnersetpull_requests: + pull_request10012
2018-11-27 22:55:03vstinnersetmessages: + msg330557
2018-11-27 22:28:04vstinnersetpull_requests: + pull_request10002
2018-11-27 21:18:31vstinnersetmessages: + msg330556
2018-11-27 11:42:28vstinnersetmessages: + msg330512
2018-11-27 11:20:36vstinnersetpull_requests: + pull_request9986
2018-11-26 23:20:03vstinnersetmessages: + msg330480
2018-11-26 23:12:29vstinnersetmessages: + msg330478
2018-11-26 23:12:10vstinnersetmessages: + msg330477
2018-11-26 22:59:57vstinnersetpull_requests: + pull_request9981
2018-11-26 22:43:12vstinnersetpull_requests: + pull_request9980
2018-11-26 22:24:28vstinnersetpull_requests: + pull_request9979
2018-11-26 21:42:09vstinnersetmessages: + msg330467
2018-11-26 21:11:27vstinnersetmessages: + msg330463
2018-11-26 21:09:04vstinnersetpull_requests: + pull_request9976
2018-11-26 20:50:55vstinnersetpull_requests: + pull_request9975
2018-11-26 16:29:41vstinnersetmessages: + msg330447
2018-11-26 16:09:19vstinnersetmessages: + msg330446
2018-11-23 16:47:07vstinnersetmessages: + msg330337
2018-11-23 16:43:46vstinnersetpull_requests: + pull_request9935
2018-11-23 16:17:57vstinnersetpull_requests: + pull_request9934
2018-11-23 16:00:04vstinnersetmessages: + msg330336
2018-11-23 15:28:47vstinnersetmessages: + msg330331
2018-11-23 13:44:16vstinnersettitle: Add a new Include/unstable/ subdirectory for the "unstable" API -> Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details
2018-11-23 13:39:42vstinnersetmessages: + msg330324
2018-11-23 03:04:29jklothsetnosy: + jkloth
messages: + msg330296
2018-11-22 22:22:08vstinnersetmessages: + msg330285
2018-11-22 21:53:48vstinnersetmessages: + msg330283
2018-11-22 21:49:30vstinnersetmessages: + msg330282
2018-11-22 19:05:47brett.cannonsetnosy: + brett.cannon
messages: + msg330276
2018-11-22 14:25:13vstinnersetmessages: + msg330261
2018-11-22 11:35:50ncoghlansetmessages: + msg330246
2018-11-20 23:55:32vstinnersetmessages: + msg330165
2018-11-20 22:54:57vstinnersettitle: Move !Py_LIMITED_API to Include/pycapi/ -> Add a new Include/unstable/ subdirectory for the "unstable" API
2018-11-20 22:53:57vstinnersetmessages: + msg330162
2018-11-20 22:46:28vstinnersetmessages: + msg330161
2018-11-20 22:37:48vstinnersetpull_requests: + pull_request9872
2018-11-05 11:53:31ncoghlansetmessages: + msg329292
2018-11-05 11:44:46ncoghlansetmessages: + msg329290
2018-11-05 11:29:01ncoghlansetnosy: + ncoghlan
2018-11-02 11:38:21vstinnersetmessages: + msg329126
2018-11-02 11:18:38serhiy.storchakasetmessages: + msg329124
2018-11-02 10:55:53vstinnersetmessages: + msg329123
2018-11-01 21:06:46serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg329087
2018-11-01 13:05:59vstinnersettitle: Move Py_LIMITED_API to Include/pycapi/ -> Move !Py_LIMITED_API to Include/pycapi/
2018-11-01 13:04:52vstinnersetkeywords: + patch
stage: patch review
pull_requests: + pull_request9596
2018-11-01 12:46:49vstinnercreate