Patchwork D3709: py3: replace unicode with type(u'')

login
register
mail settings
Submitter phabricator
Date June 10, 2018, 10:33 a.m.
Message ID <differential-rev-PHID-DREV-e7mrequbvdvaavq66ex7-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/32047/
State Superseded
Headers show

Comments

phabricator - June 10, 2018, 10:33 a.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  unicode is not present on Python 3 and throws NameError because default strings
  on py3 are unicodes.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/win32mbcs.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/hgext/win32mbcs.py b/hgext/win32mbcs.py
--- a/hgext/win32mbcs.py
+++ b/hgext/win32mbcs.py
@@ -127,7 +127,7 @@ 
                          " %s encoding\n") % (_encoding))
 
 def wrapper(func, args, kwds):
-    return basewrapper(func, unicode, encode, decode, args, kwds)
+    return basewrapper(func, type(u''), encode, decode, args, kwds)
 
 
 def reversewrapper(func, args, kwds):