From 4b1b4dae5c10a24370188e4e41b779aa455627b8 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 a181978c8b..7cb96fda87 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 322ef118d5..9c83f181ed 100644 --- a/noxfile.py +++ b/noxfile.py @@ -88,14 +88,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 35c184d75d..f7a7243a59 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2785,4 +2785,4 @@ testing = ["pytest", "pytest-durations"] [metadata] lock-version = "2.0" python-versions = "<4,>=3.8" -content-hash = "2809d8650d9b8ca91bb2c0fb320a61cb423ffad161880c6d5b6812c307eac9bf" +content-hash = "c7c99f90fd5f2c3b1d9361e108f32c42cc00f3c4d214ba8f2e3e714ccc905cc9" diff --git a/pyproject.toml b/pyproject.toml index af7c0e98a6..f17ccffe00 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 7e7c39958f..a6d30cc377 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 @@ -45,11 +44,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."""