Skip to content

Pandas-stubs forces numpy <2.0.0 #9315

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
Illviljan opened this issue Aug 5, 2024 · 2 comments
Closed

Pandas-stubs forces numpy <2.0.0 #9315

Illviljan opened this issue Aug 5, 2024 · 2 comments
Labels
bug CI Continuous Integration tools needs triage Issue that has not been reviewed by xarray team member topic-typing

Comments

@Illviljan
Copy link
Contributor

Illviljan commented Aug 5, 2024

What happened?

The mypy CI breaks now due to pandas-stubs requiring numpy < 2.0.0. Seen in #9314.

It happens when mypy runs, where it also install the stubs:

Run python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report xarray/
Collecting pandas-stubs
  Downloading pandas_stubs-2.2.2.240805-py3-none-any.whl.metadata (10 kB)
Collecting types-PyYAML
  Downloading types_PyYAML-6.0.12.20240724-py3-none-any.whl.metadata (1.6 kB)
Collecting types-Pygments
  Downloading types_Pygments-2.18.0.20240506-py3-none-any.whl.metadata (1.8 kB)
Collecting types-cffi
  Downloading types_cffi-1.16.0.20240331-py3-none-any.whl.metadata (1.6 kB)
Collecting types-colorama
  Downloading types_colorama-0.4.15.20240311-py3-none-any.whl.metadata (1.6 kB)
Collecting types-psutil
  Downloading types_psutil-6.0.0.20240621-py3-none-any.whl.metadata (1.6 kB)
Collecting types-python-dateutil
  Downloading types_python_dateutil-2.9.0.20240316-py3-none-any.whl.metadata (1.8 kB)
Collecting types-pytz
  Downloading types_pytz-2024.1.0.20240417-py3-none-any.whl.metadata (1.5 kB)
Collecting types-requests
  Downloading types_requests-2.32.0.20240712-py3-none-any.whl.metadata (1.9 kB)
Collecting types-tqdm
  Downloading types_tqdm-4.66.0.20240417-py3-none-any.whl.metadata (1.5 kB)
Collecting numpy<2.0.0,>=1.23.5 (from pandas-stubs)
  Downloading numpy-1.26.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (61 kB)
Collecting types-docutils (from types-Pygments)
  Downloading types_docutils-0.21.0.20240724-py3-none-any.whl.metadata (1.9 kB)
Collecting types-setuptools (from types-Pygments)
  Downloading types_setuptools-71.1.0.20240726-py3-none-any.whl.metadata (1.8 kB)
Requirement already satisfied: urllib3>=2 in /home/runner/micromamba/envs/xarray-tests/lib/python3.11/site-packages (from types-requests) (2.2.2)
Downloading pandas_stubs-2.2.2.240805-py3-none-any.whl (157 kB)
Downloading types_PyYAML-6.0.12.20240724-py3-none-any.whl (15 kB)
Downloading types_Pygments-2.18.0.20240506-py3-none-any.whl (20 kB)
Downloading types_cffi-1.16.0.20240331-py3-none-any.whl (14 kB)
Downloading types_colorama-0.4.15.20240311-py3-none-any.whl (5.8 kB)
Downloading types_psutil-6.0.0.20240621-py3-none-any.whl (18 kB)
Downloading types_python_dateutil-2.9.0.20240316-py3-none-any.whl (9.7 kB)
Downloading types_pytz-2024.1.0.20240417-py3-none-any.whl (5.2 kB)
Downloading types_requests-2.32.0.20240712-py3-none-any.whl (15 kB)
Downloading types_tqdm-4.66.0.20240417-py3-none-any.whl (19 kB)
Downloading numpy-1.26.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.3 MB)
25l   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0/18.3 MB ? eta -:--:--
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 18.3/18.3 MB 178.7 MB/s eta 0:00:00
25hDownloading types_docutils-0.21.0.20240724-py3-none-any.whl (27 kB)
Downloading types_setuptools-71.1.0.20240726-py3-none-any.whl (64 kB)
Installing collected packages: types-tqdm, types-setuptools, types-requests, types-PyYAML, types-pytz, types-python-dateutil, types-psutil, types-docutils, types-colorama, numpy, types-Pygments, types-cffi, pandas-stubs
  Attempting uninstall: numpy
    Found existing installation: numpy 2.0.1
    Uninstalling numpy-2.0.1:
      Successfully uninstalled numpy-2.0.1
Successfully installed numpy-1.26.4 pandas-stubs-2.2.2.240805 types-PyYAML-6.0.12.20240724 types-Pygments-2.18.0.20240506 types-cffi-1.16.0.20240331 types-colorama-0.4.15.20240311 types-docutils-0.21.0.20240724 types-psutil-6.0.0.20240621 types-python-dateutil-2.9.0.20240316 types-pytz-2024.1.0.20240417 types-requests-2.32.0.20240712 types-setuptools-71.1.0.20240726 types-tqdm-4.66.0.20240417

Anything else we need to know?

pandas-dev/pandas-stubs#943
https://github.com/pandas-dev/pandas-stubs/blob/1846b34a44c41f151863fd5f9c20c4bc6a322d52/pyproject.toml#L33-L36

Environment

main

@Illviljan Illviljan added bug needs triage Issue that has not been reviewed by xarray team member CI Continuous Integration tools topic-typing labels Aug 5, 2024
@keewis
Copy link
Collaborator

keewis commented Aug 5, 2024

looks like we need python>=3.12 for pandas-stubs to check with numpy>=2.0?

@Illviljan
Copy link
Contributor Author

CI passes again now, see pandas-dev/pandas-stubs#970. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug CI Continuous Integration tools needs triage Issue that has not been reviewed by xarray team member topic-typing
Projects
None yet
Development

No branches or pull requests

2 participants