Skip to content

[3.8] bpo-37191: Avoid declaration-after-statement in header included from Python.h #13887

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

Merged
merged 1 commit into from
Jun 7, 2019

Conversation

encukou
Copy link
Member

@encukou encukou commented Jun 7, 2019

When compiled with GCC's -Werror=declaration-after-statement ("intermingled declarations" in PEP7), cpython/abstract.h (included from <Python.h>) errors on vectorcall helper functions added in 3.8.0 Beta 1.

It's well within our rights to ignore this: since 3.6 we require intermingled declarations.
But, when re-compiling Fedora we've seen several projects fail with this warning (so far: pygobject3, python-dbus, xen; more will likely come).

@ambv: Dear Release Manager, should we patch 3.8 to avoid this? The patch is simple, and it would give projects that we(re) dutifully tested with the Alphas one more release to adapt.

I don't think it's worth changing for 3.9 (but if we do we should test it).

https://bugs.python.org/issue37191

@jdemeyer
Copy link
Contributor

jdemeyer commented Jun 7, 2019

I don't think it's worth changing for 3.9 (but if we do we should test it).

To use an argument that you like to use yourself: fixing this both on 3.8 and 3.9 would be better for backportability. It's not unlikely that bugfixes are going to be made to the vectorcall functionality.

@vstinner
Copy link
Member

vstinner commented Jun 7, 2019

I'm working on a different approach: https://bugs.python.org/issue37194

@vstinner
Copy link
Member

vstinner commented Jun 7, 2019

My https://bugs.python.org/issue37194 idea was based on assumptions which were false. This change is really tiny and fix a very practical issue. We can argue forever about the C standard, but I don't think that it's worth it :-)

To use an argument that you like to use yourself: fixing this both on 3.8 and 3.9 would be better for backportability. It's not unlikely that bugfixes are going to be made to the vectorcall functionality.

I'm in favor of also applying this change to Python 3.9. But it's up to you @encukou ;-)

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.

5 participants