aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/package_index.py
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/package_index.py')
-rwxr-xr-xsetuptools/package_index.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/setuptools/package_index.py b/setuptools/package_index.py
index 77f5f96e..0ea09bd6 100755
--- a/setuptools/package_index.py
+++ b/setuptools/package_index.py
@@ -194,6 +194,7 @@ def unique_values(func):
return unique_everseen(func(*args, **kwargs))
return wrapper
+
REL = re.compile("""<([^>]*\srel\s*=\s*['"]?([^'">]+)[^>]*)>""", re.I)
# this line is here to fix emacs' cruddy broken syntax highlighting
@@ -894,6 +895,7 @@ class PackageIndex(Environment):
def warn(self, msg, *args):
log.warn(msg, *args)
+
# This pattern matches a character entity reference (a decimal numeric
# references, a hexadecimal numeric reference, or a named reference).
entity_sub = re.compile(r'&(#(\d+|x[\da-fA-F]+)|[\w.:-]+);?').sub
@@ -1059,6 +1061,7 @@ def open_with_auth(url, opener=urllib.request.urlopen):
return fp
+
# adding a timeout to avoid freezing package_index
open_with_auth = socket_timeout(_SOCKET_TIMEOUT)(open_with_auth)