Astropy on pypy ?
See original GitHub issueRecently 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:
284 failed, 9104 passed, 747 skipped, 63 xfailed, 4298 warnings, 52 error in 364.52 seconds
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 in astropy.io.ascii
).
There’s also many unrelated fails, e.g. the improper use of fixtures in Astropy, resulting in many of those:
E _pytest.deprecated.RemovedInPytest4Warning: Fixture data called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.
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:
/Users/deil/software/anaconda3/envs/iminuit-270/site-packages/py/_error.py:66: OSError
During handling of the above exception, another exception occurred:
self = <CallInfo when='setup' exception: [Too many open files]: listdir('/private/var/folders/t_/_mywtcj146lbk2c99bnxw7z40000gp/T/pytest-of-deil/pytest-540',)>
func = <function call_runtest_hook.<locals>.<lambda> at 0x000000012196c840>, when = 'setup', treat_keyboard_interrupt_as_exception = False
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?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:13 (11 by maintainers)
Top GitHub Comments
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
@cgohlke published a wheel for PyPy 3.7 at https://www.lfd.uci.edu/~gohlke/pythonlibs/#astropy , so it seems doable.