[pypy-commit] pypy py3k: Remove evil hack

rlamy pypy.commits at gmail.com
Tue May 3 14:16:07 EDT 2016


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: py3k
Changeset: r84174:a7070af42caa
Date: 2016-05-03 19:15 +0100
http://bitbucket.org/pypy/pypy/changeset/a7070af42caa/

Log:	Remove evil hack

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
@@ -215,13 +215,6 @@
 MARSHAL_VERSION_FOR_PYC = 2
 
 def get_pyc_magic(space):
-    # XXX CPython testing hack: delegate to the real imp.get_magic
-    if not we_are_translated():
-        if '__pypy__' not in space.builtin_modules:
-            import struct
-            magic = __import__('imp').get_magic()
-            return struct.unpack('<i', magic)[0]
-
     return default_magic
 
 
@@ -272,7 +265,7 @@
     for i in range(len(fname)):
         if fname[i] == '.':
             ext = fname[:i + 1]
-    
+
     result = (pathname[:lastpos] + "__pycache__" + lastsep +
               ext + PYC_TAG + '.pyc')
     return result


More information about the pypy-commit mailing list