[pypy-svn] pypy default: revert checkin 088b8b251525
antocuni
commits-noreply at bitbucket.org
Tue Feb 15 18:48:59 CET 2011
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch:
Changeset: r41988:9fa99de64ba1
Date: 2011-02-15 18:48 +0100
http://bitbucket.org/pypy/pypy/changeset/9fa99de64ba1/
Log: revert checkin 088b8b251525 , it breaks tests :-(
diff --git a/pypy/module/zipimport/interp_zipimport.py b/pypy/module/zipimport/interp_zipimport.py
--- a/pypy/module/zipimport/interp_zipimport.py
+++ b/pypy/module/zipimport/interp_zipimport.py
@@ -237,7 +237,6 @@
last_exc = None
for compiled, is_package, ext in ENUMERATE_EXTS:
fname = filename + ext
- co_filename = self.filename + os.path.sep + fname
try:
zip_file = RZipFile(self.filename, 'r')
try:
@@ -254,10 +253,10 @@
pkgpath = None
try:
if compiled:
- return self.import_pyc_file(space, fullname, co_filename,
+ return self.import_pyc_file(space, fullname, fname,
buf, pkgpath)
else:
- return self.import_py_file(space, fullname, co_filename,
+ return self.import_py_file(space, fullname, fname,
buf, pkgpath)
except OperationError, e:
last_exc = e
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
@@ -338,18 +338,6 @@
import zipimport
assert sys.path_hooks.count(zipimport.zipimporter) == 1
- def test_co_filename(self):
- self.writefile('mymodule.py', """
-def fn():
- return fn.func_code.co_filename
-""")
- import os
- import mymodule
- co_filename = mymodule.fn()
- expected = self.zipfile + os.sep + 'mymodule.py'
- assert co_filename == expected
-
-
class AppTestZipimportDeflated(AppTestZipimport):
compression = ZIP_DEFLATED
More information about the Pypy-commit
mailing list