Skip to content

Commit

Permalink
📌 Pin typing-extensions in tests for compatiblity with Python 3.8, di…
Browse files Browse the repository at this point in the history
…rty-equals, Pydantic (#965)
  • Loading branch information
tiangolo committed Jun 4, 2024
1 parent 866d9ec commit 1b275bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
id: cache
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}-v01
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pip install -r requirements-tests.txt
Expand All @@ -60,7 +60,7 @@ jobs:
run: pip install --upgrade "pydantic>=1.10.0,<2.0.0"
- name: Install Pydantic v2
if: matrix.pydantic-version == 'pydantic-v2'
run: pip install --upgrade "pydantic>=2.0.2,<3.0.0"
run: pip install --upgrade "pydantic>=2.0.2,<3.0.0" "typing-extensions==4.6.1"
- name: Lint
# Do not run on Python 3.7 as mypy behaves differently
if: matrix.python-version != '3.7' && matrix.pydantic-version == 'pydantic-v2'
Expand Down
3 changes: 3 additions & 0 deletions requirements-tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ httpx ==0.24.1
# TODO: upgrade when deprecating Python 3.7
dirty-equals ==0.6.0
jinja2 ==3.1.3
# Pin typing-extensions until Python 3.8 is deprecated or the issue with dirty-equals
# is fixed, maybe fixed after dropping Python 3.7 and upgrading dirty-equals
typing-extensions ==4.6.1

0 comments on commit 1b275bd

Please sign in to comment.