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
support.transient_internet() doesn't catch connection refused errors #66786
Comments
This issue is similar to bpo-22289. ====================================================================== Traceback (most recent call last):
File "/opt/python/3.x.langa-ubuntu/build/Lib/urllib/request.py", line 1399, in ftp_open
fw = self.connect_ftp(user, passwd, host, port, dirs, req.timeout)
File "/opt/python/3.x.langa-ubuntu/build/Lib/urllib/request.py", line 1445, in connect_ftp
dirs, timeout)
File "/opt/python/3.x.langa-ubuntu/build/Lib/urllib/request.py", line 2243, in __init__
self.init()
File "/opt/python/3.x.langa-ubuntu/build/Lib/urllib/request.py", line 2249, in init
self.ftp.connect(self.host, self.port, self.timeout)
File "/opt/python/3.x.langa-ubuntu/build/Lib/ftplib.py", line 153, in connect
source_address=self.source_address)
File "/opt/python/3.x.langa-ubuntu/build/Lib/socket.py", line 655, in create_connection
raise err
File "/opt/python/3.x.langa-ubuntu/build/Lib/socket.py", line 646, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_urllib2net.py", line 226, in _test_urls
f = urlopen(url, req, TIMEOUT)
File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_urllib2net.py", line 33, in wrapped
return _retry_thrice(func, exc, *args, **kwargs)
File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_urllib2net.py", line 29, in _retry_thrice
raise last_exc
File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_urllib2net.py", line 23, in _retry_thrice
return func(*args, **kwargs)
File "/opt/python/3.x.langa-ubuntu/build/Lib/urllib/request.py", line 463, in open
response = self._open(req, data)
File "/opt/python/3.x.langa-ubuntu/build/Lib/urllib/request.py", line 481, in _open
'_open', req)
File "/opt/python/3.x.langa-ubuntu/build/Lib/urllib/request.py", line 441, in _call_chain
result = func(*args)
File "/opt/python/3.x.langa-ubuntu/build/Lib/urllib/request.py", line 1417, in ftp_open
raise exc.with_traceback(sys.exc_info()[2])
File "/opt/python/3.x.langa-ubuntu/build/Lib/urllib/request.py", line 1399, in ftp_open
fw = self.connect_ftp(user, passwd, host, port, dirs, req.timeout)
File "/opt/python/3.x.langa-ubuntu/build/Lib/urllib/request.py", line 1445, in connect_ftp
dirs, timeout)
File "/opt/python/3.x.langa-ubuntu/build/Lib/urllib/request.py", line 2243, in __init__
self.init()
File "/opt/python/3.x.langa-ubuntu/build/Lib/urllib/request.py", line 2249, in init
self.ftp.connect(self.host, self.port, self.timeout)
File "/opt/python/3.x.langa-ubuntu/build/Lib/ftplib.py", line 153, in connect
source_address=self.source_address)
File "/opt/python/3.x.langa-ubuntu/build/Lib/socket.py", line 655, in create_connection
raise err
File "/opt/python/3.x.langa-ubuntu/build/Lib/socket.py", line 646, in create_connection
sock.connect(sa)
urllib.error.URLError: <urlopen error ftp error: ConnectionRefusedError(111, 'Connection refused')> http://buildbot.python.org/all/builders/AMD64%20Ubuntu%20LTS%203.x/builds/5026/steps/test/logs/stdio |
LGTM. Perhaps it can be committed with a revised version of the patch for bpo-22289? |
New changeset 76ef82ec80a7 by Berker Peksag in branch '3.4': New changeset 9c35973829e6 by Berker Peksag in branch 'default': |
Thanks for the review, Ned. I didn't combine the patch with bpo-22289, because I couldn't reproduce that failure easily. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: