Commit 8881de7
committed
Fix Poetry resolution by using
`poetry new` writes `requires-python = ">=X.Y"` (open-ended) into the
generated pyproject.toml. Poetry's resolver then has to satisfy the
project's full declared range, which currently fails:
torchvision requires Python !=3.14.1,>=3.10, so it will not be
installable for Python 3.14.1.
Because no versions of torchvision match >0.27.0,<0.28.0
and torchvision (0.27.0) requires Python !=3.14.1,>=3.10,
torchvision is forbidden.
So, because test-poetry depends on torchvision (^0.27.0), version
solving failed.
3.14.1 falls inside `>=X.Y` but is excluded by torchvision
(pytorch/vision#9307), so no torchvision version is lockable.
Replace `poetry new test_poetry` with `poetry init --python
">=${MATRIX_PYTHON_VERSION},<3.$((... + 1))"` which writes a
narrow range into pyproject.toml directly. For
MATRIX_PYTHON_VERSION=3.11 the project ends up at
">=3.11,<3.12", which excludes 3.14.1 from the declared range,
so torchvision's exclusion no longer applies and resolution
succeeds.
This is also more accurate: the test now reflects the runtime
we actually set up via `conda create python=${MATRIX_PYTHON_VERSION}`,
rather than the open-ended "X.Y+" range `poetry new` defaults to.
Authored with Claude Code.poetry init --python with narrow range1 parent 737cf7a commit 8881de7
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
13 | 18 | | |
| 19 | + | |
| 20 | + | |
14 | 21 | | |
15 | 22 | | |
16 | 23 | | |
| |||
0 commit comments