Skip to content

Commit f5b7fe8

Browse files
fix: Fix GitHub Actions hatch/virtualenv compatibility (#1140)
## Summary - Fix CI failures caused by incompatibility between hatch and virtualenv versions - Pin hatch to >=1.13.0 to ensure compatibility with latest virtualenv API - Update GitHub Actions to use latest versions (checkout@v4, setup-python@v5) - Add CHROM/ directory to .gitignore for local test data ## Background The error `module 'virtualenv.discovery.builtin' has no attribute 'propose_interpreters'` occurred because: - Virtualenv 20.26.0+ removed the internal `propose_interpreters` method - Older versions of hatch were using this internal API - When GitHub Actions installed the latest virtualenv with an older hatch, they became incompatible ## Test plan - [ ] CI tests pass on this PR - [ ] All Python versions (3.10, 3.11, 3.12) successfully create test environments - [ ] Linting and quality checks pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.1 <noreply@anthropic.com>
1 parent 86ef4be commit f5b7fe8

3 files changed

Lines changed: 15 additions & 14 deletions

File tree

.github/workflows/test.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ jobs:
1717
name: Tests (python 3.10)
1818

1919
steps:
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121
with:
2222
lfs: true
23-
- uses: actions/setup-python@v4
23+
- uses: actions/setup-python@v5
2424
with:
2525
python-version: "3.10"
2626
- name: Install hatch
27-
run: pip install hatch
27+
run: pip install "hatch>=1.13.0"
2828
- name: Install click
2929
run: pip install click!=8.3.0
3030
- name: Run Tests
@@ -36,14 +36,14 @@ jobs:
3636
name: Tests (python 3.11)
3737

3838
steps:
39-
- uses: actions/checkout@v3
39+
- uses: actions/checkout@v4
4040
with:
4141
lfs: true
42-
- uses: actions/setup-python@v4
42+
- uses: actions/setup-python@v5
4343
with:
4444
python-version: "3.11.9"
4545
- name: Install hatch
46-
run: pip install hatch
46+
run: pip install "hatch>=1.13.0"
4747
# NOTE: due to bug: https://github.com/pallets/click/issues/3066
4848
- name: Install click
4949
run: pip install click!=8.3.0
@@ -56,14 +56,14 @@ jobs:
5656
name: Tests (python 3.12)
5757

5858
steps:
59-
- uses: actions/checkout@v3
59+
- uses: actions/checkout@v4
6060
with:
6161
lfs: true
62-
- uses: actions/setup-python@v4
62+
- uses: actions/setup-python@v5
6363
with:
6464
python-version: "3.12"
6565
- name: Install hatch
66-
run: pip install hatch
66+
run: pip install "hatch>=1.13.0"
6767
- name: Install click
6868
run: pip install click!=8.3.0
6969
- name: Run Tests
@@ -75,14 +75,14 @@ jobs:
7575
name: Quality Checks
7676

7777
steps:
78-
- uses: actions/checkout@v3
78+
- uses: actions/checkout@v4
7979
with:
8080
lfs: true
81-
- uses: actions/setup-python@v4
81+
- uses: actions/setup-python@v5
8282
with:
8383
python-version: "3.11.9"
8484
- name: Install hatch
85-
run: pip install hatch
85+
run: pip install "hatch>=1.13.0"
8686
- name: Install click
8787
run: pip install click!=8.3.0
8888
- name: Lint
@@ -93,7 +93,7 @@ jobs:
9393
name: Check PR Title
9494

9595
steps:
96-
- uses: actions/checkout@v3
96+
- uses: actions/checkout@v4
9797
with:
9898
lfs: true
9999
- name: Check PR title

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,3 +223,4 @@ fabric.properties
223223
#VSCode
224224
.vscode/launch.json
225225
.vscode/settings.json
226+
CHROM/

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ classifiers = [
4848
]
4949
dependencies = [
5050
"cattrs >= 23.2.0",
51-
"chardet >= 5.2.0",
51+
"chardet >= 5.2.0, < 6.0.0",
5252
"defusedxml >= 0.7.1",
5353
# NOTE: jsonschema 4.18.0 introduces a serious performance regression, seemingly due to use of new
5454
# referencing library.

0 commit comments

Comments
 (0)