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

Experimental support for PyPy 3.6 #1092

Merged
merged 1 commit into from
Aug 8, 2020
Merged

Conversation

davidhewitt
Copy link
Member

I added Windows and MacOS actions builds for PyPy. This caused quite a bit of pain; eventually I did manage to get things building.

Issues became apparent on pypy initially when I tried to use it for PyO3/setuptools-rust#78

@davidhewitt davidhewitt force-pushed the pypy36 branch 4 times, most recently from 4f57ee3 to d6bf8ef Compare August 7, 2020 17:15
Copy link
Member

@kngwyu kngwyu left a comment

Choose a reason for hiding this comment

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

Thank you!
It looks like you forgot to remove ci/actions/test.sh?

src/types/num.rs Show resolved Hide resolved
.github/workflows/test.yml Outdated Show resolved Hide resolved
Co-authored-by: Yuji Kanagawa <yuji.kngw.80s.revive@gmail.com>
@davidhewitt
Copy link
Member Author

It looks like you forgot to remove ci/actions/test.sh?

Good catch, removed now. I mistakenly thought it was used in the Makefile for some reason.

@davidhewitt davidhewitt merged commit 801d955 into PyO3:master Aug 8, 2020
pub static mut PyExc_EnvironmentError: *mut PyObject;
#[cfg(not(all(windows, PyPy)))]
pub static mut PyExc_IOError: *mut PyObject;
Copy link
Member

Choose a reason for hiding this comment

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

Since IOError is just a alias of OSError on Python 3, I think we can expose PyExc_IOError as PyPyExc_OSError?

Use case: https://github.com/milesgranger/pyrus-cramjam/runs/2227542030?check_suite_focus=true

Installing collected packages: cramjam
Successfully installed cramjam-2.2.0
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: /opt/hostedtoolcache/PyPy/3.6.12/x64/site-packages/cramjam.pypy36-pp73-x86_64-linux-gnu.so: undefined symbol: PyExc_IOError

milesgranger/cramjam@f60849c#diff-76866598ce8fd16261a27ac58a84b2825e6e77fc37c163a6afa60f0f4477e569R343

Copy link
Member

Choose a reason for hiding this comment

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

Hmm, but does it seem that PyPy takes a different strategy for that error?
https://foss.heptapod.net/pypy/pypy/-/blob/branch/default/pypy/module/exceptions/moduledef.py#L21

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure, but it seems to be the same on the Python side on my local PyPy installation.

Python 3.7.10 (7035471788c8, Mar 19 2021, 02:02:14)
[PyPy 7.3.5-alpha0 with GCC Apple LLVM 12.0.0 (clang-1200.0.32.29)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``finally, mercurial migration is
happening!''
>>>> IOError
<class 'OSError'>
>>>> OSError
<class 'OSError'>
>>>> IOError is OSError
True

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Ah, I got it, thanks.

@davidhewitt davidhewitt deleted the pypy36 branch December 24, 2021 02:05
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

3 participants