From 0179f19a9096b58252c0b0ae182217a4f6c4324d Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Fri, 2 Jun 2023 15:10:19 -0700 Subject: [PATCH 1/5] CI: Bump builds to 3.11, update numpy nightly wheels location --- .circleci/config.yml | 2 +- .github/workflows/unit-tests.yml | 10 +++++----- ..._compat.yaml => actions-311-downstream_compat.yaml} | 2 +- ...ons-310-numpydev.yaml => actions-311-numpydev.yaml} | 4 ++-- .../{circle-39-arm64.yaml => circle-311-arm64.yaml} | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) rename ci/deps/{actions-39-downstream_compat.yaml => actions-311-downstream_compat.yaml} (98%) rename ci/deps/{actions-310-numpydev.yaml => actions-311-numpydev.yaml} (84%) rename ci/deps/{circle-39-arm64.yaml => circle-311-arm64.yaml} (98%) diff --git a/.circleci/config.yml b/.circleci/config.yml index 999bba1f9f77f..aeb4b42f6d263 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ jobs: image: ubuntu-2004:2022.04.1 resource_class: arm.large environment: - ENV_FILE: ci/deps/circle-39-arm64.yaml + ENV_FILE: ci/deps/circle-311-arm64.yaml PYTEST_WORKERS: auto PATTERN: "not single_cpu and not slow and not network and not clipboard and not arm_slow and not db" PYTEST_TARGET: "pandas" diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index bec07c077ad59..9ebe147008451 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -31,14 +31,14 @@ jobs: pattern: [""] include: - name: "Downstream Compat" - env_file: actions-39-downstream_compat.yaml + env_file: actions-311-downstream_compat.yaml pattern: "not slow and not network and not single_cpu" pytest_target: "pandas/tests/test_downstream.py" - name: "Minimum Versions" env_file: actions-39-minimum_versions.yaml pattern: "not slow and not network and not single_cpu" - name: "Locale: it_IT" - env_file: actions-310.yaml + env_file: actions-311.yaml pattern: "not slow and not network and not single_cpu" extra_apt: "language-pack-it" # Use the utf8 version as the default, it has no bad side-effect. @@ -48,7 +48,7 @@ jobs: # It will be temporarily activated during tests with locale.setlocale extra_loc: "it_IT" - name: "Locale: zh_CN" - env_file: actions-310.yaml + env_file: actions-311.yaml pattern: "not slow and not network and not single_cpu" extra_apt: "language-pack-zh-hans" # Use the utf8 version as the default, it has no bad side-effect. @@ -58,7 +58,7 @@ jobs: # It will be temporarily activated during tests with locale.setlocale extra_loc: "zh_CN" - name: "Copy-on-Write" - env_file: actions-310.yaml + env_file: actions-311.yaml pattern: "not slow and not network and not single_cpu" pandas_copy_on_write: "1" - name: "Pypy" @@ -66,7 +66,7 @@ jobs: pattern: "not slow and not network and not single_cpu" test_args: "--max-worker-restart 0" - name: "Numpy Dev" - env_file: actions-310-numpydev.yaml + env_file: actions-311-numpydev.yaml pattern: "not slow and not network and not single_cpu" test_args: "-W error::DeprecationWarning -W error::FutureWarning" # TODO(cython3): Re-enable once next-beta(after beta 1) comes out diff --git a/ci/deps/actions-39-downstream_compat.yaml b/ci/deps/actions-311-downstream_compat.yaml similarity index 98% rename from ci/deps/actions-39-downstream_compat.yaml rename to ci/deps/actions-311-downstream_compat.yaml index a036849cf01ba..2115ee8f7d86a 100644 --- a/ci/deps/actions-39-downstream_compat.yaml +++ b/ci/deps/actions-311-downstream_compat.yaml @@ -3,7 +3,7 @@ name: pandas-dev channels: - conda-forge dependencies: - - python=3.9 + - python=3.11 # build dependencies - versioneer[toml] diff --git a/ci/deps/actions-310-numpydev.yaml b/ci/deps/actions-311-numpydev.yaml similarity index 84% rename from ci/deps/actions-310-numpydev.yaml rename to ci/deps/actions-311-numpydev.yaml index 4556b4567f2e0..5379c2fddec21 100644 --- a/ci/deps/actions-310-numpydev.yaml +++ b/ci/deps/actions-311-numpydev.yaml @@ -2,7 +2,7 @@ name: pandas-dev channels: - conda-forge dependencies: - - python=3.10 + - python=3.11 # build dependencies - versioneer[toml] @@ -26,7 +26,7 @@ dependencies: - pip: - "cython" - - "--extra-index-url https://pypi.anaconda.org/scipy-wheels-nightly/simple" + - "--extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" - "--pre" - "numpy" - "scipy" diff --git a/ci/deps/circle-39-arm64.yaml b/ci/deps/circle-311-arm64.yaml similarity index 98% rename from ci/deps/circle-39-arm64.yaml rename to ci/deps/circle-311-arm64.yaml index 37e01d2d0b2f9..0aa2ef556300d 100644 --- a/ci/deps/circle-39-arm64.yaml +++ b/ci/deps/circle-311-arm64.yaml @@ -2,7 +2,7 @@ name: pandas-dev channels: - conda-forge dependencies: - - python=3.9 + - python=3.11 # build dependencies - versioneer[toml] From 104faa6bc339693483943c5194058c2117e65092 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Fri, 2 Jun 2023 15:20:38 -0700 Subject: [PATCH 2/5] Move arm to 3.10 instead --- .circleci/config.yml | 2 +- ci/deps/{circle-311-arm64.yaml => circle-310-arm64.yaml} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename ci/deps/{circle-311-arm64.yaml => circle-310-arm64.yaml} (98%) diff --git a/.circleci/config.yml b/.circleci/config.yml index aeb4b42f6d263..dfaade1d69c75 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ jobs: image: ubuntu-2004:2022.04.1 resource_class: arm.large environment: - ENV_FILE: ci/deps/circle-311-arm64.yaml + ENV_FILE: ci/deps/circle-310-arm64.yaml PYTEST_WORKERS: auto PATTERN: "not single_cpu and not slow and not network and not clipboard and not arm_slow and not db" PYTEST_TARGET: "pandas" diff --git a/ci/deps/circle-311-arm64.yaml b/ci/deps/circle-310-arm64.yaml similarity index 98% rename from ci/deps/circle-311-arm64.yaml rename to ci/deps/circle-310-arm64.yaml index 0aa2ef556300d..1813dbe3a1df5 100644 --- a/ci/deps/circle-311-arm64.yaml +++ b/ci/deps/circle-310-arm64.yaml @@ -2,7 +2,7 @@ name: pandas-dev channels: - conda-forge dependencies: - - python=3.11 + - python=3.10 # build dependencies - versioneer[toml] From 8eb1d9ee7435d91c7dd3149009d81e6f116fd81a Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Fri, 2 Jun 2023 16:59:55 -0700 Subject: [PATCH 3/5] Change scipy window api --- pandas/core/window/rolling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/window/rolling.py b/pandas/core/window/rolling.py index 86b4e399fa461..1bab1b5866a71 100644 --- a/pandas/core/window/rolling.py +++ b/pandas/core/window/rolling.py @@ -1140,7 +1140,7 @@ def _validate(self): if not isinstance(self.win_type, str): raise ValueError(f"Invalid win_type {self.win_type}") signal = import_optional_dependency( - "scipy.signal", extra="Scipy is required to generate window weight." + "scipy.signal.window", extra="Scipy is required to generate window weight." ) self._scipy_weight_generator = getattr(signal, self.win_type, None) if self._scipy_weight_generator is None: From 5b9062126cf190f21553d31516ca4f444898ba8b Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Mon, 5 Jun 2023 11:35:03 -0700 Subject: [PATCH 4/5] plural --- pandas/core/window/rolling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/window/rolling.py b/pandas/core/window/rolling.py index 1bab1b5866a71..7220b44c7af9d 100644 --- a/pandas/core/window/rolling.py +++ b/pandas/core/window/rolling.py @@ -1140,7 +1140,7 @@ def _validate(self): if not isinstance(self.win_type, str): raise ValueError(f"Invalid win_type {self.win_type}") signal = import_optional_dependency( - "scipy.signal.window", extra="Scipy is required to generate window weight." + "scipy.signal.windows", extra="Scipy is required to generate window weight." ) self._scipy_weight_generator = getattr(signal, self.win_type, None) if self._scipy_weight_generator is None: From f9db7c9b7be4568343bca11061b233d9a20d9219 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Mon, 5 Jun 2023 14:52:21 -0700 Subject: [PATCH 5/5] Use stable sort? --- pandas/core/sorting.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/sorting.py b/pandas/core/sorting.py index b63f3f28b8f6c..0c0b312c11c48 100644 --- a/pandas/core/sorting.py +++ b/pandas/core/sorting.py @@ -424,7 +424,7 @@ def lexsort_indexer( def nargsort( items: ArrayLike | Index | Series, - kind: SortKind = "quicksort", + kind: SortKind = "stable", ascending: bool = True, na_position: str = "last", key: Callable | None = None,