changeset 48911:46b3ecfb16e2

stringutil: remove Python 2 support code Differential Revision: https://phab.mercurial-scm.org/D12314
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 21 Feb 2022 10:53:09 -0700
parents 3681b4c56618
children a0674e916fb6
files mercurial/utils/stringutil.py
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/utils/stringutil.py	Mon Feb 21 10:52:27 2022 -0700
+++ b/mercurial/utils/stringutil.py	Mon Feb 21 10:53:09 2022 -0700
@@ -964,6 +964,4 @@
 def evalpythonliteral(s):
     """Evaluate a string containing a Python literal expression"""
     # We could backport our tokenizer hack to rewrite '' to u'' if we want
-    if pycompat.ispy3:
-        return ast.literal_eval(s.decode('latin1'))
-    return ast.literal_eval(s)
+    return ast.literal_eval(s.decode('latin1'))