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

Add support for numpy 2.x #470

Open
aalexandersson opened this issue Oct 24, 2024 · 1 comment
Open

Add support for numpy 2.x #470

aalexandersson opened this issue Oct 24, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@aalexandersson
Copy link

aalexandersson commented Oct 24, 2024

Is your proposal related to a problem?

pseudopeople has the install requirement "numpy<2.0.0", in setup.py#L39 which does not allow numpy>=2.0.0.

Describe the solution you'd like

I suggest changing setup.py#L39 to "numpy>=2.0.0",

Describe alternatives you've considered

An alternative is to keep the current version for those users who do not need the numpy upgrade. Another alternative is to add branch logic based on the version of Python, so that only pseudopeople in Python 3.11 and later will use "numpy>=2.0.0". For comparison, Splink in pyproject.toml uses this branching logic:

python = ">=3.8.0,<4.0.0"
jsonschema = ">=3.2"
# 1.3.5 is the last version supporting py 3.7.1
pandas = ">1.3.5"
duckdb = ">=0.9.2"
sqlglot = ">=13.0.0"
altair = "^5.0.1"
Jinja2 = ">=3.0.3"

# need to manually specify numpy versions suitable for CI
# 1.24.4 works with python 3.8, but not 3.12
numpy = [
    # version is minimum valid with above listed pandas version
    {version=">=1.17.3", python = "<3.12"},
    {version=">=1.26.0", python = ">=3.12"},
]

Additional context

Splink 4.x and Pandas 2.2.2+ support numpy 2.0. pseudopeople should stop referring to Python 3.8 because Python 3.8 is unsupported and therefore a security risk, see issue 469.

@aflaxman
Copy link
Member

Thanks for flagging this @aalexandersson. We are enhancing our approach to large-scale testing right now, and using the enhanced testing approach to see if there are any pitfalls with Python 3.12 and numpy 2.x will be a great way to see if it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants