Bugs item #1152723, was opened at 2005-02-27 02:49 Message generated for change (Comment added) made by jjlee You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1152723&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.4 Status: Open Resolution: None Priority: 5 Submitted By: abbatini (abbatini) Assigned to: Nobody/Anonymous (nobody) Summary: urllib2 dont respect debuglevel in httplib Initial Comment: It is common habit to see http headers: >>> import httplib >>> httplib.HTTPConnection.debuglevel = 1 >>> import urllib >>> feeddata = urllib.urlopen('http://diveintomark.org/xml/atom.xml').read() but this dont work with import urllib2 with python 2.4 In rev 1.57 was intoduced code to AbstractHTTPHandler class that prevent above mentioned construction. Init method always set debuglevel=0 then do_open method always do: h.set_debuglevel(self._debuglevel) after instantiating HTTPConnection class. Regards ---------------------------------------------------------------------- Comment By: John J Lee (jjlee) Date: 2005-05-19 20:40 Message: Logged In: YES user_id=261020 The .set_debuglevel() method allows debugging per-HTTPConnection when using urllib2 (instead of turning on debug prints for *all* HTTPConnection instances). Since this is just turns on some debug prints, I don't see any great need to contort the code and/or confuse people further by attempting to "fix" this. ---------------------------------------------------------------------- Comment By: abbatini (abbatini) Date: 2005-02-27 02:57 Message: Logged In: YES user_id=1227778 of course: # h.set_debuglevel(self._debuglevel) work very well, but i dont know reason this code was introduced, maybe forgotten code since development ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1152723&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com