gh-129296: Fix pyatomic.h include paths#129320
Conversation
|
I'm unsure if this is worth backporting to 3.13 |
|
I will tentatively label this as "needs backport to 3.13", but will wait for feedback from @Yhg1s. |
This comment was marked as off-topic.
This comment was marked as off-topic.
|
Would you mind to update also |
|
Thanks for updating Include/cpython/pythread.h. I enabled automerge. |
|
I don't think that it's worth it to backport this change to 3.12 and 3.13. It's nice to have in the main branch, but it doesn't fix a build error, since it's not needed to backport it. |
|
I've actually been seeing this error when running It's fairly annoying to have to either:
I would really appreciate if there was either a good workaround, or this was back ported to 3.12 and 3.13. |
Use relative includes in Include/cpython/pyatomic.h for pyatomic_gcc.h, pyatomic_std.h and pyatomic_msc.h. Do a similar change in Include/cpython/pythread.h for pthread_stubs.h include. (cherry picked from commit 3a974e3) Co-authored-by: Zanie Blue <contact@zanie.dev>
|
GH-130667 is a backport of this pull request to the 3.13 branch. |
|
Sorry, @zanieb and @vstinner, I could not cleanly backport this to |
|
GH-130668 is a backport of this pull request to the 3.12 branch. |
Ah. When #129296 was reported, it wasn't clear if it was a compiler error. If you're unable to build Python, I'm ok to backport the changes to 3.12 and 3.13. Note that Python 3.12 only needs the pythread.h change (pyatomic.h doesn't exist in Python 3.12). |
gh-129296: Fix `pyatomic.h` include paths (GH-129320) Use relative includes in Include/cpython/pyatomic.h for pyatomic_gcc.h, pyatomic_std.h and pyatomic_msc.h. Do a similar change in Include/cpython/pythread.h for pthread_stubs.h include. (cherry picked from commit 3a974e3) Co-authored-by: Zanie Blue <contact@zanie.dev>
As reported in the issue, these paths are relative to the base include directory instead of the header file. While this is fine in practice because the compiler falls back to the base include directory, it doesn't match the style of other includes in the project.
Originally added in