Open loewenheim opened 11 months ago
@loewenheim Have you been able to reproduce this with a recent release of twine? If possible, please provide a log of the failing process passing --verbose
to twine for some more details.
Hi, apologies for the late response. It took us a while to be able to test this with a newer twine
version. This is a similar failure with version 4.0.2 on a different repo:
2024-03-13T15:03:35.9293408Z STDOUT: twine: Uploading distributions to https://upload.pypi.org/legacy/
2024-03-13T15:03:35.9296587Z twine: Uploading
2024-03-13T15:03:35.9300598Z twine: sentry_ophio-0.2.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
2024-03-13T15:03:35.9305575Z twine:
2024-03-13T15:03:35.9309917Z 0% ���������������������������������������� 0.0/4.4 MB � --:-- � ?
2024-03-13T15:03:35.9313058Z 4% ���������������������������������������� 0.2/4.4 MB � 00:01 � 9.6 MB/s
2024-03-13T15:03:35.9316749Z 90% ���������������������������������������� 4.0/4.4 MB � 00:01 � 31.1 MB/s
2024-03-13T15:03:35.9320145Z 100% ���������������������������������������� 4.4/4.4 MB � 00:00 � 29.5 MB/s
[The last line repeats about 5000 times]
2024-03-13T15:03:36.4812361Z twine:
2024-03-13T15:03:36.4812568Z
2024-03-13T15:03:36.4812772Z
2024-03-13T15:03:36.4813118Z STDERR:twine: Traceback (most recent call last):
2024-03-13T15:03:36.4813824Z twine: File "/venv/lib/python3.9/site-packages/urllib3/connectionpool.py", line 793, in urlopen
2024-03-13T15:03:36.4814117Z twine: response = self._make_request(
2024-03-13T15:03:36.4814851Z twine: File "/venv/lib/python3.9/site-packages/urllib3/connectionpool.py", line 537, in _make_request
2024-03-13T15:03:36.4815145Z twine: response = conn.getresponse()
2024-03-13T15:03:36.4815816Z twine: File "/venv/lib/python3.9/site-packages/urllib3/connection.py", line 466, in getresponse
2024-03-13T15:03:36.4816296Z twine: httplib_response = super().getresponse()
2024-03-13T15:03:36.4816772Z twine: File "/usr/lib/python3.9/http/client.py", line 1347, in getresponse
2024-03-13T15:03:36.4817011Z twine: response.begin()
2024-03-13T15:03:36.4817447Z twine: File "/usr/lib/python3.9/http/client.py", line 307, in begin
2024-03-13T15:03:36.4817808Z twine: version, status, reason = self._read_status()
2024-03-13T15:03:36.4818266Z twine: File "/usr/lib/python3.9/http/client.py", line 268, in _read_status
2024-03-13T15:03:36.4818746Z twine: line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
2024-03-13T15:03:36.4819148Z twine: File "/usr/lib/python3.9/socket.py", line 704, in readinto
2024-03-13T15:03:36.4819441Z twine: return self._sock.recv_into(b)
2024-03-13T15:03:36.4819853Z twine: File "/usr/lib/python3.9/ssl.py", line 1241, in recv_into
2024-03-13T15:03:36.4820154Z twine: return self.read(nbytes, buffer)
2024-03-13T15:03:36.4820524Z twine: File "/usr/lib/python3.9/ssl.py", line 1099, in read
2024-03-13T15:03:36.4820850Z twine: return self._sslobj.read(len, buffer)
2024-03-13T15:03:36.4821274Z twine: ConnectionResetError: [Errno 104] Connection reset by peer
2024-03-13T15:03:36.4821486Z twine:
2024-03-13T15:03:36.4822096Z twine: During handling of the above exception, another exception occurred:
2024-03-13T15:03:36.4822302Z twine:
2024-03-13T15:03:36.4822603Z twine: Traceback (most recent call last):
2024-03-13T15:03:36.4823270Z twine: File "/venv/lib/python3.9/site-packages/requests/adapters.py", line 486, in send
2024-03-13T15:03:36.4823532Z twine: resp = conn.urlopen(
2024-03-13T15:03:36.4824211Z twine: File "/venv/lib/python3.9/site-packages/urllib3/connectionpool.py", line 847, in urlopen
2024-03-13T15:03:36.4824496Z twine: retries = retries.increment(
2024-03-13T15:03:36.4825155Z twine: File "/venv/lib/python3.9/site-packages/urllib3/util/retry.py", line 470, in increment
2024-03-13T15:03:36.4825520Z twine: raise reraise(type(error), error, _stacktrace)
2024-03-13T15:03:36.4826153Z twine: File "/venv/lib/python3.9/site-packages/urllib3/util/util.py", line 38, in reraise
2024-03-13T15:03:36.4826444Z twine: raise value.with_traceback(tb)
2024-03-13T15:03:36.4827226Z twine: File "/venv/lib/python3.9/site-packages/urllib3/connectionpool.py", line 793, in urlopen
2024-03-13T15:03:36.4827526Z twine: response = self._make_request(
2024-03-13T15:03:36.4828239Z twine: File "/venv/lib/python3.9/site-packages/urllib3/connectionpool.py", line 537, in _make_request
2024-03-13T15:03:36.4828531Z twine: response = conn.getresponse()
2024-03-13T15:03:36.4829176Z twine: File "/venv/lib/python3.9/site-packages/urllib3/connection.py", line 466, in getresponse
2024-03-13T15:03:36.4829518Z twine: httplib_response = super().getresponse()
2024-03-13T15:03:36.4829980Z twine: File "/usr/lib/python3.9/http/client.py", line 1347, in getresponse
2024-03-13T15:03:36.4830224Z twine: response.begin()
2024-03-13T15:03:36.4830650Z twine: File "/usr/lib/python3.9/http/client.py", line 307, in begin
2024-03-13T15:03:36.4831006Z twine: version, status, reason = self._read_status()
2024-03-13T15:03:36.4831474Z twine: File "/usr/lib/python3.9/http/client.py", line 268, in _read_status
2024-03-13T15:03:36.4831949Z twine: line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
2024-03-13T15:03:36.4832353Z twine: File "/usr/lib/python3.9/socket.py", line 704, in readinto
2024-03-13T15:03:36.4832646Z twine: return self._sock.recv_into(b)
2024-03-13T15:03:36.4833059Z twine: File "/usr/lib/python3.9/ssl.py", line 1241, in recv_into
2024-03-13T15:03:36.4833366Z twine: return self.read(nbytes, buffer)
2024-03-13T15:03:36.4833743Z twine: File "/usr/lib/python3.9/ssl.py", line 1099, in read
2024-03-13T15:03:36.4834069Z twine: return self._sslobj.read(len, buffer)
2024-03-13T15:03:36.4834897Z twine: urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
2024-03-13T15:03:36.4835270Z twine:
2024-03-13T15:03:36.4835761Z twine: During handling of the above exception, another exception occurred:
2024-03-13T15:03:36.4835969Z twine:
2024-03-13T15:03:36.4836269Z twine: Traceback (most recent call last):
2024-03-13T15:03:36.4836605Z twine: File "/venv/bin/twine", line 8, in <module>
2024-03-13T15:03:36.4836844Z twine: sys.exit(main())
2024-03-13T15:03:36.4837437Z twine: File "/venv/lib/python3.9/site-packages/twine/__main__.py", line 33, in main
2024-03-13T15:03:36.4837742Z twine: error = cli.dispatch(sys.argv[1:])
2024-03-13T15:03:36.4838307Z twine: File "/venv/lib/python3.9/site-packages/twine/cli.py", line 123, in dispatch
2024-03-13T15:03:36.4838578Z twine: return main(args.args)
2024-03-13T15:03:36.4839221Z twine: File "/venv/lib/python3.9/site-packages/twine/commands/upload.py", line 198, in main
2024-03-13T15:03:36.4839602Z twine: return upload(upload_settings, parsed_args.dists)
2024-03-13T15:03:36.4840259Z twine: File "/venv/lib/python3.9/site-packages/twine/commands/upload.py", line 142, in upload
2024-03-13T15:03:36.4840570Z twine: resp = repository.upload(package)
2024-03-13T15:03:36.4841190Z twine: File "/venv/lib/python3.9/site-packages/twine/repository.py", line 186, in upload
2024-03-13T15:03:36.4841621Z twine: resp = self._upload(package)
2024-03-13T15:03:36.4842254Z twine: File "/venv/lib/python3.9/site-packages/twine/repository.py", line 172, in _upload
2024-03-13T15:03:36.4842525Z twine: resp = self.session.post(
2024-03-13T15:03:36.4843146Z twine: File "/venv/lib/python3.9/site-packages/requests/sessions.py", line 637, in post
2024-03-13T15:03:36.4843610Z twine: return self.request("POST", url, data=data, json=json, **kwargs)
2024-03-13T15:03:36.4844245Z twine: File "/venv/lib/python3.9/site-packages/requests/sessions.py", line 589, in request
2024-03-13T15:03:36.4844564Z twine: resp = self.send(prep, **send_kwargs)
2024-03-13T15:03:36.4845176Z twine: File "/venv/lib/python3.9/site-packages/requests/sessions.py", line 703, in send
2024-03-13T15:03:36.4845490Z twine: r = adapter.send(request, **kwargs)
2024-03-13T15:03:36.4846099Z twine: File "/venv/lib/python3.9/site-packages/requests/adapters.py", line 501, in send
2024-03-13T15:03:36.4846455Z twine: raise ConnectionError(err, request=request)
2024-03-13T15:03:36.4847288Z twine: requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
2024-03-13T15:03:36.4847501Z twine:
This seems to indicate that the upload itself is totally fine.
My Platform
We upload Python artifacts to pypi.org with Twine as part of our release process. In a significant number of cases, the upload fails with a "connection reset by peer" error. The attached log contains one example of such a failure. twine-log.txt
Platform:
Fastly Debug
N/A
DNS Resolution
Traceroutes / IPv4
Traceroutes / IPv6 (If available)
N/A
HTTPS Requests / IPv4
HTTPS Requests / IPv6 (If available)
N/A
TLS Debug / IPv4
TLS Debug / IPv6 (If available)
N/A
Code of Conduct