[issue4718] wsgiref package totally broken

Antoine Pitrou report at bugs.python.org
Mon Dec 22 16:37:47 CET 2008


Antoine Pitrou <pitrou at free.fr> added the comment:

> If you want to change to using bytes, you're going to have to take it
> to the Web-SIG and hash out a revision to PEP 333, which at the moment
> requires the use of strings, period.

What was called str in 2.x has become the bytes object in py3k.
What was called unicode in 2.x has become str in py3k.
(roughly)

Given the meaning of the term "string" and its possible acceptions have
dramatically changed between 2.x and py3k, how does this patch violate
the PEP more than any other?

Actually, the PEP says:

        HTTP does not directly support Unicode, and neither does this
        interface. All encoding/decoding must be handled by the
        application; all strings passed to or from the server must be
        standard Python *byte strings*, not Unicode objects.
        [emphasis mine]

So, not accepting bytes in py3k is clearly a violation of the PEP!

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4718>
_______________________________________


More information about the Python-bugs-list mailing list