pypa / twine

Utilities for interacting with PyPI

Home Page:https://twine.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Connection reset by peer when uploading to PyPI

loewenheim opened this issue · comments

Your Environment

Thank you for taking the time to report an issue.

To more efficiently resolve this issue, we'd like to know some basic information about your system and setup.

  1. Your operating system:
    Debian bullseye (by way of the node:14-bullseye docker image)
  2. Version of python you are running:
python --version
Python 3.9.2

3.9.2
3) How did you install twine? Did you use your operating system's package manager or pip or something else?
apt-get
4) Version of twine you have installed (include complete output of):

twine --version
twine version 3.3.0 (pkginfo: 1.4.2, requests: 2.25.1, setuptools: 52.0.0, requests-toolbelt: 0.9.1, tqdm: 4.57.0)
  1. Which package repository are you targeting?
    PyPI

If you're having issues uploading a specific package, you must include a copy of the following:

  • The package's PKG-INFO file
  • A redacted version of your .pypirc file (REMOVE ALL USERNAMES & PASSWORDS BEFORE UPLOADING)

The Issue

Please describe the issue that you are experiencing.
Twine runs as part of our release process. The upload frequently (at least 1/3 of the time) the upload fails with a "connection reset by peer" error. The attached zip file contains the project's PKG-INFO file and the log of one such failing run.

Steps to Reproduce

The problem doesn't occur every time and can't be easily reproduced

Connection reset by peer is a network layer issue. It means some intermediary between you and PyPI is resetting your TCP connection state. This is not a twine bug

@sigmavirus24 would you be open to a PR that adds --retry={int} functionality? (like curl has)