Skip to content

Commit 2ff6b7b

Browse files
authored
ci: pin pyproject2conda==0.22.1 to work around 0.23.0 regression (#878)
* ci: pin pyproject2conda==0.22.1 in check-environment-yml The check-environment-yml job does `pip install pyproject2conda` with no version constraint, so each CI run grabs the latest release from PyPI. pyproject2conda 0.23.0 was published on 2026-04-29 and regressed with: AttributeError: 'CondaRequirement' object has no attribute 'channel' raised from `_normalized_requirements._iter_parts` during the call to `pyproject2conda yaml ...`. This breaks the job for every PR opened since 2026-04-29, regardless of whether the PR touches pyproject.toml or environment.yml. Pin the CI install to v0.22.1 to match the rev already pinned for the local prek hook in .pre-commit-config.yaml. The two should be bumped together once a fixed pyproject2conda release is available. Made-with: Cursor * ci: widen pyproject2conda pin to >=0.22.1,<0.23 Replaces the strict ==0.22.1 pin with a range pin so a hypothetical 0.22.x patch backport can ship without a workflow edit, while still excluding the 0.23.x line that broke us. Also drops the release date from the inline comment (the version identifier 0.23.0 is the durable reference; git blame recovers the date) and expands the explanation of the failure mode for future readers. Made-with: Cursor
1 parent deb8774 commit 2ff6b7b

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,15 @@ jobs:
4949
with:
5050
python-version: "3.12"
5151
- name: Install pyproject2conda
52-
run: pip install pyproject2conda
52+
# Pinned to the 0.22.x line to match the local prek hook rev (v0.22.1).
53+
# 0.23.0 introduced a regression:
54+
# `AttributeError: 'CondaRequirement' object has no attribute 'channel'`
55+
# raised from `_iter_parts` during `__hash__` of any conda requirement,
56+
# so any invocation that processes conda deps fails immediately.
57+
# The upper bound allows a hypothetical 0.22.x patch backport while
58+
# excluding 0.23.x. Bump in lockstep with the .pre-commit-config.yaml
59+
# rev once a fixed release is available.
60+
run: pip install "pyproject2conda>=0.22.1,<0.23"
5361
- name: Regenerate environment.yml (same args as local prek hook config)
5462
run: |
5563
pyproject2conda yaml -e dev -o /tmp/environment.generated.yml -n CausalPy \

0 commit comments

Comments
 (0)