-vvv option).My constraints aren't resolving.
A rough look at my dependency tree
"C~=0.2.0dev16" via setup.pyPoetry complains that it cannot resolve B's dependency on C
[SolverProblemError]
Because B (0.7.5) depends on C(>=0.2.0,<0.3.0) which doesn't match any versions, B is forbidden.
So, because no versions of B match >0.7.5,<0.8.0
and A depends on B (^0.7.5), version solving failed.
I traced the problem down into semver/__init__.py:parse_single_constraint where the constraint
~=0.2.0dev16>=0.2.0,<0.3.0In contrast, the constraint
~=2.0.dev0>=2.0.dev0,<3.0.0The problem seems to be
if precision == 2:
low = version
high = version.stable.next_major
else:
low = Version(version.major, version.minor, 0)
high = version.stable.next_minor
where if the precision is 1 or 3, then the pre-release is dropped from low, disqualifying them from resolving the constraint.
I'm assuming we could just do low = Version(version.major, version.minor, 0, pre=".".join(str(p) for p in version.prerelease))?
The part that confuses me is why precision being 1 or 3 gets that else clause.
EDIT: Corrected possible fix for the actual names and types
This line conflicts with PEP440 compatible release semantics.
The false negative test:
https://github.com/sdispater/poetry/commit/c55d55a888538dbe8ae0b650997db6f9ef4d0aa9#diff-20f6d1388627d02d179420d26445d183R65
So as I was digging into this, it appears that ~= semantics are broken. ~=3.5.3 should be VersionRange(Version(3, 5, 3), Version(3, 6, 0), True) instead of VersionRange(Version(3, 5, 0), Version(3, 6, 0), True).
@drunkwcodes is that the problem you are highlighting? I'm leaning towards handling that in a separate issue / PR.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
As a user, this is a bit frustrating for issues to be automatically closed when the problem is unresponsiveness from the maintainers.
Most helpful comment
As a user, this is a bit frustrating for issues to be automatically closed when the problem is unresponsiveness from the maintainers.