-
Notifications
You must be signed in to change notification settings - Fork 2.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
Ignore period for version parse #4176
Comments
Hello @aviramha, I totally understand that it is frustrating for end user if they cannot install a package due to malformed metadata. Im my opinion it is not the correct solution to include rules which ignores mistakes made by package maintainers. This would add an extra layer of code complexity, just ignoring things can lead to wrong dependency resolutions and if we start to make an exception for one rule it doesn't take long, we will be asked to add more. Forcing only parts of standardized rules do not lead to more packages that follow these rules. I hope I could get some agreements to my points :) fin swimmer |
Thanks for your response. |
Just coming from #4201. I don't have strong feelings either way but the wildcard suffix on ordered comparisons may not be valid with PEP 440 but they do work with For example
I'm also reading through https://www.python.org/dev/peps/pep-0440/#public-version-identifiers and while it doesn't explicitly say that
I'm sure it is invalid according to PEP 440 but I believe it's ambiguous enough that I feel it may be used a bit in the wild. |
Hey @finswimmer , sorry for being so pushy but I really like to upgrade my poetry and can't until aiopika will release a new version (which will be a major one..).. |
@abn @finswimmer Any feedback? |
Just ran into a bug which I think is related. I cannot use plugins in conjunction with uvicorn. Steps to reproduce:
The offending file:
This is definitely the offending line, as if I change it to Looks like someone else already raised the issue with uvicorn, but frankly I think the issue is bigger than this.
I think this issue is bigger than just frustration that being able to install a particular package. IMHO, this is a violation of the Robustness Principle. Installing two unrelated packages shouldn't brick
|
Here's the critical region: poetry/poetry/repositories/installed_repository.py Lines 254 to 257 in 5278823
specifically this line fails when the metadata loaded from
I'd take a shot at fixing it, but I'm not sure what the implications of skipping an entire This might be a helpful stopgap:
At least it makes clear why it's breaking. I had to inject pdb traces to figure out exactly what package was breaking, since the |
There's also something fruity about Again, Also, this isn't even PEP610 compliant:
Additionally, even if that string is "not compliant", Traceback when
|
FWIW, I am unable to install nltk, which is a fairly significant package. I've submitted a bug report with nltk. Other than reverting to an earlier version, if there any escape hatch for working around this? It's a bit rough to find out you have to switch out package managers because someone upstream commits invalid metadata. |
Is it a 'feature' to make software fragile to user mistakes? Don't ask every single package maintainer to add proper metadata because mistakes happen all the time. Python packaging should be easier than that. |
Any news on this? This is still happening on 1.2.0a2 which means that Poetry is getting closer to becoming useless to a lot of us. The problem with this issue is that punishes the user for a mistake made by an upstream maintainer. That's something that the user has very limited control about. For example, this happened with I generally agree with Poetry taking a hard stance on incompatibilities between versions, but this should raise a warning and not an error. |
We face the same and I think we'll soon migrate to pipenv.. |
I've started a discussion here: https://discuss.python.org/t/pep-440-wildcard-usage-in-comparison-clause/10045/1 |
I'm not sure if this discussion is relevant as none here denies the fact that this validation is correct rather we think it's too strict to push in without any way to bypass it. |
This discussion is highly relevant. First, we can make sure that we Interpret the PEP correct. If we do not, we have to fix the behavior. Second, if we do interpret the PEP correct, the question is why pip doesn't and if there is some action requires by them. As it stands now, poetry is doing right and pip is doing wrong. And that's a problem, because there are packages out there with wrong metadata, which could not be installed by pip as well if they fix it. There is a good chance that the PEP will be changed in a way, that using wildcards is discouraged but possible. If so, poetry can adopt its behavior by beeing still PEP 440 compliant. If poetry decided to implent a PEP it should fully support it, without any bypass. Otherwise a PEP is quite useless. fin swimmer |
if we lack clarity, why adhere to that vague policy and cause issues to many users until everything is clear? |
Just my two cents: Regardless of the reason, or who is at fault, I cannot recommend anyone use a package manager that rejects dependencies because of what might as well be bad grammar. As useful as PEPs are, standard for open-source ecosystems are ultimately set by the community. Whatever the community uses as the standard-that is the standard, and package managers should support it. A package manager that doesn't strive to support anything that pip does is a no-go for new projects. Doubly so for one that's willing to make dependencies unusable over a minor change, without so much as a deprecation warning. |
@aviramha: poetry 1.2, which contains the changes, is still in an alpha phase. It's the best time to discuss new features and behavior based on user feedback. But switching back and forth would be to much work. The topic doesn't touch only poetry as it looks now. So there is a need for a broad er discussion. @bentheiii: Whenever you have rules, there are three ways to handle them:
If to many people ignore them a rule is useless and you can mark them obsolete. Rules in software development are necessary so that different parts can interact with eachother. So any program should follow rules that are relevant for it. Rules are never made to live forever. New knowledge or circumstance can make it neccassery to change rules. It's important to recognize those moments and starting a change. It looks like we are at that point now for PEP 440. |
@finswimmer I don't disagree with any of that, but it seems to me that if the Poetry developers want to introduce this breaking change that will make it unusable for many users, and in a minor version, they should be leading the charge to either change the PEP or modify pip's behaviour. And knowing pip, even if they accept the change it will take many months, even years, with deprecation warnings, to implement. By which time Poetry 1.2.0 will be out and many of us will have to modify all of our projects to use a different package manager. This issue and related have now been opened for many months and the only answer we've got is to talk to the package maintainers. In the meantime, 1.2.0 keeps approaching without any compromise on this topic. If this really is that critical, it should be added to the list for Poetry 2, with plenty of time to engage the slow-moving wheels of Python and pip. |
If you'd like some idea of the impact dropping support for |
Thanks @sdispater !! |
Thanks for the change @sdispater! Do you have an estimate for when we could see a I just ran into this issue when attempting to install a plugin because one of Poetry's own dependencies, Edit: |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Following this issue: #4095
I think for me and many other enthusiastic poetry users is a major blocker for upgrading. I do understand and support validations and standardization but it's going to take a while to get all packages to fit the standards.
Will a PR ignoring such errors based on a flag (maybe by default to begin with) be accepted?
The text was updated successfully, but these errors were encountered: