( )⚙ D8089 py3: __repr__ needs to return str, not bytes

This is an archive of the discontinued Mercurial Phabricator instance.

py3: __repr__ needs to return str, not bytes
ClosedPublic

Authored by spectral on Feb 6 2020, 1:24 PM.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

spectral created this revision.Feb 6 2020, 1:24 PM
marmoute accepted this revision.Feb 6 2020, 2:46 PM
marmoute added a subscriber: marmoute.

looks good.

mharbison72 added inline comments.
mercurial/bundle2.py
1018

Aren't self.__class__.__module__ and self.__class__.__name__ str?

This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.
spectral added inline comments.Feb 6 2020, 6:56 PM
mercurial/bundle2.py
1018

Yep, so this instance fails for other reasons as well. Sigh. I've sent a followup (D8091). This may cause output like <foo object at 0xabcd1234; id: b'id'; type: b'type'; mandatory: True>.

I didn't actually test most of these, obviously :P I just did a grep for repr returning bytes...