From 6727db4d6b201c6eb9716c0f2b2b815fb612d558 Mon Sep 17 00:00:00 2001 From: "Edgar R. M" Date: Wed, 23 Aug 2023 10:54:24 -0600 Subject: [PATCH] fix!: Drop support for SQLAlchemy 1.4 (#1916) --- .github/workflows/test.yml | 10 +++------- noxfile.py | 8 -------- poetry.lock | 2 +- pyproject.toml | 2 +- tests/conftest.py | 6 ------ 5 files changed, 5 insertions(+), 23 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a2ed9d0872..5b8f61d8b0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,7 +37,7 @@ env: jobs: tests: - name: "Test on ${{ matrix.python-version }} (${{ matrix.session }}) / ${{ matrix.os }} / SQLAlchemy: ${{ matrix.sqlalchemy }}" + name: "Test on ${{ matrix.python-version }} (${{ matrix.session }}) / ${{ matrix.os }}" runs-on: ${{ matrix.os }} env: NOXSESSION: ${{ matrix.session }} @@ -47,11 +47,9 @@ jobs: session: [tests] os: ["ubuntu-latest", "macos-latest", "windows-latest"] python-version: ["3.8", "3.9", "3.10", "3.11"] - sqlalchemy: ["2.*"] include: - - { session: tests, python-version: "3.11", os: "ubuntu-latest", sqlalchemy: "1.*" } - - { session: doctest, python-version: "3.10", os: "ubuntu-latest", sqlalchemy: "2.*" } - - { session: mypy, python-version: "3.8", os: "ubuntu-latest", sqlalchemy: "2.*" } + - { session: doctest, python-version: "3.10", os: "ubuntu-latest" } + - { session: mypy, python-version: "3.8", os: "ubuntu-latest" } steps: - name: Check out the repository @@ -88,8 +86,6 @@ jobs: nox --version - name: Run Nox - env: - SQLALCHEMY_VERSION: ${{ matrix.sqlalchemy }} run: | nox --python=${{ matrix.python-version }} diff --git a/noxfile.py b/noxfile.py index 3090c51da0..fac4b405b1 100644 --- a/noxfile.py +++ b/noxfile.py @@ -87,14 +87,6 @@ def tests(session: Session) -> None: session.install(".[s3]") session.install(*test_dependencies) - sqlalchemy_version = os.environ.get("SQLALCHEMY_VERSION") - if sqlalchemy_version: - # Bypass nox-poetry use of --constraint so we can install a version of - # SQLAlchemy that doesn't match what's in poetry.lock. - session.poetry.session.install( # type: ignore[attr-defined] - f"sqlalchemy=={sqlalchemy_version}", - ) - try: session.run( "coverage", diff --git a/poetry.lock b/poetry.lock index 8a7b6bcfee..d07f1d90f2 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2618,4 +2618,4 @@ testing = ["pytest", "pytest-durations"] [metadata] lock-version = "2.0" python-versions = ">=3.8,<4" -content-hash = "78661116bb8cfc63579d544c640d1f29ba03259e0678f69b434328d37df637fe" +content-hash = "4cb8167d133c6964838fae2eb176258c37348ae7d201c960e043643201ea15bd" diff --git a/pyproject.toml b/pyproject.toml index b7745b2374..13c23130a7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,7 +50,7 @@ memoization = ">=0.3.2,<0.5.0" jsonpath-ng = ">=1.5.3" joblib = ">=1.0.1" inflection = ">=0.5.1" -sqlalchemy = ">=1.4,<3.0" +sqlalchemy = ">=2.0,<3.0" python-dotenv = ">=0.20,<0.22" typing-extensions = ">=4.2.0" simplejson = ">=3.17.6" diff --git a/tests/conftest.py b/tests/conftest.py index cb392bd3ab..4ef858e3f3 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -8,7 +8,6 @@ import typing as t import pytest -from sqlalchemy import __version__ as sqlalchemy_version from singer_sdk import SQLConnector from singer_sdk import typing as th @@ -46,11 +45,6 @@ def pytest_runtest_setup(item): pytest.skip(f"cannot run on platform {system}") -def pytest_report_header() -> list[str]: - """Return a list of strings to be displayed in the header of the report.""" - return [f"sqlalchemy: {sqlalchemy_version}"] - - @pytest.fixture(scope="class") def outdir() -> t.Generator[str, None, None]: """Create a temporary directory for cookiecutters and target output."""