Skip to content

Commit 977cf3d

Browse files
authored
chore: make virtualenv<21 pin conditional on Python < 3.10 (#72)
Use PEP 508 environment markers to only pin virtualenv<21 for Python versions less than 3.10, as virtualenv 21+ dropped Python 3.8 support. This allows Python 3.10+ to use the latest virtualenv while maintaining compatibility with Python 3.8 and 3.9. Signed-off-by: Jericho Tolentino <68654047+jericht@users.noreply.github.com>
1 parent ec8ec69 commit 977cf3d

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/reusable_prerelease.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
- name: Build
2727
run: |
28-
pip install --upgrade hatch "virtualenv<21"
28+
pip install --upgrade hatch 'virtualenv<21; python_version < "3.10"'
2929
hatch -v build
3030
3131
# A precommit hook into the GitHub Action workflow.

.github/workflows/reusable_publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ jobs:
102102
# Tag must be made before building so the generated _version.py files have the correct version
103103
- name: Build
104104
run: |
105-
pip install --upgrade hatch "virtualenv<21"
105+
pip install --upgrade hatch 'virtualenv<21; python_version < "3.10"'
106106
hatch -v build
107107
108108
# A precommit hook into the GitHub Action workflow.
@@ -210,7 +210,7 @@ jobs:
210210

211211
- name: Install dependencies
212212
run: |
213-
pip install --upgrade hatch "virtualenv<21"
213+
pip install --upgrade hatch 'virtualenv<21; python_version < "3.10"'
214214
pip install --upgrade twine
215215
216216
- name: Build

.github/workflows/reusable_publish_v2.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
104104
- name: Build
105105
run: |
106-
pip install --upgrade hatch "virtualenv<21"
106+
pip install --upgrade hatch 'virtualenv<21; python_version < "3.10"'
107107
hatch -v build
108108
109109
# A precommit hook into the GitHub Action workflow.
@@ -308,7 +308,7 @@ jobs:
308308

309309
- name: Install dependencies
310310
run: |
311-
pip install --upgrade hatch "virtualenv<21"
311+
pip install --upgrade hatch 'virtualenv<21; python_version < "3.10"'
312312
pip install --upgrade twine
313313
314314
- name: Download

.github/workflows/reusable_python_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565

6666
- name: Install Hatch
6767
run: |
68-
pip install --upgrade hatch "virtualenv<21"
68+
pip install --upgrade hatch 'virtualenv<21; python_version < "3.10"'
6969
7070
- name: Run Linting
7171
run: hatch -v run lint

0 commit comments

Comments
 (0)