question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Astropy on pypy ?

See original GitHub issue

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:

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:open
  • Created 5 years ago
  • Reactions:2
  • Comments:13 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
astrofrogcommented, Jan 29, 2022

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

0reactions
stonebigcommented, Jan 29, 2022

@cgohlke published a wheel for PyPy 3.7 at https://www.lfd.uci.edu/~gohlke/pythonlibs/#astropy , so it seems doable.

Read more comments on GitHub >

github_iconTop Results From Across the Web

astropy - PyPI
The Astropy Project (http://astropy.org/) is a community effort to develop a single core package for Astronomy in Python and foster interoperability between ...
Read more >
Installation — Astropy v5.2
To build and install astropy (from the root of the source tree):. pip install . If you install in this way and you...
Read more >
PyPy - packages
PyPy is a fast, compliant alternative implementation of the Python language. Nearly all Python packages install properly on PyPy.
Read more >
Support Py_RETURN_NOTIMPLEMENTED (#3043) · Issues · PyPy ...
Created originally on Bitbucket by deil (Christoph Deil) Hi, I'd like to try Astropy on PyPy. (related ticket from...
Read more >
Astropy: Astronomy and Astrophysics Core Library - Morioh
The Astropy Project is a community effort to develop a single core package ... It is also known to run on PyPy 3...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found