-
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
Poetry Install fails when remote repo sends ConnectionReset #3572
Comments
related to #3219 few of my colleagues are having the same issue, sometimes getting |
Are you still hitting this issue? We also hit issues like this consistently on some of our packages. If you are still hitting it, I forked Poetry a while back to experiment with a change to help with the issues we were hitting with intermittent request failures: https://github.com/abegun/poetry. The change is simply to configure retry logic in the request library to not fail immediately. If you want to try it, would be great to see if this works for others (it is rock solid for myself and teammates who are hitting similar issues.)
I'm not a Poetry dev so the above steps for running a local version of poetry might not be official but have worked for me. One gotcha -ensure you like the active version of python when you do step #2 since the local version of poetry's environment will use that. |
Although the abegun fork is getting behind now, it still can work on the latest version of poetry. You can clone the official poetry, manually apply the patch to Without this patch, |
Can we open this as a PR? I am hitting this same issue. |
poetry 1.2 includes retries, this can be closed |
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
When a Python repo is having issues and sends a Connection Reset during the a fresh poetry install the installation errors and does not retry.
Creating virtualenv package-z2q3sM71-py3.8 in /root/.cache/pypoetry/virtualenvs
Updating dependencies
Resolving dependencies...
ConnectionError
('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
at /usr/local/lib/python3.8/site-packages/requests/adapters.py:498 in send
494│ low_conn.close()
495│ raise
496│
497│ except (ProtocolError, socket.error) as err:
→ 498│ raise ConnectionError(err, request=request)
499│
500│ except MaxRetryError as e:
501│ if isinstance(e.reason, ConnectTimeoutError):
502│ # TODO: Remove this in 3.0.0: see #2811
It would be nice to catch this exception and have a flag to have it retry X amount of times before failing.
The text was updated successfully, but these errors were encountered: