From 32c0a50a7687837bc8ada31b59c2f5e1a1c53a17 Mon Sep 17 00:00:00 2001 From: Mark Gordon Date: Thu, 30 Apr 2026 15:41:16 -0700 Subject: [PATCH] Add Python 3.13/3.14 support, drop 3.8/3.9 --- .github/workflows/test.yml | 2 +- Dockerfile | 2 +- pyproject.toml | 1 + requirements-dev.txt | 16 ++++++++-------- setup.cfg | 6 +++--- subsetter/plan_model.py | 2 +- subsetter/sampler.py | 2 +- tests/test_live.py | 3 --- 8 files changed, 16 insertions(+), 18 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 55ff605..b218f67 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/Dockerfile b/Dockerfile index 4bf8752..a373b70 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM python:3.12-alpine AS subsetter -RUN pip install -U pip tqdm +RUN pip install -U pip tqdm geoalchemy2 WORKDIR /subsetter diff --git a/pyproject.toml b/pyproject.toml index a769519..b3c2763 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,6 +31,7 @@ disable = [ "too-many-return-statements", "too-many-instance-attributes", "too-many-arguments", + "too-many-positional-arguments", "consider-using-assignment-expr", "use-dict-literal", # handled by black diff --git a/requirements-dev.txt b/requirements-dev.txt index 66bbc10..13ab093 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,13 +1,13 @@ -black~=24.3.0 -isort~=5.13.2 -mypy~=1.9.0 -pylint~=3.1.0 +black~=26.3.1 +isort~=8.0.1 +mypy~=1.20.2 +pylint~=4.0.5 types-PyYAML types-psycopg2 pylint_pydantic -pytest ~= 8.1 -pytest-cov ~= 5.0 -pytest-mysql ~= 2.5 -pytest-postgresql ~= 6.0 +pytest ~= 9.0 +pytest-cov ~= 7.0 +pytest-mysql ~= 4.0 +pytest-postgresql ~= 8.0 diff --git a/setup.cfg b/setup.cfg index e666be6..4a41b1c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -10,11 +10,11 @@ url = http://github.com/msg555/subsetter/ classifiers = Programming Language :: Python Programming Language :: Python :: 3 - 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 + Programming Language :: Python :: 3.14 License :: OSI Approved :: BSD License Operating System :: OS Independent @@ -27,7 +27,7 @@ install_requires = sqlalchemy[mypy] ~= 2.0 pydantic ~= 2.6 pyyaml ~= 6.0 - faker ~= 19.3 + faker typing-extensions [options.extras_require] diff --git a/subsetter/plan_model.py b/subsetter/plan_model.py index eaa86ff..3e61d37 100644 --- a/subsetter/plan_model.py +++ b/subsetter/plan_model.py @@ -260,7 +260,7 @@ def build(self, context: SQLBuildContext): stmt = sa.select(table_obj) if self.joins: - joined_cols: List[sa.ColumnExpression] = [] + joined_cols: List[sa.ColumnElement] = [] joined: sa.FromClause = table_obj exists_constraints: List[sa.ColumnExpressionArgument] = [] for join in self.joins: # pylint: disable=not-an-iterable diff --git a/subsetter/sampler.py b/subsetter/sampler.py index 6333ea8..0bcbb95 100644 --- a/subsetter/sampler.py +++ b/subsetter/sampler.py @@ -611,7 +611,7 @@ def output_result_set( multiplier: int = 1, column_multipliers: Optional[Set[str]] = None, ) -> None: - (src_schema, src_table_name) = (schema, table_name) + src_schema, src_table_name = (schema, table_name) schema, table_name = self._remap_table(src_schema, src_table_name) table = self.meta.tables[(schema, table_name)] diff --git a/tests/test_live.py b/tests/test_live.py index d9a73bc..1de3ec2 100644 --- a/tests/test_live.py +++ b/tests/test_live.py @@ -54,7 +54,6 @@ def db_config_sqlite(request): pytest.param( db_config_mysql, marks=[ - pytest.mark.usefixtures("mysql_proc"), pytest.mark.mysql_live, ], id="mysql", @@ -62,7 +61,6 @@ def db_config_sqlite(request): pytest.param( db_config_postgres, marks=[ - pytest.mark.usefixtures("postgresql_proc"), pytest.mark.postgres_live, ], id="postgres", @@ -70,7 +68,6 @@ def db_config_sqlite(request): pytest.param( db_config_sqlite, marks=[ - pytest.mark.usefixtures("sqlite_init_db"), pytest.mark.sqlite_live, ], id="sqlite",