mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-42413: socket.timeout is now an alias of TimeoutError (GH-23413)
Signed-off-by: Christian Heimes <christian@python.org>
This commit is contained in:
parent
7ddbaa7a1b
commit
03c8ddd9e9
24 changed files with 72 additions and 62 deletions
|
@ -225,7 +225,7 @@ def transient_internet(resource_name, *, timeout=_NOT_SET, errnos=()):
|
|||
|
||||
def filter_error(err):
|
||||
n = getattr(err, 'errno', None)
|
||||
if (isinstance(err, socket.timeout) or
|
||||
if (isinstance(err, TimeoutError) or
|
||||
(isinstance(err, socket.gaierror) and n in gai_errnos) or
|
||||
(isinstance(err, urllib.error.HTTPError) and
|
||||
500 <= err.code <= 599) or
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue