Senthil Kumaran <orsent...@gmail.com> added the comment:

On Sun, Feb 20, 2011 at 10:07:31PM +0000, David Phillips wrote:

> The following code works on python 3.1.3 but fails on Python 3.2rc2
> (r32rc2:88269, Jan 30 2011, 14:30:28). (I run Mac OS X, version
> 10.6.6.)

Is that a real world code? (As in used in production)?  Because,
things have been a bit tightened in 3.2 and it expects data to be
bytes and throws an exception if it is not bytes.

urlencode will output str and you have explicitly encode it to bytes
(Using the value Accept-Encoding response header) before you send the
data to urlopen. The updated docs reflect this change.

----------

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

Reply via email to