[pypy-commit] pypy py3.5: raise a regular SyntaxError
arigo
pypy.commits at gmail.com
Tue Jan 24 12:28:08 EST 2017
Author: Armin Rigo <arigo at tunes.org>
Branch: py3.5
Changeset: r89753:cee6cd3d91ce
Date: 2017-01-24 18:27 +0100
http://bitbucket.org/pypy/pypy/changeset/cee6cd3d91ce/
Log: raise a regular SyntaxError
diff --git a/pypy/interpreter/astcompiler/fstring.py b/pypy/interpreter/astcompiler/fstring.py
--- a/pypy/interpreter/astcompiler/fstring.py
+++ b/pypy/interpreter/astcompiler/fstring.py
@@ -294,13 +294,13 @@
space = astbuilder.space
if not space.config.objspace.fstrings:
- raise oefmt(space.w_SystemError,
- "f-strings have been disabled in this version of pypy "
- "with the translation option --no-objspace-fstrings. "
- "The PyPy team (and CPython) thinks f-strings don't "
- "add any security risks, but we leave it to you to "
- "convince whoever translated this pypy that it is "
- "really the case")
+ raise astbuilder.error(
+ "f-strings have been disabled in this version of pypy "
+ "with the translation option '--no-objspace-fstrings'. "
+ "The PyPy team (and CPython) thinks f-strings don't "
+ "add any security risks, but we leave it to you to "
+ "convince whoever translated this pypy that it is "
+ "really the case", atom_node)
while True:
literal, expr = fstring_find_literal_and_expr(astbuilder, fstr,
More information about the pypy-commit
mailing list