Author: Ronan Lamy <[email protected]>
Branch:
Changeset: r97803:099433b77539
Date: 2019-10-17 18:53 +0100
http://bitbucket.org/pypy/pypy/changeset/099433b77539/
Log: Avoid invalid escapes in strings: they cause SyntaxWarnings in py3.6
(#3097)
diff --git a/lib_pypy/pyrepl/historical_reader.py
b/lib_pypy/pyrepl/historical_reader.py
--- a/lib_pypy/pyrepl/historical_reader.py
+++ b/lib_pypy/pyrepl/historical_reader.py
@@ -111,7 +111,7 @@
r.isearch_term = ''
r.dirty = 1
r.push_input_trans(r.isearch_trans)
-
+
class reverse_history_isearch(commands.Command):
def do(self):
@@ -217,7 +217,7 @@
self.isearch_trans = input.KeymapTranslator(
isearch_keymap, invalid_cls=isearch_end,
character_cls=isearch_add_character)
-
+
def select_item(self, i):
self.transient_history[self.historyi] = self.get_unicode()
buf = self.transient_history.get(i)
@@ -302,7 +302,7 @@
reader.ps1 = "h**> "
reader.ps2 = "h/*> "
reader.ps3 = "h|*> "
- reader.ps4 = "h\*> "
+ reader.ps4 = r"h\*> "
while reader.readline():
pass
diff --git a/lib_pypy/pyrepl/keymap.py b/lib_pypy/pyrepl/keymap.py
--- a/lib_pypy/pyrepl/keymap.py
+++ b/lib_pypy/pyrepl/keymap.py
@@ -58,7 +58,7 @@
"'":"'",
'"':'"',
'a':'\a',
- 'b':'\h',
+ 'b':'\b',
'e':'\033',
'f':'\f',
'n':'\n',
diff --git a/lib_pypy/pyrepl/reader.py b/lib_pypy/pyrepl/reader.py
--- a/lib_pypy/pyrepl/reader.py
+++ b/lib_pypy/pyrepl/reader.py
@@ -232,7 +232,7 @@
self.ps1 = "->> "
self.ps2 = "/>> "
self.ps3 = "|.. "
- self.ps4 = "\__ "
+ self.ps4 = r"\__ "
self.kill_ring = []
self.arg = None
self.finished = 0
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit