New submission from Thomas Herve <[EMAIL PROTECTED]>:

The problematic change is here:
http://svn.python.org/view/python/trunk/Lib/socket.py?rev=62627&r1=61008&r2=62627

The following script shows the problem:


Python 2.6a2+ (trunk:62707, May  4 2008, 19:13:44) 
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib2
>>> r = urllib2.Request('http://pypi.python.org/simple')
>>> f = urllib2.urlopen(r)
>>> f.read()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/therve/.local/lib/python2.6/socket.py", line 326, in read
data = self._sock.recv(rbufsize)
  File "/home/therve/.local/lib/python2.6/httplib.py", line 512, in read
return self._read_chunked(amt)
  File "/home/therve/.local/lib/python2.6/httplib.py", line 548, in
_read_chunked
line = self.fp.readline()
  File "/home/therve/.local/lib/python2.6/socket.py", line 391, in readline
assert buf.tell() == 0
AssertionError
>>>

----------
components: Library (Lib)
messages: 66222
nosy: therve
severity: normal
status: open
title: Recent change in socket.py breaks urllib2
versions: Python 2.6

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2760>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to