Author: Mariano Anaya <marianoan...@gmail.com>
Branch: py3.6
Changeset: r91875:095ebf05a700
Date: 2017-07-15 12:41 +0200
http://bitbucket.org/pypy/pypy/changeset/095ebf05a700/

Log:    Basic support for getfilesystemencodeerrors

        Added in Python 3.6: https://docs.python.org/3/library/sys.html#sys.
        getfilesystemencodeerrors

        Basic default support, so it doesn't fail with basic checks.
        Requires proper implementation later on.

diff --git a/pypy/module/sys/__init__.py b/pypy/module/sys/__init__.py
--- a/pypy/module/sys/__init__.py
+++ b/pypy/module/sys/__init__.py
@@ -87,6 +87,7 @@
 
         'getdefaultencoding'    : 'interp_encoding.getdefaultencoding',
         'getfilesystemencoding' : 'interp_encoding.getfilesystemencoding',
+        'getfilesystemencodeerrors': 
'interp_encoding.getfilesystemencodeerrors',
 
         'float_info'            : 'system.get_float_info(space)',
         'int_info'              : 'system.get_int_info(space)',
diff --git a/pypy/module/sys/interp_encoding.py 
b/pypy/module/sys/interp_encoding.py
--- a/pypy/module/sys/interp_encoding.py
+++ b/pypy/module/sys/interp_encoding.py
@@ -48,3 +48,7 @@
     if space.sys.filesystemencoding is None:
         return space.newtext(base_encoding)
     return space.newtext(space.sys.filesystemencoding)
+
+
+def getfilesystemencodeerrors(space):
+    return space.newtext('surrogateescape')
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to