summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorR. David Murray <rdmurray@bitdance.com>2010-12-23 19:44:49 (GMT)
committerR. David Murray <rdmurray@bitdance.com>2010-12-23 19:44:49 (GMT)
commit25b8cca6e890ba405dfdbe284c929718d86f6aaf (patch)
treec25d9014a89c94fff9672ac8c4373c88f6375526
parenta63c240847780648602bfffc47eb0cf1b3d86799 (diff)
downloadcpython-25b8cca6e890ba405dfdbe284c929718d86f6aaf.zip
cpython-25b8cca6e890ba405dfdbe284c929718d86f6aaf.tar.gz
cpython-25b8cca6e890ba405dfdbe284c929718d86f6aaf.tar.bz2
#4496: remove misleading comment and note that self.handlers is obsolete.
self.handlers is still used in one urllib2 test, but not by the code iteslf.
-rw-r--r--Lib/urllib/request.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py
index 17936ee..a88bc99 100644
--- a/Lib/urllib/request.py
+++ b/Lib/urllib/request.py
@@ -275,8 +275,9 @@ class OpenerDirector:
def __init__(self):
client_version = "Python-urllib/%s" % __version__
self.addheaders = [('User-agent', client_version)]
- # manage the individual handlers
+ # self.handlers is retained only for backward compatibility
self.handlers = []
+ # manage the individual handlers
self.handle_open = {}
self.handle_error = {}
self.process_response = {}
@@ -326,8 +327,6 @@ class OpenerDirector:
added = True
if added:
- # the handlers must work in an specific order, the order
- # is specified in a Handler attribute
bisect.insort(self.handlers, handler)
handler.add_parent(self)