Skip to content

chore: use CPython macros to construct PYBIND11_VERSION_HEX #5683

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 10 commits into from
May 23, 2025

Conversation

XuehaiPan
Copy link
Contributor

@XuehaiPan XuehaiPan commented May 22, 2025

Description

As per title, use CPython macros to construct PYBIND11_VERSION_HEX. See also: https://github.com/python/cpython/blob/HEAD/Include/patchlevel.h

Suggested changelog entry:

  • Use CPython macros to construct PYBIND11_VERSION_HEX

📚 Documentation preview 📚: https://pybind11--5683.org.readthedocs.build/

@henryiii
Copy link
Collaborator

We also read this in dynamic metadata. I don't think this can be described with regex. We could add a custom plugin; we already have experimental=True IIRC, which is required for a custom plugin.

What we have now (two edits to one file) is still much better than before (which also required edits to another file), though following CPython more closely sounds useful.

@henryiii
Copy link
Collaborator

Oh, nevermind, I see you left PYBIND11_VERSION_PATCH as is. So it's still two edits, just closer to what CPython does.

@henryiii
Copy link
Collaborator

As long as we test somewhere that these two match (which I think we do?), I'm fine with it.

@henryiii henryiii merged commit e3883dd into pybind:master May 23, 2025
74 checks passed
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label May 23, 2025
@henryiii henryiii changed the title refactor: use CPython macros to construct PYBIND11_VERSION_HEX chore: use CPython macros to construct PYBIND11_VERSION_HEX May 27, 2025
@henryiii henryiii removed the needs changelog Possibly needs a changelog entry label May 29, 2025
@XuehaiPan XuehaiPan deleted the patchlevel-python branch May 29, 2025 18:32
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