This is an archive of the discontinued Mercurial Phabricator instance.

hgweb: ensure all wsgi environment values are str
ClosedPublic

Authored by indygreg on Mar 8 2018, 8:06 PM.

Details

Summary

Previously, we had a few entries that were bytes on Python 3.
PEP-0333 states that all entries must be the native str type
(bytes on Python 2, str on Python 3).

This required a number of changes to hgweb_mod to unbreak
things on Python 3. I suspect there still may be some regressions.

I'm going to introduce a data structure that represents a parsed
WSGI request in upcoming commits. This will hold bytes and will
allow us to stop using raw literals throughout the WSGI code.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

indygreg created this revision.Mar 8 2018, 8:06 PM
durin42 accepted this revision.Mar 9 2018, 1:55 PM
This revision is now accepted and ready to land.Mar 9 2018, 1:55 PM
This revision was automatically updated to reflect the committed changes.