Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-35134: Move non-limited C API files to Include/cpython/ #24561

Merged
merged 3 commits into from
Feb 19, 2021

Conversation

nw0
Copy link
Contributor

@nw0 nw0 commented Feb 18, 2021

Move
Include/{odictobject.h,parser_interface.h,picklebufobject.h,pydebug.h,pyfpe.h}
into Include/cpython/.

In the same vein as previous commits by @vstinner.

https://bugs.python.org/issue35134

Move
Include/{odictobject.h,parser_interface.h,picklebufobject.h,pydebug.h,pyfpe.h}
into Include/cpython/.
@@ -0,0 +1,3 @@
Move odictobject.h, parser_interface.h, picklebufobject.h, pydebug.h, and
pyfpe.h into the cpython/ directory. They must not be included directly, as
they are already included by Python.h: :ref:`Include Files <api-includes>`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum. If we move more header files, the risk of breaking 3rd C extensions is higher. I'm still supportive of this change, but please document it also at C API > Porting to Python 3.10:
https://docs.python.org/dev/whatsnew/3.10.html#id2

In What's New in Python 3.10, document also the other header files that you already moved.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. I assume the main concern is if they have been included directly? I've worded my note with that in mind, but let me know if I should add anything else.

I've taken a quick look at the remaining files: there are still more than 10 header files that could be moved into cpython/ wholesale, and about the same number which require some surgery. Would you support making these changes (hopefully to close bpo-35134 entirely) within 3.10?

Parser/peg_api.c Outdated
@@ -1,4 +1,4 @@
#include "parser_interface.h"
#include "cpython/parser_interface.h"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we include Python.h here instead?

@vstinner vstinner merged commit 4a6bf27 into python:master Feb 19, 2021
@vstinner
Copy link
Member

Merged, thanks.

adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
…-24561)

Include/{odictobject.h,parser_interface.h,picklebufobject.h,pydebug.h,pyfpe.h}
into Include/cpython/.

Parser: peg_api: include Python.h instead of parser_interface.h.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants