Skip to content
Merged
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
165 changes: 93 additions & 72 deletions .github/workflows/third_party.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,17 @@ jobs:
with:
path: typing-extensions-latest
persist-credentials: false
- name: Add local version of typing_extensions as a dependency
run: cd pydantic; uv add --editable ../typing-extensions-latest
- name: Install pydantic test dependencies
run: cd pydantic; uv sync --group dev
- name: List installed dependencies
run: cd pydantic; uv pip list
- name: Run pydantic tests
run: cd pydantic; uv run pytest
- name: Run tests with typing_extensions main branch
working-directory: pydantic
run: |
uv add --editable ../typing-extensions-latest
uv sync --group dev

printf "\n\nINSTALLED DEPENDENCIES ARE:\n\n"
uv pip list
printf "\n\n"

uv run pytest

typing_inspect:
name: typing_inspect tests
Expand All @@ -91,19 +94,19 @@ jobs:
with:
path: typing-extensions-latest
persist-credentials: false
- name: Install typing_inspect test dependencies
- name: Run tests with typing_extensions main branch
working-directory: typing_inspect
run: |
set -x
cd typing_inspect
uv venv .venv

uv pip install -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: cd typing_inspect; uv pip install "typing-extensions @ ../typing-extensions-latest"
- name: List all installed dependencies
run: cd typing_inspect; uv pip freeze
- name: Run typing_inspect tests
run: |
cd typing_inspect; uv run --no-project pytest
uv pip install -e "typing-extensions @ ../typing-extensions-latest"

printf "\n\nINSTALLED DEPENDENCIES ARE:\n\n"
uv pip list

uv run --no-project pytest

pycroscope:
name: pycroscope tests
Expand All @@ -126,19 +129,19 @@ jobs:
with:
path: typing-extensions-latest
persist-credentials: false
- name: Install pycroscope test requirements
- name: Run tests with typing_extensions main branch
working-directory: pycroscope
run: |
set -x
cd pycroscope
uv venv .venv
uv pip install 'pycroscope[tests] @ .' --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)"
- name: Install typing_extensions latest
run: cd pycroscope; uv pip install "typing-extensions @ ../typing-extensions-latest"
- name: List all installed dependencies
run: cd pycroscope; uv pip freeze
- name: Run pycroscope tests
run: |
cd pycroscope; uv run --no-project pytest pycroscope/

uv pip install -e 'pycroscope[tests] @ .' --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)"
uv pip install -e "typing-extensions @ ../typing-extensions-latest"

printf "\n\nINSTALLED DEPENDENCIES ARE:\n\n"
uv pip list

uv run --no-project pytest pycroscope/

typeguard:
name: typeguard tests
Expand All @@ -161,20 +164,21 @@ jobs:
with:
path: typing-extensions-latest
persist-credentials: false
- name: Install typeguard test requirements
- name: Run tests with typing_extensions main branch
env:
PYTHON_COLORS: 0 # A test fails if tracebacks are colorized
working-directory: typeguard
run: |
set -x
cd typeguard
uv venv .venv
uv pip install "typeguard @ ." --group test --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)"
- name: Install typing_extensions latest
run: cd typeguard; uv pip install "typing-extensions @ ../typing-extensions-latest"
- name: List all installed dependencies
run: cd typeguard; uv pip freeze
- name: Run typeguard tests
run: |
export PYTHON_COLORS=0 # A test fails if tracebacks are colorized
cd typeguard; uv run --no-project pytest

uv pip install -e "typeguard @ ." --group test --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)"
uv pip install -e "typing-extensions @ ../typing-extensions-latest"

printf "\n\nINSTALLED DEPENDENCIES ARE:\n\n"
uv pip list

uv run --no-project pytest

typed-argument-parser:
name: typed-argument-parser tests
Expand Down Expand Up @@ -203,20 +207,20 @@ jobs:
run: |
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
- name: Install typed-argument-parser test requirements
- name: Run tests with typing_extensions main branch
working-directory: typed-argument-parser
run: |
set -x
cd typed-argument-parser
uv venv .venv
uv pip install "typed-argument-parser @ ." --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)"

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: cd typed-argument-parser; uv pip install "typing-extensions @ ../typing-extensions-latest"
- name: List all installed dependencies
run: cd typed-argument-parser; uv pip freeze
- name: Run typed-argument-parser tests
run: |
cd typed-argument-parser; uv run --no-project pytest
uv pip install -e "typing-extensions @ ../typing-extensions-latest"

printf "\n\nINSTALLED DEPENDENCIES ARE:\n\n"
uv pip list

uv run --no-project pytest

mypy:
name: stubtest & mypyc tests
Expand All @@ -239,20 +243,20 @@ jobs:
with:
path: typing-extensions-latest
persist-credentials: false
- name: Install mypy test requirements
- name: Run tests with typing_extensions main branch
working-directory: mypy
run: |
set -x
cd mypy
uv venv .venv

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: cd mypy; uv pip install "typing-extensions @ ../typing-extensions-latest"
- name: List all installed dependencies
run: cd mypy; uv pip freeze
- name: Run stubtest & mypyc tests
run: |
cd mypy; uv run --no-project pytest -n 2 ./mypy/test/teststubtest.py ./mypyc/test/test_run.py ./mypyc/test/test_external.py
uv pip install -e "typing_extensions @ ../typing-extensions-latest"

printf "\n\nINSTALLED DEPENDENCIES ARE:\n\n"
uv pip list

uv run --no-project pytest -n 2 ./mypy/test/teststubtest.py ./mypyc/test/test_run.py ./mypyc/test/test_external.py

cattrs:
name: cattrs tests
Expand All @@ -275,14 +279,17 @@ jobs:
with:
path: typing-extensions-latest
persist-credentials: false
- name: Add local version of typing_extensions as a dependency
run: cd cattrs; uv add --editable ../typing-extensions-latest
- name: Install test dependencies
run: cd cattrs; uv sync --group test --all-extras
- name: List installed dependencies
run: cd cattrs; uv pip list
- name: Run tests
run: cd cattrs; uv run pytest tests
- name: Run tests with typing_extensions main branch
working-directory: cattrs
run: |
uv add --editable ../typing-extensions-latest
uv sync --group test --all-extras

printf "\n\nINSTALLED DEPENDENCIES ARE:\n\n"
uv pip list
printf "\n\n"

uv run pytest tests
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we know uv run won't install a different version of typing-extensions?

Copy link
Member Author

@AlexWaygood AlexWaygood Aug 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The uv add command a few lines above modifies the pyproject.toml file to specify that the project depends on an editable install of our checkout of the typing_extensions main branch. So if uv did an implicit sync as part of the uv run command (which you're right, it often does), all it would do as part of that sync is check that the editable install of typing_extensions in the virtual environment points to the directory specified in the pyproject.toml file


sqlalchemy:
name: sqlalchemy tests
Expand Down Expand Up @@ -310,12 +317,14 @@ jobs:
with:
path: typing-extensions-latest
persist-credentials: false
- name: Run sqlalchemy tests
- name: Run sqlalchemy tests with typing_extensions main branch
working-directory: sqlalchemy
run: |
cd sqlalchemy
uvx --with setuptools tox -e github-nocext \
--force-dep "typing-extensions @ file://$(pwd)/../typing-extensions-latest" \
-- -q --nomemory --notimingintensive
set -x

uvx \
--with=setuptools \
tox -e github-nocext --force-dep="typing-extensions @ file://$(pwd)/../typing-extensions-latest" -- -q --nomemory --notimingintensive


litestar:
Expand All @@ -339,9 +348,21 @@ jobs:
with:
path: typing-extensions-latest
persist-credentials: false
- name: Run litestar tests
run: uv run --with=../typing-extensions-latest -- python -m pytest tests/unit/test_typing.py tests/unit/test_dto
- name: Run litestar tests with typing_extensions main branch
working-directory: litestar
run: |
# litestar's python-requires means pdm won't let us add typing-extensions-latest
# as a requirement unless we do this
sed -i 's/^requires-python = ">=3.8/requires-python = ">=3.9/' pyproject.toml

uv add --editable ../typing-extensions-latest
uv sync

printf "\n\nINSTALLED DEPENDENCIES ARE:\n\n"
uv pip list
printf "\n\n"

uv run python -m pytest tests/unit/test_typing.py tests/unit/test_dto

create-issue-on-failure:
name: Create an issue if daily tests failed
Expand Down
Loading