Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,56 @@ jobs:
PYTHONUNBUFFERED: 1
DB_DSN: postgresql+asyncpg://postgres:password@127.0.0.1/postgres

floors:
# Every other job resolves newest, so the declared floors are a claim nothing installs.
# This one resolves the bottom of each range, on every matrix entry: wheel coverage is
# per interpreter, so two interpreters resolving the same versions can still disagree
# on whether those versions install.
runs-on: ubuntu-latest
env:
# SQLAlchemy's cyext does not declare free-thread safety (fixed upstream for 2.1): use the pure-Python fallback on the t build.
DISABLE_SQLALCHEMY_CEXT_RUNTIME: ${{ matrix.python-version == '3.14t' && '1' || '' }}
strategy:
fail-fast: false
matrix:
python-version:
- "3.11"
- "3.12"
- "3.13"
- "3.14"
- "3.14t"
services:
postgres:
image: postgres:latest
env:
POSTGRES_DB: postgres
POSTGRES_PASSWORD: password
POSTGRES_USER: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v8.2.0
with:
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
- run: uv python install ${{ matrix.python-version }}
- run: uv python pin ${{ matrix.python-version }}
# --no-build so a floor with no wheel for this interpreter fails here instead of
# quietly compiling its sdist; --no-install-project because that flag would refuse to
# build this project too, and the tests import it from the checkout.
- run: uv sync --all-extras --no-install-project --resolution lowest-direct --no-build
- run: uv run --no-sync pytest
env:
PYTHONDONTWRITEBYTECODE: 1
PYTHONUNBUFFERED: 1
DB_DSN: postgresql+asyncpg://postgres:password@127.0.0.1/postgres

links:
runs-on: ubuntu-latest
steps:
Expand Down
20 changes: 12 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@ dependencies = [
"tenacity>=8.4.1",
# 2.0.31 is the first release that tolerates the __static_attributes__ and __firstlineno__
# attributes Python 3.13 added; below it SQLAlchemy's TypingOnly check fails at import.
"sqlalchemy[asyncio]>=2.0.18; python_version < '3.13'",
# 2.0.20, not 2.0.18: advanced-alchemy requires it, so nothing here can exercise 2.0.18.
"sqlalchemy[asyncio]>=2.0.20; python_version < '3.13'",
"sqlalchemy[asyncio]>=2.0.31; python_version >= '3.13'",
# asyncpg declares requires-python >=3.8 throughout but ships no cp313 wheel before 0.30 and no
# cp314 wheel before 0.31, so a resolver picks an sdist that cannot build rather than conflicting.
"asyncpg>=0.28; python_version < '3.13'",
# asyncpg declares requires-python >=3.8 throughout but ships no cp312 wheel before 0.29, no
# cp313 wheel before 0.30 and no cp314 wheel before 0.31, so a resolver picks an sdist that
# cannot build rather than conflicting.
"asyncpg>=0.28; python_version < '3.12'",
"asyncpg>=0.29; python_version == '3.12'",
"asyncpg>=0.30; python_version == '3.13'",
"asyncpg>=0.31; python_version >= '3.14'",
]
Expand All @@ -40,11 +43,12 @@ Issues = "https://github.com/modern-python/db-retry/issues"
Changelog = "https://github.com/modern-python/db-retry/releases"

[dependency-groups]
# Floored so `uv sync --resolution lowest-direct` resolves a usable harness, not each name's first release.
dev = [
"pytest",
"pytest-cov",
"pytest-asyncio",
"advanced-alchemy",
"pytest>=8",
"pytest-cov>=5",
"pytest-asyncio>=0.24",
"advanced-alchemy>=1",
]
lint = [
"ruff",
Expand Down
Loading