Skip to content

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

Closed

Description

@lschoe

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?

Activity

  1. rgommers commented on Mar 27, 2024

    @rgommers
    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.

  2. mattip commented on Mar 27, 2024

    @mattip
    Member

    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.

  3. lschoe commented on Mar 28, 2024

    @lschoe
    Author

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions