Skip to content

Commit 138cb25

Browse files
authored
Merge branch 'master' into master
2 parents 5370ebc + 82251f3 commit 138cb25

File tree

6 files changed

+24
-21
lines changed

6 files changed

+24
-21
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Create packages
2525
run: python -m build
2626
- name: Archive packages
27-
uses: actions/upload-artifact@v3
27+
uses: actions/upload-artifact@v4
2828
with:
2929
name: dist
3030
path: dist
@@ -38,7 +38,7 @@ jobs:
3838
id-token: write
3939
steps:
4040
- name: Retrieve packages
41-
uses: actions/download-artifact@v3
41+
uses: actions/download-artifact@v4
4242
- name: Upload packages
4343
uses: pypa/gh-action-pypi-publish@release/v1
4444

.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.8", "3.9", "3.10", "3.11", "3.12"]
13+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v4

CHANGES.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Version history
22
===============
33

4+
**UNRELEASED**
5+
6+
- Dropped support for Python 3.8
7+
48
**3.0.0rc5**
59

610
- Fixed pgvector support not working

pyproject.toml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ classifiers = [
2121
"Topic :: Software Development :: Code Generators",
2222
"Programming Language :: Python",
2323
"Programming Language :: Python :: 3",
24-
"Programming Language :: Python :: 3.8",
2524
"Programming Language :: Python :: 3.9",
2625
"Programming Language :: Python :: 3.10",
2726
"Programming Language :: Python :: 3.11",
2827
"Programming Language :: Python :: 3.12",
28+
"Programming Language :: Python :: 3.13",
2929
]
30-
requires-python = ">=3.8"
30+
requires-python = ">=3.9"
3131
dependencies = [
3232
"SQLAlchemy >= 2.0.23",
3333
"inflect >= 4.0.0",
@@ -44,7 +44,7 @@ test = [
4444
"sqlacodegen[sqlmodel]",
4545
"pytest >= 7.4",
4646
"coverage >= 7",
47-
"psycopg2-binary",
47+
"psycopg[binary]",
4848
"mysql-connector-python",
4949
]
5050
sqlmodel = ["sqlmodel >= 0.0.22"]
@@ -66,21 +66,23 @@ version_scheme = "post-release"
6666
local_scheme = "dirty-tag"
6767

6868
[tool.ruff]
69-
select = [
70-
"E", "F", "W", # default Flake8
69+
src = ["src"]
70+
71+
[tool.ruff.lint]
72+
extend-select = [
7173
"I", # isort
7274
"ISC", # flake8-implicit-str-concat
7375
"PGH", # pygrep-hooks
7476
"RUF100", # unused noqa (yesqa)
7577
"UP", # pyupgrade
78+
"W", # pycodestyle warnings
7679
]
77-
src = ["src"]
7880

7981
[tool.mypy]
8082
strict = true
8183

8284
[tool.pytest.ini_options]
83-
addopts = "-rsx --tb=short"
85+
addopts = "-rsfE --tb=short"
8486
testpaths = ["tests"]
8587

8688
[coverage.run]
@@ -91,13 +93,10 @@ relative_files = true
9193
show_missing = true
9294

9395
[tool.tox]
94-
legacy_tox_ini = """
95-
[tox]
96-
envlist = py38, py39, py310, py311, py312
96+
env_list = ["py39", "py310", "py311", "py312", "py313"]
9797
skip_missing_interpreters = true
98-
minversion = 4.0.0
9998

100-
[testenv]
101-
extras = test
102-
commands = python -m pytest {posargs}
103-
"""
99+
[tool.tox.env_run_base]
100+
package = "editable"
101+
commands = [["python", "-m", "pytest", { replace = "posargs", extend = true }]]
102+
extras = ["test"]

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, Tuple, Union
5+
from typing import Any, Union
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, Union[ColumnAttribute, str], Model, Union[ColumnAttribute, str]]
5656

5757

5858
@dataclass

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
def engine(request: FixtureRequest) -> Engine:
1212
dialect = getattr(request, "param", None)
1313
if dialect == "postgresql":
14-
return create_engine("postgresql:///testdb")
14+
return create_engine("postgresql+psycopg:///testdb")
1515
elif dialect == "mysql":
1616
return create_engine("mysql+mysqlconnector://testdb")
1717
else:

0 commit comments

Comments
 (0)