Description
What's the problem this feature will solve?
Recently oneof our dependency upgrades were failing with an ResolutionImpossible
error because one of the dependencies dropped support for python3.9
that we still support because it is not EOL, see pallets/click#2975.
The error message in the CI while trying to do a pip install .
was:
ERROR: Cannot install None because these package versions have conflicting dependencies.
The conflict is caused by:
commoncode 0.0.0 depends on click>=8.2.0
The user requested (constraint) click==8.2.1
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip to attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
This was from aboutcode-org/commoncode#86 in the CI: https://dev.azure.com/nexB/commoncode/_build/results?buildId=16314&view=logs&j=71924f90-629a-5f64-5467-4f9bed474c97&t=c06cbbfb-e3aa-54a3-c24d-b2d0a8d1a23f
It would have been helpful if python version constraints (from the package versions) are also displayed in the
error message which makes it much easier to understand the actual reason of failure in resolution. Because the conflict is caused by
message does help to pin it down, but still seems like pip is wrong somehow as the version constraints do not seem to be conflicting, but the python version is unsupported,
Describe the solution you'd like
Improve the ResolutionImpossible so show the python version constraints which causes the ResolutionImpossible error.
I would be happy to try and contribute this fix if you think it's a good idea.
Alternative Solutions
Show something in the ResolutionImpossible error message which points to the unsupported python version as the cause.
Additional context
https://dev.azure.com/nexB/commoncode/_build/results?buildId=16314&view=logs&j=71924f90-629a-5f64-5467-4f9bed474c97&t=c06cbbfb-e3aa-54a3-c24d-b2d0a8d1a23f
aboutcode-org/commoncode#86
Code of Conduct
- I agree to follow the PSF Code of Conduct.