Skip to content

Conversation

@colesbury
Copy link
Contributor

Avoids conflicts due to names without "Py" prefixes.

Avoids conflicts due to names without "Py" prefixes.
@colesbury
Copy link
Contributor Author

This is the first of two issues that I ran into when pulling the latest pythoncapi_compat.h into PyTorch. We ran into name conflicts in downstream packages that had name conflicts because they pulled in both PyTorch headers and things like Thrift.

@vstinner
Copy link
Member

vstinner commented Nov 8, 2025

Avoids conflicts due to names without "Py" prefixes.

@encukou: Aha, it seems like it's time for PEP 743 – Add Py_OMIT_LEGACY_API to the Python C API :-D I hope that that PEP will be accepted.

@vstinner vstinner merged commit 11cb80f into python:main Nov 8, 2025
36 checks passed
@vstinner
Copy link
Member

vstinner commented Nov 8, 2025

Merged, thanks. I like your change, it's a nice way to avoid <structmember.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.

2 participants