bpo-38326: Use Python API version as config version#16496
Closed
ncoghlan wants to merge 2 commits intopython:masterfrom
Closed
bpo-38326: Use Python API version as config version#16496ncoghlan wants to merge 2 commits intopython:masterfrom
ncoghlan wants to merge 2 commits intopython:masterfrom
Conversation
This allows the config APIs to detect attempts to embed all potentially ABI incompatible runtime versions, rather than only being able to detect incompatibilities in the size of the PyPreConfig and PyConfig structures.
zooba
reviewed
Sep 30, 2019
ncoghlan
commented
Sep 30, 2019
ncoghlan
commented
Sep 30, 2019
pitrou
reviewed
Sep 30, 2019
| /* Version of the CPython header files used to compile the embedding | ||
| application. Expected to be set to PY_VERSION_HEX. | ||
| Field is used to check for API and ABI compatibility. */ | ||
| uint32_t header_version; |
Member
There was a problem hiding this comment.
Why uint32_t? Your PEP changes say size_t.
Contributor
Author
There was a problem hiding this comment.
Typo on the PEP PR side (I renamed struct_size without fixing the type).
Member
|
I proposed PR #16500 to remove struct_size. |
Contributor
Author
|
Closing in favour of #16500 Edit to save a click: #16500 reverts the struct_size change entirely for now. It does mean version mismatches may segfault rather than produce a nice error message, but there are other less intrusive ways for us to help with that (e.g. provide a public variant of the ABI compatibility checking function in this PR) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This allows the config APIs to detect attempts to embed
all potentially ABI incompatible runtime versions, rather
than only being able to detect incompatibilities in the
size of the PyPreConfig and PyConfig structures.
https://bugs.python.org/issue38326