D3536: json: reject unicode on py2 as well

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Sat May 12 00:43:57 EDT 2018


indygreg requested changes to this revision.
indygreg added a comment.
This revision now requires changes to proceed.


  `unicode` is not a type on Python 3. I think this should be changed to `(str, pycompat.unicode)`. That will evaluate to `(str, unicode)` on Python 2 and `(str, str)` on Python 3. If you go this route, please rephrase the comment to denote the Python 2 behavior only triggering on `unicode` because of `str == bytes`.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3536

To: martinvonz, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel


More information about the Mercurial-devel mailing list