Package.satisfies() considers sources more carefully#497
Conversation
|
In the medium term PEP 658 should hopefully be supported by PyPI, and |
moderately. eg this gets written to the lockfile so it's a breaking change there. |
|
We have yet to release lock file 2.0 into the wild, so this is a very convenient time to do it. |
|
still, seems like more effort than it justifies to me - doubly so if this is all liable to be undone by PEP691 in the foreseeable future. If we were starting from scratch I certainly wouldn't want to use |
|
691 is the JSON format and already supported -- I think you mean 658, which is the METADATA file. You're not wrong and your comment in this PR is more than sufficient for future code spelunkers. It was simply an observation that if you wanted to solve this wart, this is an excellent time. |
c820cad to
d539a0b
Compare
|
Kudos, SonarCloud Quality Gate passed! |








Package.satisfies(dependency)has been asking the wrong question about the sources: it doesn't need the sources to be identical, it needs the package source to satisfy the dependency source.These are different mostly because of the confusing handling of pypi and legacy repositories
I've also removed the check on features: it's not wanted by callers of this method in poetry, so it was just getting in the way.
A companion MR in poetry will follow, between them these should fix python-poetry/poetry#6710