Thanks to visit codestin.com
Credit goes to github.com

Skip to content

PyPy 3.10 support for Numpy 2.0.0rc1 or later? #26141

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

Closed
lschoe opened this issue Mar 27, 2024 · 3 comments
Closed

PyPy 3.10 support for Numpy 2.0.0rc1 or later? #26141

lschoe opened this issue Mar 27, 2024 · 3 comments

Comments

@lschoe
Copy link

lschoe commented Mar 27, 2024

Numpy 2.0.0b1 comes with pypy39 wheels but support for Python 3.9 has been (recommended to be) dropped since 2023 - Q4.

Will you have pypy310 wheels for the upcoming Numpy 2.0.0 release candidates?

@rgommers
Copy link
Member

Probably not, since it's not in the pipeline yet. @mattip may be able to say more about PyPy 3.10 support in general.

@mattip
Copy link
Member

mattip commented Mar 27, 2024

If the project does decide to release wheels, I would suggest supporting x86_64 linux and maybe macos arm64 only. Windows support is failing on the weekly binary builds against pypy and I am not sure why, maybe some subtle interactions between PyPy's NAN and the expected values.

@lschoe
Copy link
Author

lschoe commented Mar 28, 2024

Interestingly, when comparing NumPy windows-latest/pypy3.9-nightly with NumPy windows-latest/pypy3.10-nightly, these versions are (x)failing the same tests (also for the same reasons).

For pypy3.9-nightly and for pypy3.10-nightly, respectively:

= 26 failed, 47581 passed, 2690 skipped, 84 xfailed, 33 xpassed in 2235.08s (0:37:15) =
= 16 failed, 47595 passed, 2676 skipped, 94 xfailed, 33 xpassed in 2065.49s (0:34:25) =

The failures are distributed as follows:

2F in _core\tests\test_api.py
2F in _core\tests\test_casting_unittests.py
10(x)F in _core\tests\test_strings.py
12F in _core\tests\test_umath.py

Because of this, there seems to be no reason to prefer pypy3.9 over pypy3.10.

Again interestingly, when I run these four tests above on my Windows machine with PyPy3.9 nightly together with Numpy 2.0.0b1, there are no failures at all:

>python
Python 3.9.18 (4133dd3122a1, Mar 27 2024, 07:16:40)
[PyPy 7.3.16-alpha0 with MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``"Let's go." - "We can't" - "Why
not?" - "We're waiting for a Translation." - (despairingly) "Ah!"''
>>>> import numpy
>>>> numpy.__version__
'2.0.0b1'
>python -m pytest test_api.py
==================================================================== test session starts ====================================================================
platform win32 -- Python 3.9.18[pypy-7.3.16-alpha], pytest-7.4.0, pluggy-1.4.0
rootdir: C:\pypy-c-jit-183783-4133dd3122a1-win64\Lib\site-packages\numpy\_core\tests
plugins: hypothesis-6.99.13
collected 51 items

test_api.py ...................................................                                                                                        [100%]

==================================================================== 51 passed in 3.17s =====================================================================

The other three tests above also pass without failures.
I'm using Windows 10 Home 22H2 19045.4170.

Also, I've been testing my own Python package with PyPy3.9 and Numpy 2.0.0b1 without any problems (after making some minor adjustments which are also needed for cPython3.9 plus Numpy 2.0.0b1).

So, maybe there is no serious cause for the test failures on Windows, and it would be good to switch to PyPy3.10 now so that people can test Numpy2.0.0 with PyPy3.10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants