Skip to content
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

pypy: support 7.3.8 #2217

Merged
merged 1 commit into from Mar 9, 2022
Merged

pypy: support 7.3.8 #2217

merged 1 commit into from Mar 9, 2022

Conversation

davidhewitt
Copy link
Member

According to https://foss.heptapod.net/pypy/pypy/-/issues/3688#note_181074 the official PyPy line will be that PyPy 3.7 versions older than 7.3.8 should be treated as bugged.

Hence here I'm updating definitions to support 7.3.8 and add a warning if a user tries to import a PyO3 module with an older PyPy version.

  /Users/david/tools/pypy3.7-v7.3.8-osx64/lib-python/3/importlib/_bootstrap.py:228: UserWarning: PyPy 3.7
versions older than 7.3.8 are known to have binary compatibility issues which may cause segfaults. Please
upgrade.

@davidhewitt
Copy link
Member Author

cc @mattip

@@ -71,6 +71,21 @@ impl ModuleDef {
panic_result_into_callback_output(
py,
std::panic::catch_unwind(move || -> PyResult<_> {
#[cfg(all(PyPy, not(Py_3_8)))]
{
const PYPY_GOOD_VERSION: [u8; 3] = [7, 3, 9];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I don't understand?

Suggested change
const PYPY_GOOD_VERSION: [u8; 3] = [7, 3, 9];
const PYPY_GOOD_VERSION: [u8; 3] = [7, 3, 8];

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha good catch, I set it higher when manually testing 😅

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mattip
Copy link
Contributor

mattip commented Mar 8, 2022

/Users/david/tools/pypy3.7-v7.3.8-osx64/lib-python/3/importlib/_bootstrap.py:228: UserWarning:

Shouldn't v7.3.8 be clean, and the warning only emitted for v7.3.7 and under?

@davidhewitt davidhewitt force-pushed the pypy-7.3.8 branch 2 times, most recently from 88ad9f4 to 5f61d8e Compare March 8, 2022 21:08
@davidhewitt
Copy link
Member Author

Shouldn't v7.3.8 be clean, and the warning only emitted for v7.3.7 and under?

Yes, I was running 7.3.8 locally so fiddled with versions to verify the warning. Force-pushed a corrected implementation which should now only warn on 7.3.7 and older ;)

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.

None yet

2 participants