From f3095cc0dc4a48dd936e104d32df046206b96bc2 Mon Sep 17 00:00:00 2001 From: Brian Schubert Date: Wed, 26 Mar 2025 14:54:39 -0400 Subject: [PATCH 1/7] Add SQLAlchemy to third-party daily tests --- .github/workflows/third_party.yml | 45 +++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/.github/workflows/third_party.yml b/.github/workflows/third_party.yml index ec2d93f8..ee3175da 100644 --- a/.github/workflows/third_party.yml +++ b/.github/workflows/third_party.yml @@ -300,6 +300,49 @@ jobs: - name: Run cattrs tests run: cd cattrs; pdm run pytest tests + sqlalchemy: + name: sqlalchemy tests + needs: skip-schedule-on-fork + strategy: + fail-fast: false + matrix: + # PyPy is deliberately omitted here, since SQLAlchemy's tests + # fail on PyPy for reasons unrelated to typing_extensions. + python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ] + # sqlalchemy tests fail when using the Ubuntu 24.04 runner + # https://github.com/sqlalchemy/sqlalchemy/commit/8d73205f352e68c6603e90494494ef21027ec68f + runs-on: ubuntu-22.04 + timeout-minutes: 60 + steps: + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + allow-prereleases: true + - name: Install uv + run: curl -LsSf https://astral.sh/uv/install.sh | sh + - name: Checkout sqlalchemy + run: git clone --depth=1 https://github.com/sqlalchemy/sqlalchemy.git || git clone --depth=1 https://github.com/sqlalchemy/sqlalchemy.git + - name: Checkout typing_extensions + uses: actions/checkout@v4 + with: + path: typing-extensions-latest + - name: Install test dependencies + run: | + cd sqlalchemy + uv add --editable ../typing-extensions-latest + uv add tox setuptools + uv sync + - name: List installed dependencies + # Note: additional dependencies are installed when running tox below + run: cd sqlalchemy; uv pip list + - name: Run sqlalchemy tests + run: | + cd sqlalchemy + uv run tox -e github-nocext -- -q --nomemory --notimingintensive + env: + TOX_WORKERS: -n4 + create-issue-on-failure: name: Create an issue if daily tests failed runs-on: ubuntu-latest @@ -312,6 +355,7 @@ jobs: - typed-argument-parser - mypy - cattrs + - sqlalchemy if: >- ${{ @@ -326,6 +370,7 @@ jobs: || needs.typed-argument-parser.result == 'failure' || needs.mypy.result == 'failure' || needs.cattrs.result == 'failure' + || needs.sqlalchemy.result == 'failure' ) }} From 4f01c011fc78f5e3c0e2fec24c2f9eed2b0f2363 Mon Sep 17 00:00:00 2001 From: Brian Schubert Date: Thu, 27 Mar 2025 10:13:23 -0400 Subject: [PATCH 2/7] Re-run tests From e131290958b82d121e0a2db463f3c5f2e13cdb10 Mon Sep 17 00:00:00 2001 From: Brian Schubert Date: Thu, 27 Mar 2025 12:17:33 -0400 Subject: [PATCH 3/7] Add rel_2_0 branch to matrix --- .github/workflows/third_party.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/third_party.yml b/.github/workflows/third_party.yml index ee3175da..cb9affb7 100644 --- a/.github/workflows/third_party.yml +++ b/.github/workflows/third_party.yml @@ -309,6 +309,7 @@ jobs: # PyPy is deliberately omitted here, since SQLAlchemy's tests # fail on PyPy for reasons unrelated to typing_extensions. python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ] + checkout-ref: [ "main", "rel_2_0" ] # sqlalchemy tests fail when using the Ubuntu 24.04 runner # https://github.com/sqlalchemy/sqlalchemy/commit/8d73205f352e68c6603e90494494ef21027ec68f runs-on: ubuntu-22.04 @@ -322,7 +323,7 @@ jobs: - name: Install uv run: curl -LsSf https://astral.sh/uv/install.sh | sh - name: Checkout sqlalchemy - run: git clone --depth=1 https://github.com/sqlalchemy/sqlalchemy.git || git clone --depth=1 https://github.com/sqlalchemy/sqlalchemy.git + run: for i in {1..2}; do git clone -b ${{ matrix.checkout-ref }} --depth=1 https://github.com/sqlalchemy/sqlalchemy.git && break; done - name: Checkout typing_extensions uses: actions/checkout@v4 with: From b7c1442859ac24a7d804de7e25951803796de99c Mon Sep 17 00:00:00 2001 From: Brian Schubert Date: Thu, 27 Mar 2025 12:33:31 -0400 Subject: [PATCH 4/7] Update steps to work around missing 'project' table in rel_2_0 --- .github/workflows/third_party.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/third_party.yml b/.github/workflows/third_party.yml index cb9affb7..f2a4dd97 100644 --- a/.github/workflows/third_party.yml +++ b/.github/workflows/third_party.yml @@ -328,19 +328,17 @@ jobs: uses: actions/checkout@v4 with: path: typing-extensions-latest - - name: Install test dependencies - run: | - cd sqlalchemy - uv add --editable ../typing-extensions-latest - uv add tox setuptools - uv sync + - name: Install sqlalchemy test dependencies + run: uv pip install --system tox setuptools + - name: Install typing_extensions latest + run: uv pip install --system -e 'typing-extensions @ ./typing-extensions-latest' - name: List installed dependencies # Note: additional dependencies are installed when running tox below - run: cd sqlalchemy; uv pip list + run: uv pip list - name: Run sqlalchemy tests run: | cd sqlalchemy - uv run tox -e github-nocext -- -q --nomemory --notimingintensive + tox -e github-nocext -- -q --nomemory --notimingintensive env: TOX_WORKERS: -n4 From d285526c30313539b29c3e74ede5314554f1f8e7 Mon Sep 17 00:00:00 2001 From: Brian Schubert Date: Thu, 27 Mar 2025 13:33:30 -0400 Subject: [PATCH 5/7] Force tox to use typing-extensions-latest --- .github/workflows/third_party.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/third_party.yml b/.github/workflows/third_party.yml index f2a4dd97..6d95b52e 100644 --- a/.github/workflows/third_party.yml +++ b/.github/workflows/third_party.yml @@ -330,15 +330,18 @@ jobs: path: typing-extensions-latest - name: Install sqlalchemy test dependencies run: uv pip install --system tox setuptools - - name: Install typing_extensions latest - run: uv pip install --system -e 'typing-extensions @ ./typing-extensions-latest' - name: List installed dependencies - # Note: additional dependencies are installed when running tox below + # Note: tox installs SQLAlchemy and its dependencies in a different isolated + # environment before running the tests. To see the dependencies installed + # in the test environment, look for the line 'freeze> python -m pip freeze --all' + # in the output of the test step below. run: uv pip list - name: Run sqlalchemy tests run: | cd sqlalchemy - tox -e github-nocext -- -q --nomemory --notimingintensive + tox -e github-nocext \ + --force-dep "typing-extensions @ file://$(pwd)/../typing-extensions-latest" \ + -- -q --nomemory --notimingintensive env: TOX_WORKERS: -n4 From c7e8291a67dca62b30f8e6c11ed9364bcb1f2103 Mon Sep 17 00:00:00 2001 From: Brian Schubert Date: Thu, 27 Mar 2025 15:27:41 -0400 Subject: [PATCH 6/7] Add changes from review --- .github/workflows/third_party.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/third_party.yml b/.github/workflows/third_party.yml index 6d95b52e..c4bdfa3c 100644 --- a/.github/workflows/third_party.yml +++ b/.github/workflows/third_party.yml @@ -323,7 +323,7 @@ jobs: - name: Install uv run: curl -LsSf https://astral.sh/uv/install.sh | sh - name: Checkout sqlalchemy - run: for i in {1..2}; do git clone -b ${{ matrix.checkout-ref }} --depth=1 https://github.com/sqlalchemy/sqlalchemy.git && break; done + run: git clone -b ${{ matrix.checkout-ref }} --depth=1 https://github.com/sqlalchemy/sqlalchemy.git && git clone -b ${{ matrix.checkout-ref }} --depth=1 https://github.com/sqlalchemy/sqlalchemy.git - name: Checkout typing_extensions uses: actions/checkout@v4 with: @@ -342,8 +342,6 @@ jobs: tox -e github-nocext \ --force-dep "typing-extensions @ file://$(pwd)/../typing-extensions-latest" \ -- -q --nomemory --notimingintensive - env: - TOX_WORKERS: -n4 create-issue-on-failure: name: Create an issue if daily tests failed From f2e9f18545f189ba800fbb3c4fb87f78c2066592 Mon Sep 17 00:00:00 2001 From: Brian Schubert Date: Thu, 27 Mar 2025 15:30:06 -0400 Subject: [PATCH 7/7] Typo --- .github/workflows/third_party.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/third_party.yml b/.github/workflows/third_party.yml index c4bdfa3c..5f444c9f 100644 --- a/.github/workflows/third_party.yml +++ b/.github/workflows/third_party.yml @@ -323,7 +323,7 @@ jobs: - name: Install uv run: curl -LsSf https://astral.sh/uv/install.sh | sh - name: Checkout sqlalchemy - run: git clone -b ${{ matrix.checkout-ref }} --depth=1 https://github.com/sqlalchemy/sqlalchemy.git && git clone -b ${{ matrix.checkout-ref }} --depth=1 https://github.com/sqlalchemy/sqlalchemy.git + run: git clone -b ${{ matrix.checkout-ref }} --depth=1 https://github.com/sqlalchemy/sqlalchemy.git || git clone -b ${{ matrix.checkout-ref }} --depth=1 https://github.com/sqlalchemy/sqlalchemy.git - name: Checkout typing_extensions uses: actions/checkout@v4 with: