Skip to content

Commit

Permalink
chore: drop py3.8-3.9, add py3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli committed Mar 9, 2025
1 parent 530a4b7 commit eb94dc2
Show file tree
Hide file tree
Showing 9 changed files with 2,714 additions and 2,374 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: '3.10'
cache: 'pip'
cache-dependency-path: pyproject.toml

Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: '3.10'

- name: Install Python dependencies
run: |
Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: '3.10'

- name: Install Python dependencies
run: |
Expand Down
3 changes: 1 addition & 2 deletions autotest/test_mf6_existing_meson.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import sys
from pathlib import Path
from platform import system
from typing import List

import pytest
from modflow_devtools.misc import set_dir
Expand All @@ -15,7 +14,7 @@


@pytest.fixture(scope="module")
def targets() -> List[Path]:
def targets() -> list[Path]:
target = TARGET_NAME
ext, shared_ext = get_binary_suffixes()
executables = [target, "zbud6", "mf5to6", "libmf6"]
Expand Down
5,056 changes: 2,699 additions & 2,357 deletions pixi.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pytest-cov = "*"
pytest-dotenv = "*"
pytest-order = "*"
pytest-xdist = "*"
python = "3.9.*"
python = "3.10.*"
requests = "*"
ruff = "*"

Expand Down
2 changes: 1 addition & 1 deletion pymake/utils/_compiler_language_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def _get_fortran_files(srcfiles, extensions=False):
list of fortran files or unique fortran file extensions
"""
if isinstance(srcfiles, (str,)):
if isinstance(srcfiles, str):
srcfiles = [srcfiles]
files_out = []
for srcfile in srcfiles:
Expand Down
2 changes: 1 addition & 1 deletion pymake/utils/_file_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def _get_extra_exclude_files(external_file):
if external_file is None:
files = None
else:
if isinstance(external_file, (list, tuple)):
if isinstance(external_file, list | tuple):
files = external_file
elif os.path.isfile(external_file):
efpth = os.path.dirname(external_file)
Expand Down
6 changes: 3 additions & 3 deletions pymake/utils/_usgs_src_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ def _update_vs2dt_files(srcdir, fc, cc, arch, double):


def _update_mf6_files(
srcdir: Union[str, os.PathLike],
srcdir: str | os.PathLike,
fc: str,
cc: str,
arch: str,
Expand Down Expand Up @@ -699,7 +699,7 @@ def _update_mf6_files(


def _update_libmf6_files(
srcdir: Union[str, os.PathLike],
srcdir: str | os.PathLike,
fc: str,
cc: str,
arch: str,
Expand Down Expand Up @@ -733,7 +733,7 @@ def _update_libmf6_files(

# common source file replacement functions
def _update_mf6_external_dependencies(
srcdir: Union[str, os.PathLike],
srcdir: str | os.PathLike,
target: str = "mf6",
) -> None:
"""
Expand Down
6 changes: 3 additions & 3 deletions pymake/utils/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def compressall(
if dir_pths is None:
dir_pths = []
else:
if isinstance(dir_pths, (str, Path)):
if isinstance(dir_pths, str | Path):
dir_pths = [dir_pths]

# convert find to a list if a str (a tuple is allowed)
Expand Down Expand Up @@ -862,7 +862,7 @@ def getmfexes(
download_dir = os.path.join(".", "download_dir")
if isinstance(exes, str):
exes = tuple(exes)
elif isinstance(exes, (int, float)):
elif isinstance(exes, int | float):
msg = "exes keyword must be a string or a list/tuple of strings"
raise TypeError(msg)

Expand Down Expand Up @@ -944,7 +944,7 @@ def getmfnightly(
download_dir = os.path.join(".", "download_dir")
if isinstance(exes, str):
exes = tuple(exes)
elif isinstance(exes, (int, float)):
elif isinstance(exes, int | float):
msg = "exes keyword must be a string or a list/tuple of strings"
raise TypeError(msg)

Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@ classifiers = [
"Intended Audience :: Science/Research",
"License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Hydrology",
]
requires-python = ">=3.8"
requires-python = ">=3.10"
dependencies = [
"numpy",
"requests",
Expand Down

0 comments on commit eb94dc2

Please sign in to comment.