-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implement PubGrub for pip resolver? #8203
Comments
This would be a good place to lay out (or link to an explanation of): what would be the benefit of adding a PubGrub implementation? And we don't know how long it would take, and whether it would change the ResolveLib API. So how long would it take to do a little investigation and get an estimate? |
don't know much about the pip internals, but fwiw I modified mixology for compatibility with |
FTR, the bigger issue for using mixology in pip's context is the design of mixology's |
I believe most of those things that cannot be implemented trivially are also blockers to implementing PubGrub for Python packaging in general. Much of the rich version arithmetic stuff in Mixology involves semver assumptions, which Python packaging does not enforce. This is fine for Poetry, but not more generic tools such as pip. |
Are there Specifier counter examples where mixology would break/give unwanted results? the >>> from packaging.specifiers import SpecifierSet
>>> specifier = SpecifierSet("~=1.0.0rc1") & SpecifierSet("!=1.0.3")
<SpecifierSet('!=1.0.3,~=1.0.0rc1')>
>>> from pipgrip.libs.semver import parse_constraint
>>> versions = parse_constraint(str(specifier))
<VersionUnion >=1.0.0rc1,<1.0.3 || >1.0.3,<1.1.0>
>>> from pipgrip.libs.mixology.package import Package
>>> package = Package('wheel')
Package("wheel")
>>> from pipgrip.libs.mixology.constraint import Constraint
>>> constraint = Constraint(package, versions)
>>> str(constraint)
'wheel (>=1.0.0rc1,<1.0.3 || >1.0.3,<1.1.0)' |
@ddelange I think the key point here is that mixology doesn't conform to PEP 440, so it's not suitable for pip. Here's an example - I completely concede that it's an edge case (projects don't typically use epochs) but pip is committed to implementing the standards, so we have to handle cases like this:
Maybe things like this can be worked around, but that's why "working out how to integrate mixology" is a blocker. |
I just spoke with Pradyun and we found:
Therefore I am closing this issue, but @pradyunsg @uranusjr could you please ensure there are open issues within resolvelib for any specific desired features that we'd be copying/borrowing from PubGrub? Thank you. |
Per conversation in a meeting today (will link once notes are up), we are now finding in our error messages disentangling work that we're rediscovering needs/features that are in PubGrub. Thus, we are discussing whether we should add a PubGrub implementation to pip (or ResolveLib).
Originally posted by @uranusjr in #7406 (comment)
The text was updated successfully, but these errors were encountered: