-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
Description
I have a locally-developed package named dandisets-healthstatus
. Its dependencies include pydantic ~= 2.0
and (in an all
extra) dandidav @ git+https://github.com/...
& dandi
(a PyPI package, without any version constraints). dandidav
depends on dandi >= 0.58.2
. The latest version of dandi
on PyPI is 0.59.0.
Unfortunately, what I failed to initially realize was that dandi
currently requires Pydantic 1.x (with the upper-version bound enforced by a dependency of dandi
). Thus, when I tried to install dandisets-healthstatus
with pip install .[all]
, pip correctly failed due to a version conflict, but the packages that it reported as conflicting actually weren't:
ERROR: Cannot install dandisets-healthstatus and dandisets-healthstatus[all]==0.0.0 because these package versions have conflicting dependencies.
The conflict is caused by:
dandisets-healthstatus[all] 0.0.0 depends on dandi; extra == "all"
dandidav 0.0.0 depends on dandi>=0.58.2
If dandiset-healthstatus
's dandi
dependency is omitted from the list of requirements, then installation fails with a more accurate error message:
ERROR: Cannot install dandi, dandidav and dandisets-healthstatus==0.0.0 because these package versions have conflicting dependencies.
The conflict is caused by:
dandisets-healthstatus 0.0.0 depends on pydantic~=2.0
dandi 0.58.2 depends on pydantic>=1.9.0
dandischema 0.8.4 depends on pydantic<2.0 and >=1.8.1
dandisets-healthstatus 0.0.0 depends on pydantic~=2.0
dandi 0.58.2 depends on pydantic>=1.9.0
dandischema 0.8.3 depends on pydantic<2.0 and >=1.8.1
Expected behavior
Pip should have reported that the Pydantic version requirements conflicted rather than the dandi
version requirements.
pip version
23.3.2
Python version
3.11.7
OS
macOS Sonoma 14.2.1
How to Reproduce
git clone https://github.com/dandi/dandisets-healthstatus.git
(I promise it won't bite)cd dandisets-healthstatus
git checkout ea4ebaa6
cd code
- If you are testing this in the future, you may need to restrict the
dandi
requirement insetup.cfg
to<= 0.60.0
. python3 -m venv venv
venv/bin/pip install .[all]
Output
A log of all output from pip install -vvv
can be found at https://gist.github.com/jwodder/cd49394c1dfb2bb1e17a5aa32f5c4a49.
Code of Conduct
- I agree to follow the PSF Code of Conduct.