Commits

Philip Jenvey committed 68ad4df

oops, use importing.PYC_TAG (thanks amaury)

Comments (0)

Files changed (2)

pypy/module/imp/interp_imp.py

 def get_tag(space):
     """get_tag() -> string
     Return the magic tag for .pyc or .pyo files."""
-    version_info = space.sys.get('version_info')
-    major = space.int_w(space.getitem(version_info, space.wrap(0)))
-    minor = space.int_w(space.getitem(version_info, space.wrap(1)))
-    return space.wrap('pypy-%d%d' % (major, minor))
+    return space.wrap(importing.PYC_TAG)
 
 def get_file(space, w_file, filename, filemode):
     if space.is_none(w_file):

pypy/module/imp/test/test_app.py

     def test_get_tag(self):
         import imp
         import sys
-        assert imp.get_tag() == 'pypy-%d%d' % sys.version_info[0:2]
+        assert imp.get_tag() == 'pypy-%d%d' % sys.pypy_version_info[0:2]