[issue6790] httplib and array do not play together well

2009-09-28 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Why do you need to give a non-empty body to the FakeSocket? 

Other than that, looks fine.

--

___
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



[issue6790] httplib and array do not play together well

2009-08-27 Thread Jake McGuire

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



[issue6790] httplib and array do not play together well

2009-08-27 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

That method of array.array has been deprecated since 1.5.1 according to
the docs.  Too bad nobody finished the job and removed it.

Perhaps array.array could be special cased in the relevant code until
the method can actually be removed.

--
keywords: +easy
nosy: +r.david.murray
priority:  - normal
stage:  - test needed
versions: +Python 2.7, Python 3.1, Python 3.2

___
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