Support Python 3.8 in python3-sys. #187
Merged
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 time around the diff between the Python 3.7.0 and Python 3.8.0 headers was non-trivial; because several parts of the non-limited API were moved around (mostly to the new internal
Include/cpython/*.h
headers).So it's quite possible that I missed some relevant changes.
It turned out that rust-cpython mostly already works without these changes (enough that all our tests except for
check_symbols.py
pass on Python 3.8 without this PR!).PyCodeObject
is obviously broken without this PR, but it's unused inrust-cpython
.PyTypeObject
is a bit more tricky, but in the usual case we're saved because we don't set_Py_TPFLAGS_HAVE_VECTORCALL
, so an out-of-bounds read should not happen. Only in the rare case when compiling against a Python interpreter using theCOUNT_ALLOCS
mode it's important to have exactly the correctPyTypeObject
definition.