[issue22264] Add wsgiref.util.dump_wsgistr & load_wsgistr

Robert Collins report at bugs.python.org
Thu Sep 25 22:43:09 CEST 2014


Robert Collins added the comment:

So I guess the API concern I have is that there are two cases:
 - common spec compliant - US-ASCII + RFC2047
 - dealing with exceptions - UTF8 or otherwise

The former totally makes sense as a codec, though the current email implementation of it isn't quite a codec.

The latter almost wants to be a separate API, which I may propose as part of WSGI for HTTP/2; nevertheless in PEP-3333 its integral to the main API because of the bytes-encoded-as-codepoints-00-ff solution.

So, perhaps:
 - a codec or something looking like it that covers the common case
   this would not permit specifying codecs on decode, for instance [since RFC2047 is self describing].
 - documentation for the uncommon case. *Possibly* a helper function.

----------

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


More information about the Python-bugs-list mailing list