Skip to content
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

ENH: Replace oldest-supported-numpy with numpy 1.25.x since they guarantee ABI/API compatibility since 1.19.x #54748

Closed
1 of 3 tasks
matejsp opened this issue Aug 25, 2023 · 4 comments
Labels
Enhancement Needs Triage Issue that has not been reviewed by a pandas team member

Comments

@matejsp
Copy link

matejsp commented Aug 25, 2023

Feature Type

  • Adding new functionality to pandas

  • Changing existing functionality in pandas

  • Removing existing functionality in pandas

Problem Description

With 1.25 numpy it is not possible to build against latest numpy and retain compatibility from 1.19 forward: https://numpy.org/doc/stable/dev/depending_on_numpy.html

It is getting hard to build old numpy on latest MacOSX:
scipy/oldest-supported-numpy#77
numpy/numpy#17987
pypa/wheel#385

Feature Description

Use latest version of numpy for all platforms since pandas and numpy now have minimum python of 3.9.

Alternative Solutions

Alternative solution is to continue the battle with building unsupported versions of numpy.

Additional Context

No response

@matejsp matejsp added Enhancement Needs Triage Issue that has not been reviewed by a pandas team member labels Aug 25, 2023
@matejsp matejsp changed the title ENH: Replace oldest-supported-numpy with numpy ENH: Replace oldest-supported-numpy with numpy 1.25.x since they guarantee ABI/API compatibility since 1.19.x Aug 25, 2023
@phofl
Copy link
Member

phofl commented Aug 25, 2023

I don't really know what you expect for us. We are already building against 1.25 IIRC, but we are following NEP29 in our NumPy support schedule as a runtime dependency, so we won't drop support for older versions

@phofl phofl closed this as completed Aug 25, 2023
@matejsp
Copy link
Author

matejsp commented Aug 25, 2023

I thought about changing https://github.com/pandas-dev/pandas/blob/main/pyproject.toml:

Just for build system: [build-system]

    # Note: numpy 1.25 has a backwards compatible C API by default
    # we don't want to force users to compile with 1.25 though
    # (Ideally, in the future, though, oldest-supported-numpy can be dropped when our min numpy is 1.25.x)
    "oldest-supported-numpy>=2022.8.16; python_version<'3.12'",
    "numpy>=1.22.4; python_version>='3.12'",

to:

    # Note: numpy 1.25 has a backwards compatible C API by default
    # we don't want to force users to compile with 1.25 though
    # (Ideally, in the future, though, oldest-supported-numpy can be dropped when our min numpy is 1.25.x)
    "oldest-supported-numpy>=2022.8.16; python_version<'3.9'",
    "numpy>=1.25.0,<2; python_version>='3.9'",  # 1.25 is compatible numpy from 1.19 ...

So only 3.8 and less uses oldest supported numpy.

@phofl
Copy link
Member

phofl commented Aug 25, 2023

There is a comment that illustrates why this isn't done. What is the problem with using 1.25.x in your use case?

@matejsp
Copy link
Author

matejsp commented Aug 25, 2023

My problem is that when I want to build pandas (with pip wheel) it takes the oldest-supported-numpy in build-system and it forces me to use and build 1.17.3 for python 3.9 and the build fails on MacOSX because of too old wheel package in requirements of very old numpy ...

But I see :D you don't want to force user to compile it with 1.25.x (but then you force to compile on unsupported numpy).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Needs Triage Issue that has not been reviewed by a pandas team member
Projects
None yet
Development

No branches or pull requests

2 participants