New submission from Jake McGuire <j...@youtube.com>:

As of Python 2.6 you can no longer pass an array to 
httplib.HTTPConnection.send.

Issue1065257 added code to httplib to attempt to determine whether a 
file-like object was passed to certain methods (e.g. send), and to 
stream the data if so.

The patch uses "hasattr(obj, 'read')" as a proxy for "is a file-like 
object".

array.array objects have a method called "read" that is almost entirely 
disanalogous to the "read" method on a file-like object.

Hilarity ensues.

----------
messages: 92015
nosy: jakemcguire
severity: normal
status: open
title: httplib and array do not play together well
type: behavior
versions: Python 2.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6790>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to