1 message in org.python.python-bugs-list[ python-Bugs-920573 ] http libraries...
FromSent OnAttachments
SourceForge.netMar 21, 2004 1:15 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[ python-Bugs-920573 ] http libraries throw errors internallyActions...
From:SourceForge.net (nore@sourceforge.net)
Date:Mar 21, 2004 1:15:51 pm
List:org.python.python-bugs-list

Bugs item #920573, was opened at 2004-03-21 10:16 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=920573&group_id=5470

Category: Python Library Group: None Status: Open Resolution: None Priority: 5 Submitted By: Bram Cohen (bram_cohen) Assigned to: Nobody/Anonymous (nobody) Summary: http libraries throw errors internally

Initial Comment: Here's an error which someone just got running BitTorrent -

Exception in thread Thread-2: Traceback (most recent call last): File "/usr/lib/python2.3/threading.py", line 436, in __bootstrap self.run() File "/usr/lib/python2.3/threading.py", line 416, in run self.__target(*self.__args, **self.__kwargs) File "/usr/lib/python2.3/site-packages/BitTorrent/Rerequester.py", line 72, in rerequest h = urlopen(url) File "/usr/lib/python2.3/urllib2.py", line 129, in urlopen return _opener.open(url, data) File "/usr/lib/python2.3/urllib2.py", line 326, in open &#039;_open&#039;, req) File "/usr/lib/python2.3/urllib2.py", line 306, in _call_chain result = func(*args) File "/usr/lib/python2.3/urllib2.py", line 491, in <lambda> lambda r, proxy=url, type=type, meth=self.proxy_open: File "/usr/lib/python2.3/urllib2.py", line 498, in proxy_open if &#039;@&#039; in host: TypeError: iterable argument required

And here&#039;s one which people have been getting *forever*, without it ever having been fixed (I&#039;ve been simply catching and ignoring it) -

Exception in thread Thread-60: Traceback (most recent call last): File "/usr/lib/python2.2/threading.py", line 414, in __bootstrap self.run() File "/usr/lib/python2.2/threading.py", line 402, in run apply(self.__target, self.__args, self.__kwargs) File "/home/zkessin/bin/BitTorrent/Rerequester.py", line 85, in rerequest r = h.read() File "/usr/lib/python2.2/httplib.py", line 1140, in read assert not self._line_consumed and self._line_left AssertionError

Both of the above were caused by very straightforward calls to httplib. I&#039;m fairly certain (especially with the second one) that they&#039;re internal bugs.

I&#039;d like to mention while I&#039;m at it that I&#039;m extremely unhappy with httplib. It&#039;s buggy, blocking, and doesn&#039;t even support timeouts. While it&#039;s good to have a library which supports all the vagaries of http, it would be far better for it to be a simple object which you tell when data was received and it tells you when there&#039;s data to be sent out. That way it could integrate easily into other applications&#039;s event loops. The blocking and buggy nature of httplib has caused me no end of headaches, and I think I&#039;m not the only one.

----------------------------------------------------------------------