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
Astropy on pypy ? #7768
Comments
The many EMFILE errors are very likely due to too strong reliance on reference counting, as described here: http://pypy.org/compat.html (see everything after "The main difference that is not going to be fixed is that PyPy does not support refcounting semantics.") |
Are the fixture errors related to #7769? More generally, it would be good to try to separate this out into different modules, so we can try to attach this incrementally; it would be nice for astropy to work with pypy! |
Yes. And there's other cases where fixtures are called, e.g. in Then the errors because Astropy doesn't use with statements to reliably close files in several places should be fixed. And only then does it make sense to try this again I think and look at the remaining errors from pypy. Unfortunately I don't have time to contribute to Astropy at the moment and send PRs. |
At the moment
I've opened a feature request with PyPy: https://bitbucket.org/pypy/pypy/issues/3043/support-py_return_notimplemented |
Current status of Astropy with PyPI:
Test log (apparently too long for a gist, truncated): https://gist.github.com/cdeil/8d6f5aa6e13baa2f5b634b50cafc0205 I looked through the test fails a bit, there's tons of repeats of the same issue, and many fails that would be easy to fix (slightly different exceptions or warnings behaviour on PyPy, tests that specifically test the CPython response), probably overall only 2-3 real core issues that need to be resolved. The most obvious one is that PyPy doesn't have @mhvk or @taldcroft as @saimn as |
The |
@cdeil - I am a bit concerned about supporting Pypy. I'm not sure how much of an additional development and maintenance burden it will be, but we are already way understaffed for CPython support. So it is a little bit of perspective, i.e. if support for PyPy is considered a bonus or it becomes a requirement for passing CI. I don't see any obvious way to rewrite |
@taldcroft - Agreed. I'll close this issue for now. If others want to come back to this and work on PyPy support in the future, feel free to re-open, or open a new issue. |
My sense would that this particular table test can just be skipped on pypy. |
Looking at this, there are actually very few unique failures. Most tests are failing because |
It would make sense to keep this open, in case someone else with time to spare wants to have a look... So, reopening. |
@cgohlke published a wheel for PyPy 3.7 at https://www.lfd.uci.edu/~gohlke/pythonlibs/#astropy , so it seems doable. |
The wheel building machinery we use can build pypy wheels (I think) so we could just try and enable it and see how far we get |
Recently the Python 3, Numpy and C extension support in pypy has apparently improved a lot.
E.g. in https://mail.python.org/pipermail/scipy-dev/2018-August/022999.html it mentions that scipy now works.
So I ran tests from the latest stable Astropy 3.0.4 with pypy.
It doesn't work yet, there's many fails:
Actually 3 MB of error log output, see here. :-)
I only skimmed it a bit, it seems to be a mix of issues with the use of esoteric Python features, and lots of fails in the Astropy C extensions (e.g.
astropy.io.fits
and the ascii C reader / writer inastropy.io.ascii
).There's also many unrelated fails, e.g. the improper use of fixtures in Astropy, resulting in many of those:
Also , I noticed that pytest doesn't exit, but hangs at the end. Not sure why, or if it's related to this error printed at the start:
So clearly Astropy on pypy needs work, probably both in pypy and in Astropy. I have no idea how much in each, whether it's a day or months.
@arigo from pypy - If you have time, maybe you could have a look at the error log and see if there's some things that are helpful for you to improve CPython compatibility in pypy?
The text was updated successfully, but these errors were encountered: