From 2bc4d519c722d64703fd8291d2cf37a78b21255b Mon Sep 17 00:00:00 2001 From: hauntsaninja Date: Sun, 3 Mar 2024 22:06:14 -0800 Subject: [PATCH 1/4] Stabilise third party tests Use uv to test with the state of PyPI as of the commit we are testing --- .github/workflows/third_party.yml | 44 +++++++++++++++++++------------ 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/.github/workflows/third_party.yml b/.github/workflows/third_party.yml index 92ce3676..71677ad6 100644 --- a/.github/workflows/third_party.yml +++ b/.github/workflows/third_party.yml @@ -103,12 +103,14 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + - name: Install uv + run: curl -LsSf https://astral.sh/uv/install.sh | sh - name: Install typing_inspect test dependencies - run: pip install -r typing_inspect/test-requirements.txt + run: uv pip install -r typing_inspect/test-requirements.txt --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD) - name: Install typing_extensions latest - run: pip install ./typing-extensions-latest + run: uv pip install ./typing-extensions-latest - name: List all installed dependencies - run: pip freeze --all + run: uv pip freeze - name: Run typing_inspect tests run: | cd typing_inspect @@ -147,12 +149,14 @@ jobs: with: python-version: ${{ matrix.python-version }} allow-prereleases: true + - name: Install uv + run: curl -LsSf https://astral.sh/uv/install.sh | sh - name: Install pyanalyze test requirements - run: pip install ./pyanalyze[tests] + run: uv pip install ./pyanalyze[tests] --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD) - name: Install typing_extensions latest - run: pip install ./typing-extensions-latest + run: uv pip install ./typing-extensions-latest - name: List all installed dependencies - run: pip freeze --all + run: uv pip freeze - name: Run pyanalyze tests run: | cd pyanalyze @@ -191,12 +195,14 @@ jobs: with: python-version: ${{ matrix.python-version }} allow-prereleases: true + - name: Install uv + run: curl -LsSf https://astral.sh/uv/install.sh | sh - name: Install typeguard test requirements - run: pip install -e ./typeguard[test] + run: uv pip install -e ./typeguard[test] --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD) - name: Install typing_extensions latest - run: pip install ./typing-extensions-latest + run: uv pip install ./typing-extensions-latest - name: List all installed dependencies - run: pip freeze --all + run: uv pip freeze - name: Run typeguard tests run: | cd typeguard @@ -234,6 +240,8 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + - name: Install uv + run: curl -LsSf https://astral.sh/uv/install.sh | sh - name: Configure git for typed-argument-parser tests # typed-argument parser does this in their CI, # and the tests fail unless we do this @@ -242,12 +250,12 @@ jobs: git config --global user.name "Your Name" - name: Install typed-argument-parser test requirements run: | - pip install -e ./typed-argument-parser - pip install pytest + uv pip install -e ./typed-argument-parser --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD) + uv pip install pytest --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD) - name: Install typing_extensions latest - run: pip install ./typing-extensions-latest + run: uv pip install ./typing-extensions-latest - name: List all installed dependencies - run: pip freeze --all + run: uv pip freeze - name: Run typed-argument-parser tests run: | cd typed-argument-parser @@ -286,15 +294,17 @@ jobs: with: python-version: ${{ matrix.python-version }} allow-prereleases: true + - name: Install uv + run: curl -LsSf https://astral.sh/uv/install.sh | sh - name: Install mypy test requirements run: | cd mypy - pip install -r test-requirements.txt - pip install -e . + uv pip install -r test-requirements.txt --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD) + uv pip install -e . - name: Install typing_extensions latest - run: pip install ./typing-extensions-latest + run: uv pip install ./typing-extensions-latest - name: List all installed dependencies - run: pip freeze --all + run: uv pip freeze - name: Run stubtest & mypyc tests run: | cd mypy From 414d435d44c99391f3f456b501c4dee5ffd262f0 Mon Sep 17 00:00:00 2001 From: hauntsaninja Date: Sun, 3 Mar 2024 22:11:47 -0800 Subject: [PATCH 2/4] . --- .github/workflows/third_party.yml | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/.github/workflows/third_party.yml b/.github/workflows/third_party.yml index 71677ad6..12a57542 100644 --- a/.github/workflows/third_party.yml +++ b/.github/workflows/third_party.yml @@ -106,9 +106,11 @@ jobs: - name: Install uv run: curl -LsSf https://astral.sh/uv/install.sh | sh - name: Install typing_inspect test dependencies - run: uv pip install -r typing_inspect/test-requirements.txt --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD) + run: | + cd typing_inspect + uv pip install --system -r test-requirements.txt --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD) - name: Install typing_extensions latest - run: uv pip install ./typing-extensions-latest + run: uv pip install --system ./typing-extensions-latest - name: List all installed dependencies run: uv pip freeze - name: Run typing_inspect tests @@ -152,9 +154,11 @@ jobs: - name: Install uv run: curl -LsSf https://astral.sh/uv/install.sh | sh - name: Install pyanalyze test requirements - run: uv pip install ./pyanalyze[tests] --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD) + run: | + cd pyanalyze + uv pip install --system .[tests] --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD) - name: Install typing_extensions latest - run: uv pip install ./typing-extensions-latest + run: uv pip install --system ./typing-extensions-latest - name: List all installed dependencies run: uv pip freeze - name: Run pyanalyze tests @@ -198,9 +202,11 @@ jobs: - name: Install uv run: curl -LsSf https://astral.sh/uv/install.sh | sh - name: Install typeguard test requirements - run: uv pip install -e ./typeguard[test] --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD) + run: | + cd typeguard + uv pip install --system -e .[test] --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD) - name: Install typing_extensions latest - run: uv pip install ./typing-extensions-latest + run: uv pip install --system ./typing-extensions-latest - name: List all installed dependencies run: uv pip freeze - name: Run typeguard tests @@ -250,10 +256,11 @@ jobs: git config --global user.name "Your Name" - name: Install typed-argument-parser test requirements run: | - uv pip install -e ./typed-argument-parser --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD) - uv pip install pytest --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD) + cd typed-argument-parser + uv pip install --system -e . --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD) + uv pip install --system pytest --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD) - name: Install typing_extensions latest - run: uv pip install ./typing-extensions-latest + run: uv pip install --system ./typing-extensions-latest - name: List all installed dependencies run: uv pip freeze - name: Run typed-argument-parser tests @@ -299,10 +306,10 @@ jobs: - name: Install mypy test requirements run: | cd mypy - uv pip install -r test-requirements.txt --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD) - uv pip install -e . + uv pip install --system -r test-requirements.txt --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD) + uv pip install --system -e . - name: Install typing_extensions latest - run: uv pip install ./typing-extensions-latest + run: uv pip install --system ./typing-extensions-latest - name: List all installed dependencies run: uv pip freeze - name: Run stubtest & mypyc tests From 8184fc8a5f721bffff24a5202541b69d5428a3e5 Mon Sep 17 00:00:00 2001 From: hauntsaninja Date: Sun, 3 Mar 2024 22:18:36 -0800 Subject: [PATCH 3/4] workaround https://github.com/astral-sh/uv/issues/313 --- .github/workflows/third_party.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/third_party.yml b/.github/workflows/third_party.yml index 12a57542..e51de496 100644 --- a/.github/workflows/third_party.yml +++ b/.github/workflows/third_party.yml @@ -110,7 +110,7 @@ jobs: cd typing_inspect uv pip install --system -r test-requirements.txt --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD) - name: Install typing_extensions latest - run: uv pip install --system ./typing-extensions-latest + run: uv pip install --system "typing-extensions @ ./typing-extensions-latest" - name: List all installed dependencies run: uv pip freeze - name: Run typing_inspect tests @@ -156,9 +156,9 @@ jobs: - name: Install pyanalyze test requirements run: | cd pyanalyze - uv pip install --system .[tests] --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD) + uv pip install --system 'pyanalyze[tests] @ .' --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD) - name: Install typing_extensions latest - run: uv pip install --system ./typing-extensions-latest + run: uv pip install --system "typing-extensions @ ./typing-extensions-latest" - name: List all installed dependencies run: uv pip freeze - name: Run pyanalyze tests @@ -204,9 +204,9 @@ jobs: - name: Install typeguard test requirements run: | cd typeguard - uv pip install --system -e .[test] --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD) + uv pip install --system "typeguard[test] @ ." --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD) - name: Install typing_extensions latest - run: uv pip install --system ./typing-extensions-latest + run: uv pip install --system "typing-extensions @ ./typing-extensions-latest" - name: List all installed dependencies run: uv pip freeze - name: Run typeguard tests @@ -257,10 +257,10 @@ jobs: - name: Install typed-argument-parser test requirements run: | cd typed-argument-parser - uv pip install --system -e . --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD) + uv pip install --system -e "typed-argument-parser @ ." --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD) uv pip install --system pytest --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD) - name: Install typing_extensions latest - run: uv pip install --system ./typing-extensions-latest + run: uv pip install --system "typing-extensions @ ./typing-extensions-latest" - name: List all installed dependencies run: uv pip freeze - name: Run typed-argument-parser tests @@ -309,7 +309,7 @@ jobs: uv pip install --system -r test-requirements.txt --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD) uv pip install --system -e . - name: Install typing_extensions latest - run: uv pip install --system ./typing-extensions-latest + run: uv pip install --system "typing-extensions @ ./typing-extensions-latest" - name: List all installed dependencies run: uv pip freeze - name: Run stubtest & mypyc tests From f694a4e2effdd2179f76e886498ffd3446e96b0b Mon Sep 17 00:00:00 2001 From: hauntsaninja Date: Sun, 3 Mar 2024 22:23:02 -0800 Subject: [PATCH 4/4] remove editable --- .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 e51de496..cee1fe21 100644 --- a/.github/workflows/third_party.yml +++ b/.github/workflows/third_party.yml @@ -257,7 +257,7 @@ jobs: - name: Install typed-argument-parser test requirements run: | cd typed-argument-parser - uv pip install --system -e "typed-argument-parser @ ." --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD) + uv pip install --system "typed-argument-parser @ ." --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD) uv pip install --system pytest --exclude-newer $(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD) - name: Install typing_extensions latest run: uv pip install --system "typing-extensions @ ./typing-extensions-latest"