-
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
Have a way to bypass TooManyRedirects #5826
Comments
Experiencing this also, is there any known workarround? |
This comment was marked as outdated.
This comment was marked as outdated.
Same situation for me, can't do |
PyPA status updateThis is a known issue with PyPI that is being addressed. |
I'm facing completely the same situation. |
I've got the same problem for poetry v.1.1.6. |
@olegZastavnyi it is not an issue with poetry. Pypi is facing some issues so it would be fixed in 1-2 hours |
Same problem here. |
@paul-tharun are you sure about this? To me it seems to be an issue related to |
poetry uses a different endpoint than pip/conda. See also https://status.python.org/incidents/lgpr13fy71bk. |
Hi, there's no way to work around a broken PyPI in Poetry as the API endpoints we need returning junk data mean we can't find packages to install. I'm going to close this for now since the relevant PyPI issue has been linked -- this should be resolved shortly according to upstream. |
This is how I have implemented falling back to pip in my CI from poetry:
|
FWIW, PyPI considers the Simple API to be our "Tier 1" API, and we will typically go to great lengths to try not to break that. Any other part of PyPI we consider to be a best effort "Tier 2" endpoint, and we're more willing to have short term breakages if needed. It's not recommended for any sort of critical system to rely on anything but the Simple API. If something needs more than that, we suggest writing a PEP to help promote more pieces into a "Tier 1" endpoint. |
Based on the @dstufft comment, Poetry is better to use tier 1 APIs, right? |
Facing the same issue here:
|
@sithembiso the latest update from pypi: Seems like libs that starts with "p" is still impacted by the issue. |
Thank you @roma-glushko that's very helpful. |
To be clear, I have no idea what data poetry is pulling from the JSON API, so it's entirely possible that the data poetry is using doesn't exist in the simple api. In that case you're kinda stuck picking between:
We're OK with people picking any of those options :) I just wanted to call it out explicitly that if you're able to pick (2) or (3), you're less likely to run into random problems, but if you want to pick (1), that's totally fine. |
Poetry uses the JSON API to avoid the need to download distfiles in order to gather metadata. While we do still have support for the Legacy API in our codebase and we could technically switch PyPI back to using it by default, it would represent a significant regression for Poetry as our use case requires us to have package metadata during solving/locking and not merely at install time like pip. Similarly, it could be possible to fall back to the Legacy API, but I am really not sure that it's a good idea to maintain an untested/rarely used code path for the rare cases that PyPI is down. Falling back would also make Poetry much slower and download more data with seemingly no explanation. Ultimately, I think that if the JSON API is less supported than the Legacy API, upstream should call that out in docs for downstreams first, and we should then reason about what kind of failure is acceptable if there is an issue with PyPI itself.
Per upstream this is not fully resolved yet. |
I'm sure you're aware, but just in case you're not, the metadata in the JSON API is historically very unreliable, and has a lot of caveats to trusting it. It will semi regularly just be missing and/or wrong depending on a number of factors.
The "Tier 1" thing isn't an official designation or anything, just in practice that's how we've typically regarded the APIs. We've primarily been concerned with getting people off of things like the XMLRPC api which are like, "please never use this" and haven't though too hard about it. Some of it is the nature of the JSON API being a wholly unstandardized API, so there's not as good of a sense of what we can change without breaking someone. I do agree we should formalize this though, so I opened pypi/warehouse#11559 :) |
Resolved 🎉The upstream PyPI issue has been resolved, and I can report that our Thanks to the PyPI team work resolving this quickly. ❤️ |
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. |
-vvv
option).Issue
Hello,
Since today, it seems that some packages on pypi return some kind of infinite loop, example:
Such package cause poetry to fail:
But this issue also appear on existing projects with existing lock file, eg:
=> If I simply remove the package from venv, it get broken.
Is the is a way to avoid such behavior? (Currently, all of our CIs are broken because of this package)
Note that pip does not have this behavior:
pip install Werkzeug Looking in indexes: https://pypi.python.org/simple/ Collecting Werkzeug Downloading Werkzeug-2.1.2-py3-none-any.whl (224 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 224.9/224.9 KB 4.5 MB/s eta 0:00:00 Installing collected packages: Werkzeug Successfully installed Werkzeug-2.1.2
The text was updated successfully, but these errors were encountered: