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

BLD: drop support for CPython 3.9 and numpy<1.23 following SPEC 0 #185

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
with:
output-dir: dist
env:
CIBW_BUILD: cp39-* cp310-* cp311-* cp312-*
CIBW_BUILD: cp310-* cp311-* cp312-*
CIBW_ARCHS_LINUX: x86_64
CIBW_ARCHS_MACOS: x86_64 arm64
CIBW_ARCHS_WINDOWS: AMD64
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
os:
- ubuntu-latest
python-version:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
Expand All @@ -53,7 +52,7 @@ jobs:

# test with minimal requirements
- os: ubuntu-20.04
python-version: '3.9'
python-version: '3.10'
pip-args: --constraint constraints/minimal_dependencies.txt

runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -177,7 +176,7 @@ jobs:
strategy:
matrix:
python-version:
- '3.9'
- '3.10'
- '3.12'
runs-on: ubuntu-latest
name: type check
Expand Down
2 changes: 1 addition & 1 deletion constraints/minimal_dependencies.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
numpy==1.21 --only-binary numpy
numpy==1.23 --only-binary numpy
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ classifiers = [
"Programming Language :: Cython",
"Programming Language :: Python :: 3",
]
requires-python = ">=3.9"
requires-python = ">=3.10"
dependencies = [
# keep in sync with NPY_TARGET_VERSION (setup.py)
# https://github.com/scipy/oldest-supported-numpy/issues/76#issuecomment-1628865694
"numpy>=1.21",
"numpy>=1.23",
"typing-extensions>=4.0.0 ; python_version < '3.11'",
]

Expand Down Expand Up @@ -105,7 +105,7 @@ convention = "numpy"
"_backports.py" = ["D"]

[tool.mypy]
python_version = "3.9"
python_version = "3.10"
show_error_codes = true
pretty = true
warn_return_any = true
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def make_ext(path: str) -> Extension:
include_dirs=[numpy.get_include()],
define_macros=[
# keep in sync with runtime requirements (pyproject.toml)
("NPY_TARGET_VERSION", "NPY_1_21_API_VERSION"),
("NPY_TARGET_VERSION", "NPY_1_23_API_VERSION"),
("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION"),
],
)
Expand Down
3 changes: 2 additions & 1 deletion src/gpgi/_boundaries.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from __future__ import annotations

import warnings
from typing import TYPE_CHECKING, Any, Callable, Literal, cast
from collections.abc import Callable
from typing import TYPE_CHECKING, Any, Literal, cast

if TYPE_CHECKING:
from ._typing import RealArray
Expand Down
4 changes: 2 additions & 2 deletions src/gpgi/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def _validate_geometry(self) -> None:
) # pragma: no cover

axes = known_axes[self.geometry][: len(self.axes)]
for i, (expected, actual) in enumerate(zip(axes, self.axes)):
for i, (expected, actual) in enumerate(zip(axes, self.axes, strict=True)):
if actual != expected:
raise ValueError(
f"Got invalid axis name {actual!r} on position {i}, "
Expand Down Expand Up @@ -826,7 +826,7 @@ def _apply_boundary_conditions(
# as a way to *expose* ordering.
iax = axes.index(ax)
bcs = tuple(self.boundary_recipes[key] for key in bv)
for side, bc in zip(("left", "right"), bcs):
for side, bc in zip(("left", "right"), bcs, strict=True):
side = cast(Literal["left", "right"], side)
active_index: int = 1 if side == "left" else -2
same_side_active_layer_idx = [slice(None)] * self.grid.ndim
Expand Down
Loading