PEP 3333 aims to resolve issues with Python 3 and WSGI.
This page is intended to collect ideas and proposals about WSGI amendments for Python 3.
See also Amendments to WSGI 1.0
- Main discussions occur on the WEB-SIG mailing list
- ‘WSGI on Python 3’ thread
- Graham Dupleton’s 2009 A roadmap for the Python WSGI specification which describe all the proposals extensively (author: Graham
There’s lots of discussions about the type of data (bytes versus unicode) in various places of the specification.
The actual competitors are:
Here is a summary table which outlines the bytes/unicode differences between these proposals.
| WSGI 1.0 | mod_wsgi | Unicode | web3 | flat | |
|---|---|---|---|---|---|
| environ keys | bytes | native | |||
| CGI values | bytes | native | unicode | bytes | native (PEP 383) |
| SCRIPT_NAME, PATH_INFO, QUERY_STRING | bytes | native | unicode (utf-8) | bytes | native (PEP 383) |
| wsgi.url_scheme | bytes | native | unicode | bytes | native |
| wsgi.input | bytes | ||||
| status line | bytes | bytes (or native) | unicode (or bytes) | bytes | bytes |
| headers | bytes | bytes (or native) | unicode or bytes | bytes | bytes |
| response iterable | bytes | bytes (or native) | bytes | bytes | bytes |
| write() callback | bytes | bytes (or native) | (deprecated) | (removed) | (removed) |
Notes:
| [Ochtman2010] | Dirkjan Ochtman, (lost link), 2010 |
| [Ronacher2009] | Armin Ronacher, http://bitbucket.org/ianb/wsgi-peps/src/tip/pep-XXXX.txt, 2009 |
| [McDonough2010] | Chris McDonough, http://github.com/mcdonc/web3/blob/master/web3.rst, 2009 |