[pypy-commit] pypy py3.5: another case of wrap_fsdecoded
cfbolz
pypy.commits at gmail.com
Mon Nov 21 09:41:15 EST 2016
Author: Carl Friedrich Bolz <cfbolz at gmx.de>
Branch: py3.5
Changeset: r88525:f039aa8f2cce
Date: 2016-11-21 15:39 +0100
http://bitbucket.org/pypy/pypy/changeset/f039aa8f2cce/
Log: another case of wrap_fsdecoded
diff --git a/pypy/interpreter/astcompiler/misc.py b/pypy/interpreter/astcompiler/misc.py
--- a/pypy/interpreter/astcompiler/misc.py
+++ b/pypy/interpreter/astcompiler/misc.py
@@ -20,7 +20,7 @@
If the user has set this warning to raise an error, a SyntaxError will be
raised."""
w_msg = space.wrap(msg)
- w_filename = space.wrap(fn)
+ w_filename = space.wrap_fsdecoded(fn)
w_lineno = space.wrap(lineno)
w_offset = space.wrap(offset)
_emit_syntax_warning(space, w_msg, w_filename, w_lineno, w_offset)
diff --git a/pypy/interpreter/pyparser/error.py b/pypy/interpreter/pyparser/error.py
--- a/pypy/interpreter/pyparser/error.py
+++ b/pypy/interpreter/pyparser/error.py
@@ -30,7 +30,7 @@
'replace')
w_text = space.wrap(text)
if self.filename is not None:
- w_filename = space.fsdecode(space.newbytes(self.filename))
+ w_filename = space.wrap_fsdecoded(self.filename)
return space.newtuple([space.wrap(self.msg),
space.newtuple([w_filename,
space.wrap(self.lineno),
More information about the pypy-commit
mailing list