Skip to content

Commit beefe49

Browse files
authored
enable python 3.13 (#28)
1 parent 54dd67b commit beefe49

File tree

4 files changed

+72
-155
lines changed

4 files changed

+72
-155
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/checkout@v3
20-
- uses: actions/setup-python@v4
21-
with:
22-
python-version: "3.12"
20+
- uses: astral-sh/setup-uv@v3
21+
- run: uv python install 3.12
2322
- run: |
24-
curl -LsSf https://astral.sh/uv/install.sh | sh
2523
uv sync --all-extras --frozen --no-install-project
2624
uv run ruff format . --check
2725
uv run ruff check . --no-fix
@@ -46,11 +44,9 @@ jobs:
4644
--health-retries 5
4745
steps:
4846
- uses: actions/checkout@v3
49-
- uses: actions/setup-python@v4
50-
with:
51-
python-version: "3.12"
47+
- uses: astral-sh/setup-uv@v3
48+
- run: uv python install 3.13
5249
- run: |
53-
curl -LsSf https://astral.sh/uv/install.sh | sh
5450
uv sync --all-extras --frozen --no-install-project
5551
uv run alembic upgrade head
5652
uv run pytest . --cov=. --cov-report xml

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.12-slim
1+
FROM python:3.13-slim
22

33
# required for psycopg2
44
RUN apt update \
@@ -19,7 +19,7 @@ WORKDIR /code
1919
COPY pyproject.toml .
2020
COPY uv.lock .
2121

22-
RUN uv sync --frozen --no-install-project
22+
RUN uv sync --all-extras --frozen --no-install-project
2323

2424
COPY . .
2525

pyproject.toml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "fastapi-sqlalchemy-template"
33
version = "0"
44
description = "Async template on FastAPI and SQLAlchemy 2"
55
readme = "README.md"
6-
requires-python = ">=3.12"
6+
requires-python = ">=3.13"
77
authors = [
88
{ email = "[email protected]" },
99
{ name = "Artur Shiriev"}
@@ -18,7 +18,7 @@ dependencies = [
1818
# database
1919
"alembic",
2020
"psycopg2",
21-
"sqlalchemy",
21+
"sqlalchemy[asyncio]",
2222
"asyncpg",
2323
]
2424

@@ -38,16 +38,14 @@ dev = [
3838
fix = true
3939
unsafe-fixes = true
4040
line-length = 120
41-
target-version = "py312"
41+
target-version = "py313"
4242
extend-exclude = ["bin"]
4343

4444
[tool.ruff.lint]
4545
select = ["ALL"]
4646
ignore = [
4747
"D1", # allow missing docstrings
4848
"FBT", # allow boolean args
49-
"ANN101", # missing-type-self
50-
"ANN102", # missing-type-cls
5149
"INP", # ignore flake8-no-pep420
5250
"B008", # function-call-in-default-argument
5351
"ANN204", # no typings for __init__
@@ -66,7 +64,7 @@ isort.no-lines-before = ["standard-library", "local-folder"]
6664
]
6765

6866
[tool.mypy]
69-
python_version = "3.12"
67+
python_version = "3.13"
7068
strict = true
7169
pretty = true
7270

@@ -81,4 +79,4 @@ exclude_also = [
8179
]
8280

8381
[tool.coverage.run]
84-
concurrency = ["thread","greenlet"]
82+
concurrency = ["thread", "greenlet"]

0 commit comments

Comments
 (0)