From c5ce6b57f8e6f5fe5efa4de7d2753985876656c0 Mon Sep 17 00:00:00 2001
From: "Edgar R. M" <edgar@meltano.com>
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 --------
 tests/conftest.py          |  6 ------
 3 files changed, 3 insertions(+), 21 deletions(-)

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 710a72171a..55ee98d2fe 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 }}
     continue-on-error: true
     env:
@@ -49,11 +49,9 @@ jobs:
         session: [tests]
         os: ["ubuntu-latest", "macos-latest", "windows-latest"]
         python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
-        sqlalchemy: ["2"]
         include:
-        - { session: tests,   python-version: "3.12", os: "ubuntu-latest", sqlalchemy: "1" }
-        - { session: doctest, python-version: "3.12", os: "ubuntu-latest", sqlalchemy: "2" }
-        - { session: mypy,    python-version: "3.12",  os: "ubuntu-latest", sqlalchemy: "2" }
+        - { session: doctest, python-version: "3.12", os: "ubuntu-latest" }
+        - { session: mypy,    python-version: "3.12",  os: "ubuntu-latest" }
 
     steps:
     - uses: actions/checkout@v4
@@ -93,8 +91,6 @@ jobs:
         nox --version
 
     - name: Run Nox
-      env:
-        SQLALCHEMY_VERSION: ${{ matrix.sqlalchemy }}
       run: |
         nox --verbose
 
diff --git a/noxfile.py b/noxfile.py
index 6cd39b416a..b7ecc37ab1 100644
--- a/noxfile.py
+++ b/noxfile.py
@@ -83,14 +83,6 @@ def tests(session: Session) -> None:
     session.install(".[faker,parquet,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}.*",
-        )
-
     env = {"COVERAGE_CORE": "sysmon"} if session.python == "3.12" else {}
 
     try:
diff --git a/tests/conftest.py b/tests/conftest.py
index f220d0506c..2f8381af2f 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -8,7 +8,6 @@
 import typing as t
 
 import pytest
-import sqlalchemy as sa
 
 from singer_sdk import SQLConnector
 from singer_sdk import typing as th
@@ -44,11 +43,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: {sa.__version__}"]
-
-
 @pytest.fixture(scope="class")
 def outdir() -> t.Generator[str, None, None]:
     """Create a temporary directory for target output."""