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

Fix C++17 error: standard attributes in middle of decl-specifiers (CYTHON_UNUSED) #5791

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

hroncok
Copy link
Contributor

@hroncok hroncok commented Nov 1, 2023

This is only relevant on Python 3.13+

Fixes #5790

Still testing this.

…THON_UNUSED)

This is only relevant on Python 3.13+

Fixes cython#5790
@hroncok
Copy link
Contributor Author

hroncok commented Nov 1, 2023

I belive there should be a test for this, so it won't regress. However, I don't currently have the capacity to add it.

@hroncok hroncok marked this pull request as ready for review November 2, 2023 02:30
@scoder scoder added this to the 3.0.6 milestone Nov 2, 2023
@scoder
Copy link
Contributor

scoder commented Nov 2, 2023

I belive there should be a test for this

We could probably make sure that it gets triggered by one of the C++ tests. But it's a bugfix either way. Let's merge it.

@scoder scoder merged commit bc32b7e into cython:master Nov 2, 2023
83 checks passed
@scoder
Copy link
Contributor

scoder commented Nov 2, 2023

Thanks

gnossen pushed a commit to grpc/grpc that referenced this pull request Nov 2, 2023
Since Python 3.7, it’s called by
[`Py_Initialize`](https://docs.python.org/3/c-api/init.html#c.Py_Initialize)
and doesn’t need to be called manually, so this removal has no effect.

Since Python 3.9, it does nothing, and in [Python
3.13](https://docs.python.org/3.13/whatsnew/3.13.html), it [will be
removed](python/cpython#105182), which makes
this change necessary.

References:

https://docs.python.org/3/c-api/init.html#c.PyEval_InitThreads

python/cpython#105182

----

Together with the changes discussed in
#33918 and with a [Cython
fix](cython/cython#5791) to be released in
3.0.5, this allowed us to build and test our `grpc` package with Python
3.13.0a1 and Cython 3.0.4.


<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
rinarakaki pushed a commit to rinarakaki/cython that referenced this pull request Nov 3, 2023
@hroncok hroncok deleted the issue5790 branch November 6, 2023 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Python 3.13 C++17: error: standard attributes in middle of decl-specifiers (CYTHON_UNUSED)
2 participants