comparison contrib/testparseutil.py @ 43091:127cc1f72e70

py3: stop normalizing .encode()/.decode() arguments to unicode Now that we don't byte transform string literals, we no longer need this transform. While we're here, we also drop some superfluous u'' prefix in existing callers. Differential Revision: https://phab.mercurial-scm.org/D7011
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 06 Oct 2019 17:27:51 -0400
parents 2372284d9457
children 70d42e2ad9b4
comparison
equal deleted inserted replaced
43090:1f339b503a40 43091:127cc1f72e70
47 return s.encode('latin1') 47 return s.encode('latin1')
48 48
49 def sysstr(s): 49 def sysstr(s):
50 if isinstance(s, builtins.str): 50 if isinstance(s, builtins.str):
51 return s 51 return s
52 return s.decode(u'latin-1') 52 return s.decode('latin-1')
53 53
54 def opentext(f): 54 def opentext(f):
55 return open(f, 'r') 55 return open(f, 'r')
56 56
57 57