This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pje
Recipients eric.araujo, ods, pje, r.david.murray, riffm
Date 2011-01-19.16:43:27
SpamBayes Score 7.486139e-07
Marked as misclassified No
Message-id <1295455411.46.0.80571657173.issue10935@psf.upfronthosting.co.za>
In-reply-to
Content
Doesn't matter how unpythonic it is: the spec calls for exact types and has done so for six years already, so it's a bit late to do anything about it.  (And any version of Python that allowed string subclasses was in violation of the spec and therefore buggy.)

In principle, this class could allow non-str objects if and ONLY if they were converted to actual str objects upon receipt -- but they would have to be the *exact* type after this conversion.

If somebody wants to implement that, I have no objection.  But it MUST reject non-basestring input values and values that don't convert to an exact type str.  (IOW, "type(str(x)) is str" must hold.)

To put it another way, the WSGI protocol requires output headers to be of type 'list' where all elements are type 'tuple' and containing two 'str' entries.  The Headers class cannot fulfill this contract if it allows non-conforming input.  So non-conforming input must either be rejected or made to conform.
History
Date User Action Args
2011-01-19 16:43:31pjesetrecipients: + pje, ods, eric.araujo, r.david.murray, riffm
2011-01-19 16:43:31pjesetmessageid: <1295455411.46.0.80571657173.issue10935@psf.upfronthosting.co.za>
2011-01-19 16:43:27pjelinkissue10935 messages
2011-01-19 16:43:27pjecreate