From ebbb9adb59180d36d2af012b7780a8d2101a7b8d Mon Sep 17 00:00:00 2001 From: Marco Edward Gorelli <33491632+MarcoGorelli@users.noreply.github.com> Date: Thu, 12 Jan 2023 14:36:13 +0000 Subject: [PATCH 1/3] Revert "CI: Temporarily pin numpy (#50356)" This reverts commit f31da23cac7b06cfa81b0ba27ae103af7bc9da00. --- asv_bench/asv.conf.json | 2 +- ci/deps/actions-310-numpydev.yaml | 2 +- ci/deps/actions-310.yaml | 2 +- ci/deps/actions-38-downstream_compat.yaml | 2 +- ci/deps/actions-38.yaml | 2 +- ci/deps/actions-39.yaml | 2 +- ci/deps/actions-pypy-38.yaml | 2 +- ci/deps/circle-38-arm64.yaml | 2 +- environment.yml | 2 +- requirements-dev.txt | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/asv_bench/asv.conf.json b/asv_bench/asv.conf.json index 6e548bf9d9e8a..16f8f28b66d31 100644 --- a/asv_bench/asv.conf.json +++ b/asv_bench/asv.conf.json @@ -41,7 +41,7 @@ // pip (with all the conda available packages installed first, // followed by the pip installed packages). "matrix": { - "numpy": ["1.23.5"], // https://github.com/pandas-dev/pandas/pull/50356 + "numpy": [], "Cython": ["0.29.32"], "matplotlib": [], "sqlalchemy": [], diff --git a/ci/deps/actions-310-numpydev.yaml b/ci/deps/actions-310-numpydev.yaml index 863c231b18c4f..44acae877bdf8 100644 --- a/ci/deps/actions-310-numpydev.yaml +++ b/ci/deps/actions-310-numpydev.yaml @@ -22,5 +22,5 @@ dependencies: - "cython" - "--extra-index-url https://pypi.anaconda.org/scipy-wheels-nightly/simple" - "--pre" - - "numpy<1.24" + - "numpy" - "scipy" diff --git a/ci/deps/actions-310.yaml b/ci/deps/actions-310.yaml index 79457cd503876..d957f3a516e2f 100644 --- a/ci/deps/actions-310.yaml +++ b/ci/deps/actions-310.yaml @@ -18,7 +18,7 @@ dependencies: # required dependencies - python-dateutil - - numpy<1.24 + - numpy - pytz # optional dependencies diff --git a/ci/deps/actions-38-downstream_compat.yaml b/ci/deps/actions-38-downstream_compat.yaml index 6955baa282274..37036cc3f3c89 100644 --- a/ci/deps/actions-38-downstream_compat.yaml +++ b/ci/deps/actions-38-downstream_compat.yaml @@ -19,7 +19,7 @@ dependencies: # required dependencies - python-dateutil - - numpy<1.24 + - numpy - pytz # optional dependencies diff --git a/ci/deps/actions-38.yaml b/ci/deps/actions-38.yaml index 004ef93606457..9ac0fa6c764df 100644 --- a/ci/deps/actions-38.yaml +++ b/ci/deps/actions-38.yaml @@ -18,7 +18,7 @@ dependencies: # required dependencies - python-dateutil - - numpy<1.24 + - numpy - pytz # optional dependencies diff --git a/ci/deps/actions-39.yaml b/ci/deps/actions-39.yaml index ec7ffebde964f..b91c5298d4a5d 100644 --- a/ci/deps/actions-39.yaml +++ b/ci/deps/actions-39.yaml @@ -18,7 +18,7 @@ dependencies: # required dependencies - python-dateutil - - numpy<1.24 + - numpy - pytz # optional dependencies diff --git a/ci/deps/actions-pypy-38.yaml b/ci/deps/actions-pypy-38.yaml index 054129c4198a1..17d39a4c53ac3 100644 --- a/ci/deps/actions-pypy-38.yaml +++ b/ci/deps/actions-pypy-38.yaml @@ -19,6 +19,6 @@ dependencies: - hypothesis>=5.5.3 # required - - numpy<1.24 + - numpy - python-dateutil - pytz diff --git a/ci/deps/circle-38-arm64.yaml b/ci/deps/circle-38-arm64.yaml index b4171710564bf..9af198b37d648 100644 --- a/ci/deps/circle-38-arm64.yaml +++ b/ci/deps/circle-38-arm64.yaml @@ -18,7 +18,7 @@ dependencies: # required dependencies - python-dateutil - - numpy<1.24 + - numpy - pytz # optional dependencies diff --git a/environment.yml b/environment.yml index 9e4c6db82b2ce..5be4cd89f1e86 100644 --- a/environment.yml +++ b/environment.yml @@ -20,7 +20,7 @@ dependencies: # required dependencies - python-dateutil - - numpy<1.24 + - numpy - pytz # optional dependencies diff --git a/requirements-dev.txt b/requirements-dev.txt index 1a2e39bb47786..09d32872dad0d 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -11,7 +11,7 @@ psutil pytest-asyncio>=0.17 coverage python-dateutil -numpy<1.24 +numpy pytz beautifulsoup4 blosc From afe612775e13acfe2965f3104f1ef3e693571a16 Mon Sep 17 00:00:00 2001 From: MarcoGorelli <> Date: Thu, 12 Jan 2023 14:19:44 +0000 Subject: [PATCH 2/3] maybe fixup test collection --- pandas/compat/numpy/__init__.py | 1 + pandas/util/_test_decorators.py | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/pandas/compat/numpy/__init__.py b/pandas/compat/numpy/__init__.py index 60ec74553a207..6f31358dabe86 100644 --- a/pandas/compat/numpy/__init__.py +++ b/pandas/compat/numpy/__init__.py @@ -9,6 +9,7 @@ np_version_under1p21 = _nlv < Version("1.21") np_version_under1p22 = _nlv < Version("1.22") np_version_gte1p22 = _nlv >= Version("1.22") +np_version_gte1p24 = _nlv >= Version("1.24") is_numpy_dev = _nlv.dev is not None _min_numpy_ver = "1.20.3" diff --git a/pandas/util/_test_decorators.py b/pandas/util/_test_decorators.py index 33830e96342f3..59d5d6649c2a5 100644 --- a/pandas/util/_test_decorators.py +++ b/pandas/util/_test_decorators.py @@ -95,6 +95,13 @@ def safe_import(mod_name: str, min_version: str | None = None): mod = __import__(mod_name) except ImportError: return False + except SystemError: + # TODO: numba is incompatible with numpy 1.24+. + # Once that's fixed, this block should be removed. + if mod_name == "numba": + return False + else: + raise if not min_version: return mod From aa7143d253985077dd94cd2db567b173a5648ebd Mon Sep 17 00:00:00 2001 From: Marco Edward Gorelli <33491632+MarcoGorelli@users.noreply.github.com> Date: Thu, 12 Jan 2023 18:49:03 +0000 Subject: [PATCH 3/3] remove np_version_gte1p24 --- pandas/compat/numpy/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pandas/compat/numpy/__init__.py b/pandas/compat/numpy/__init__.py index 6f31358dabe86..60ec74553a207 100644 --- a/pandas/compat/numpy/__init__.py +++ b/pandas/compat/numpy/__init__.py @@ -9,7 +9,6 @@ np_version_under1p21 = _nlv < Version("1.21") np_version_under1p22 = _nlv < Version("1.22") np_version_gte1p22 = _nlv >= Version("1.22") -np_version_gte1p24 = _nlv >= Version("1.24") is_numpy_dev = _nlv.dev is not None _min_numpy_ver = "1.20.3"