This is an archive of the discontinued Mercurial Phabricator instance.

py3: more robustly cast UUID to bytes
ClosedPublic

Authored by indygreg on Feb 11 2018, 5:57 PM.

Details

Summary

The UUID type only has str implemented. So we need to cast to
bytes on Python 3.

We need an actual bytes instance here (bytestr won't do) because
the re.escape() later iterates over characters and characters
need to behave like ints, not bytes instances of length 1.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

indygreg created this revision.Feb 11 2018, 5:57 PM
This revision was automatically updated to reflect the committed changes.