Author: Carl Friedrich Bolz <cfb...@gmx.de> Branch: py3.5 Changeset: r88269:54e6492211f6 Date: 2016-11-09 16:30 +0100 http://bitbucket.org/pypy/pypy/changeset/54e6492211f6/
Log: more uses of fs en/decoding (no tests. I haven't actually found a way to test this on Linux) diff --git a/pypy/module/_cffi_backend/cffi1_module.py b/pypy/module/_cffi_backend/cffi1_module.py --- a/pypy/module/_cffi_backend/cffi1_module.py +++ b/pypy/module/_cffi_backend/cffi1_module.py @@ -42,7 +42,7 @@ w_name = space.wrap(name) module = Module(space, w_name) if path is not None: - module.setdictvalue(space, '__file__', space.wrap(path)) + module.setdictvalue(space, '__file__', space.wrap_fsdecoded(path)) module.setdictvalue(space, 'ffi', space.wrap(ffi)) module.setdictvalue(space, 'lib', space.wrap(lib)) w_modules_dict = space.sys.get('modules') diff --git a/pypy/module/cpyext/api.py b/pypy/module/cpyext/api.py --- a/pypy/module/cpyext/api.py +++ b/pypy/module/cpyext/api.py @@ -1511,7 +1511,7 @@ from pypy.module._cffi_backend import cffi1_module cffi1_module.load_cffi1_module(space, name, path, initptr) -@unwrap_spec(path=str, name=str) +@unwrap_spec(path='fsencode', name=str) def load_extension_module(space, path, name): # note: this is used both to load CPython-API-style C extension # modules (cpyext) and to load CFFI-style extension modules diff --git a/pypy/module/cpyext/modsupport.py b/pypy/module/cpyext/modsupport.py --- a/pypy/module/cpyext/modsupport.py +++ b/pypy/module/cpyext/modsupport.py @@ -47,7 +47,7 @@ state.package_context = None, None if f_path is not None: - dict_w = {'__file__': space.wrap(f_path)} + dict_w = {'__file__': space.wrap_fsdecoded(f_path)} else: dict_w = {} convert_method_defs(space, dict_w, methods, None, w_mod, modname) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit