[pypy-svn] r15728 - pypy/dist/pypy/module/__builtin__

pedronis at codespeak.net pedronis at codespeak.net
Sat Aug 6 16:11:33 CEST 2005


Author: pedronis
Date: Sat Aug  6 16:11:32 2005
New Revision: 15728

Modified:
   pypy/dist/pypy/module/__builtin__/importing.py
Log:
disabling pyc files for now again, I was getting unexpected from imports:

EOFError: EOF read where object expected



Modified: pypy/dist/pypy/module/__builtin__/importing.py
==============================================================================
--- pypy/dist/pypy/module/__builtin__/importing.py	(original)
+++ pypy/dist/pypy/module/__builtin__/importing.py	Sat Aug  6 16:11:32 2005
@@ -30,6 +30,8 @@
 
 import stat
 
+PYC_ONOFF = False
+
 def info_modtype(space ,filepart):
     """
     calculate whether the .py file exists, the .pyc file exists
@@ -48,7 +50,7 @@
         pyfile_exist = False
     
     pycfile = filepart + ".pyc"    
-    if os.path.exists(pycfile):
+    if PYC_ONOFF and os.path.exists(pycfile):
         pyc_state = check_compiled_module(space, pyfile, pyfile_ts, pycfile)
         pycfile_exists = pyc_state >= 0
         pycfile_ts_valid = pyc_state > 0 and pyfile_exist
@@ -365,9 +367,10 @@
                       w(space.builtin))
     pycode.exec_code(space, w_dict, w_dict) 
 
-    mtime = os.fstat(osfile.fd)[stat.ST_MTIME]
-    cpathname = pathname + 'c'
-    write_compiled_module(space, pycode, cpathname, mtime)
+    if PYC_ONOFF:
+        mtime = os.fstat(osfile.fd)[stat.ST_MTIME]
+        cpathname = pathname + 'c'
+        write_compiled_module(space, pycode, cpathname, mtime)
 
     return w_mod
 



More information about the Pypy-commit mailing list