Skip to content

Commit cf87688

Browse files
authored
Dropped support for Python 3.9 and test on 3.14 (#437)
1 parent 6ddf95c commit cf87688

File tree

5 files changed

+9
-13
lines changed

5 files changed

+9
-13
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
13+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v4

CHANGES.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ Version history
22
===============
33

44
**UNRELEASED**
5+
6+
- Dropped support for Python 3.9
57
- Fix Postgres ``DOMAIN`` adaptation regression introduced in SQLAlchemy 2.0.42 (PR by @sheinbergon)
68

79
**3.1.1**

pyproject.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,16 @@ classifiers = [
2121
"Topic :: Software Development :: Code Generators",
2222
"Programming Language :: Python",
2323
"Programming Language :: Python :: 3",
24-
"Programming Language :: Python :: 3.9",
2524
"Programming Language :: Python :: 3.10",
2625
"Programming Language :: Python :: 3.11",
2726
"Programming Language :: Python :: 3.12",
2827
"Programming Language :: Python :: 3.13",
28+
"Programming Language :: Python :: 3.14",
2929
]
30-
requires-python = ">=3.9"
30+
requires-python = ">=3.10"
3131
dependencies = [
3232
"SQLAlchemy >= 2.0.29",
3333
"inflect >= 4.0.0",
34-
"importlib_metadata; python_version < '3.10'",
35-
"stdlib-list; python_version < '3.10'"
3634
]
3735
dynamic = ["version"]
3836

@@ -95,7 +93,7 @@ relative_files = true
9593
show_missing = true
9694

9795
[tool.tox]
98-
env_list = ["py39", "py310", "py311", "py312", "py313"]
96+
env_list = ["py310", "py311", "py312", "py313", "py314"]
9997
skip_missing_interpreters = true
10098

10199
[tool.tox.env_run_base]

src/sqlacodegen/cli.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import ast
55
import sys
66
from contextlib import ExitStack
7+
from importlib.metadata import entry_points, version
78
from typing import Any, TextIO
89

910
from sqlalchemy.engine import create_engine
@@ -24,11 +25,6 @@
2425
except ImportError:
2526
pgvector = None
2627

27-
if sys.version_info < (3, 10):
28-
from importlib_metadata import entry_points, version
29-
else:
30-
from importlib.metadata import entry_points, version
31-
3228

3329
def _parse_engine_arg(arg_str: str) -> tuple[str, Any]:
3430
if "=" not in arg_str:

src/sqlacodegen/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from dataclasses import dataclass, field
44
from enum import Enum, auto
5-
from typing import Any, Union
5+
from typing import Any
66

77
from sqlalchemy.sql.schema import Column, ForeignKeyConstraint, Table
88

@@ -52,7 +52,7 @@ def __str__(self) -> str:
5252
return self.name
5353

5454

55-
JoinType = tuple[Model, Union[ColumnAttribute, str], Model, Union[ColumnAttribute, str]]
55+
JoinType = tuple[Model, ColumnAttribute | str, Model, ColumnAttribute | str]
5656

5757

5858
@dataclass

0 commit comments

Comments
 (0)