From 3547ef95effb6f416ae1639d1c279f7abd2ff635 Mon Sep 17 00:00:00 2001 From: Marcus Huewe Date: Tue, 23 Dec 2014 03:49:45 +0100 Subject: [PATCH] Revert "Fix condition for using urllib2 workaround" This reverts commit 2f14cedcff96d7991c97604b94717f1c927c5d4e. Actually, this was meant to fix https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=762825, which was (probably) caused due to the following: - commit 320238350fb5c0026f9538e8bb48de3b155dfab4 introduced a codepath, which should not be needed for python >= 2.7.1 (see also https://hg.python.org/cpython/rev/64287) - this codepath uses the "reset_retry_count" method, which is not present in Debian Jessie's libpython2.7-stdlib: libpython2.7-stdlib_2.7.8-11 backports a patch from python's 2.7.9 branch, which removes the "reset_retry_count" method (https://hg.python.org/cpython/rev/c1edc4e43eb1). This fixes bnc#911080 and github issue #131. --- osc/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osc/conf.py b/osc/conf.py index 2d11e9ce..3239cd81 100644 --- a/osc/conf.py +++ b/osc/conf.py @@ -460,7 +460,7 @@ def _build_opener(url): # workaround for http://bugs.python.org/issue9639 authhandler_class = HTTPBasicAuthHandler - if sys.version_info >= (2, 6, 6) and sys.version_info < (2, 7, 99) \ + if sys.version_info >= (2, 6, 6) and sys.version_info < (2, 7, 1) \ and not 'reset_retry_count' in dir(HTTPBasicAuthHandler): print('warning: your urllib2 version seems to be broken. ' \ 'Using a workaround for http://bugs.python.org/issue9639', file=sys.stderr)