Author: Manuel Jacob <[email protected]>
Branch: py3k
Changeset: r82587:a3620d381009
Date: 2016-02-27 10:11 +0100
http://bitbucket.org/pypy/pypy/changeset/a3620d381009/
Log: Re-add lone pyc file support in py3k.
This was accidentally removed in 299018381016.
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
@@ -76,6 +76,12 @@
if file_exists(pyfile):
return PY_SOURCE, ".pyw", "U"
+ # The .py file does not exist, check the .pyc file
+ pycfile = filepart + ".pyc"
+ if file_exists(pycfile):
+ # existing .pyc file
+ return PY_COMPILED, ".pyc", "rb"
+
if has_so_extension(space):
so_extension = get_so_extension(space)
pydfile = filepart + so_extension
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit