diff --git a/.github/workflows/ci-additional.yaml b/.github/workflows/ci-additional.yaml index 790b751ee..c71fc8913 100644 --- a/.github/workflows/ci-additional.yaml +++ b/.github/workflows/ci-additional.yaml @@ -41,7 +41,7 @@ jobs: env: CONDA_ENV_FILE: ci/environment.yml - PYTHON_VERSION: "3.10" + PYTHON_VERSION: "3.11" steps: - uses: actions/checkout@v4 @@ -92,7 +92,7 @@ jobs: shell: bash -l {0} env: CONDA_ENV_FILE: ci/environment.yml - PYTHON_VERSION: "3.10" + PYTHON_VERSION: "3.11" steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 43985f508..b963d671d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,7 +25,7 @@ jobs: fail-fast: false matrix: os: ["ubuntu-latest", "windows-latest"] - python-version: ["3.8", "3.10"] + python-version: ["3.9", "3.11"] steps: - uses: actions/checkout@v4 with: diff --git a/.github/workflows/testpypi-release.yaml b/.github/workflows/testpypi-release.yaml index 858348e6d..3b5f98b17 100644 --- a/.github/workflows/testpypi-release.yaml +++ b/.github/workflows/testpypi-release.yaml @@ -24,7 +24,7 @@ jobs: - uses: actions/setup-python@v4 name: Install Python with: - python-version: "3.10" + python-version: "3.11" - name: Install dependencies run: | @@ -65,7 +65,7 @@ jobs: - uses: actions/setup-python@v4 name: Install Python with: - python-version: "3.10" + python-version: "3.11" - uses: actions/download-artifact@v3 with: name: releases diff --git a/.github/workflows/upstream-dev-ci.yaml b/.github/workflows/upstream-dev-ci.yaml index 7d87be16a..80ad81ac6 100644 --- a/.github/workflows/upstream-dev-ci.yaml +++ b/.github/workflows/upstream-dev-ci.yaml @@ -26,7 +26,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.10"] + python-version: ["3.11"] steps: - uses: actions/checkout@v4 with: diff --git a/flox/core.py b/flox/core.py index f8f700f99..98c37bc6f 100644 --- a/flox/core.py +++ b/flox/core.py @@ -7,16 +7,14 @@ import sys import warnings from collections import namedtuple +from collections.abc import Mapping, Sequence from functools import partial, reduce from numbers import Integral from typing import ( TYPE_CHECKING, Any, Callable, - Dict, Literal, - Mapping, - Sequence, Union, overload, ) @@ -74,8 +72,8 @@ T_IsBins = Union[bool | Sequence[bool]] -IntermediateDict = Dict[Union[str, Callable], Any] -FinalResultsDict = Dict[str, Union["DaskArray", np.ndarray]] +IntermediateDict = dict[Union[str, Callable], Any] +FinalResultsDict = dict[str, Union["DaskArray", np.ndarray]] FactorProps = namedtuple("FactorProps", "offset_group nan_sentinel nanmask") # This dummy axis is inserted using np.expand_dims diff --git a/flox/xarray.py b/flox/xarray.py index 487850ca0..c85ad7113 100644 --- a/flox/xarray.py +++ b/flox/xarray.py @@ -1,6 +1,7 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Hashable, Iterable, Sequence, Union +from collections.abc import Hashable, Iterable, Sequence +from typing import TYPE_CHECKING, Any, Union import numpy as np import pandas as pd diff --git a/flox/xrutils.py b/flox/xrutils.py index 958bd3976..4f80ec8c8 100644 --- a/flox/xrutils.py +++ b/flox/xrutils.py @@ -2,7 +2,8 @@ # defined in xarray import datetime -from typing import Any, Iterable +from collections.abc import Iterable +from typing import Any import numpy as np import pandas as pd diff --git a/pyproject.toml b/pyproject.toml index fb27ee761..e41fb17eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "flox" description = "GroupBy operations for dask.array" license = {file = "LICENSE"} readme = "README.md" -requires-python = ">=3.8" +requires-python = ">=3.9" keywords = ["xarray", "dask", "groupby"] classifiers = [ "Development Status :: 4 - Beta", @@ -11,7 +11,6 @@ classifiers = [ "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -60,10 +59,10 @@ write_to_template= '__version__ = "{version}"' [tool.black] line-length = 100 -target-version = ["py38"] +target-version = ["py39"] [tool.ruff] -target-version = "py38" +target-version = "py39" builtins = ["ellipsis"] exclude = [ ".eggs",