-
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
Fetching release info from PyPI using the new API #8326
Comments
This is already being worked on in #5509 |
but not in a way that will deal with metadata-per-artifact, I assume. I'd guess it's unlikely that poetry will ever support this in a meaningful way. |
Well, yeah, it's unlikely for us to switch to per-artifact metadata, since that would break the reproducible builds (unless we redo our locking mechanism completely). |
I have only recently discovered some details of Poetry-PyPI-pytorch interaction, so I may not see the full picture here, but my understanding is as follows: Poetry wants to resolve dependencies for all systems and architectures, preferably without downloading too many wheels just for metadata and without relying on non-standardized mechanisms. I may naively think that with metadata for all artifacts (including system/arch and dependencies) dependencies can be resolved.
Do you mean it's
Perhaps it's easy enough for simpler cases that would cover many problematic libraries? |
I think it's quite infeasible to retro-fit per-artifact metadata onto poetry. People with better ideas are invited to make pull requests, but don't hold your breath! |
Let's consider what the possible solutions are, sticking to The reality we are dealing with is
Currently As I understand, it is infeasible to consider all artifacts and resolve dependencies for all scenarios, ie. replacing How about leaving the dependency resolution mechanism intact and implementing Hopefully this wouldn't be that much work and would fix What do you think? |
That would break our lock file since it would no longer be cross-platform. Personally, I'd rather see Pytorch implement proper markers on their dependencies instead of having some complex logic in their setup script. If current standards are not enough, PyTorch should work with PyPA to amend standards with new markers that allow them to express their needs properly. |
if you only care about resolving dependencies for the current platform then |
Do you mean they should have the same dependencies in all artifacts, with markers, as proposed in pytorch/pytorch#105731 (comment) ?
Sure, pip solves that problem, but poetry has other advantages, like better support for dependency declaration vs locking. |
Yes, exactly. Also, for the parts that are more complex, they can also make their own build backend that follows PEP 517 and wraps setuptools or any other tooling they need. |
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. |
Feature Request
Currently, Poetry uses the deprecated PyPI API to get release info from PyPI (code).
This API returns metadata per release, not per artifact. With multiple artifacts in a release having different metadata, this causes missing dependencies, as in issues
PEP-658 proposed a better API and PyPI implemented it in pypi/warehouse#13649
Now if Poetry switches to the new API, above mentioned issues should disappear with the next release of the library (like pytorch).
The text was updated successfully, but these errors were encountered: