Author: Manuel Jacob <m...@manueljacob.de> Branch: py3.5 Changeset: r90737:978c95116422 Date: 2017-03-17 02:57 +0100 http://bitbucket.org/pypy/pypy/changeset/978c95116422/
Log: Fix filename decoding for zipimport module. diff --git a/pypy/module/imp/importing.py b/pypy/module/imp/importing.py --- a/pypy/module/imp/importing.py +++ b/pypy/module/imp/importing.py @@ -119,7 +119,7 @@ def _prepare_module(space, w_mod, filename, pkgdir): space.sys.setmodule(w_mod) - space.setattr(w_mod, space.newtext('__file__'), space.newtext(filename)) + space.setattr(w_mod, space.newtext('__file__'), space.newfilename(filename)) space.setattr(w_mod, space.newtext('__doc__'), space.w_None) if pkgdir is not None: space.setattr(w_mod, space.newtext('__path__'), diff --git a/pypy/module/zipimport/test/test_zipimport.py b/pypy/module/zipimport/test/test_zipimport.py --- a/pypy/module/zipimport/test/test_zipimport.py +++ b/pypy/module/zipimport/test/test_zipimport.py @@ -431,7 +431,7 @@ z.writestr(zinfo, '') z.close() try: - zipimport.zipimporter(filename) + zipimport.zipimporter(filename).load_module('uu') finally: os.remove(filename) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit