Issue 765456: test zipimport fails (original) (raw)

Issue765456

Created on 2003-07-03 16:42 by robinf1, last changed 2022-04-10 16:09 by admin. This issue is now closed.

Messages (12)
msg16834 - (view) Author: Robin Friedrich (robinf1) Date: 2003-07-03 16:42
Python 2.3b2 build on AIX 4.3.3 Have no clue since zlib and other modules built/tested fine. ./python Lib/test/test_zipimport.py testAFakeZlib (__main__.UncompressedZipImportTestCase) ... ERROR testBadMTime (__main__.UncompressedZipImportTestCase) ... ok testBadMagic (__main__.UncompressedZipImportTestCase) ... ok testBadMagic2 (__main__.UncompressedZipImportTestCase) ... ok testBoth (__main__.UncompressedZipImportTestCase) ... ok testDeepPackage (__main__.UncompressedZipImportTestCase) ... ok testEmptyPy (__main__.UncompressedZipImportTestCase) ... ok testGetData (__main__.UncompressedZipImportTestCase) ... ok testImporterAttr (__main__.UncompressedZipImportTestCase) ... ok testPackage (__main__.UncompressedZipImportTestCase) ... ok testPy (__main__.UncompressedZipImportTestCase) ... ok testPyc (__main__.UncompressedZipImportTestCase) ... ok testAFakeZlib (__main__.CompressedZipImportTestCase) ... ERROR testBadMTime (__main__.CompressedZipImportTestCase) ... ok testBadMagic (__main__.CompressedZipImportTestCase) ... ok testBadMagic2 (__main__.CompressedZipImportTestCase) ... ok testBoth (__main__.CompressedZipImportTestCase) ... ok testDeepPackage (__main__.CompressedZipImportTestCase) ... ok testEmptyPy (__main__.CompressedZipImportTestCase) ... ok testGetData (__main__.CompressedZipImportTestCase) ... ok testImporterAttr (__main__.CompressedZipImportTestCase) ... ok testPackage (__main__.CompressedZipImportTestCase) ... ok testPy (__main__.CompressedZipImportTestCase) ... ok testPyc (__main__.CompressedZipImportTestCase) ... ok ========================================== ============================ ERROR: testAFakeZlib (__main__.UncompressedZipImportTestCase) ------------------------------------------------------- --------------- Traceback (most recent call last): File "Lib/test/test_zipimport.py", line 89, in testAFakeZlib self.doTest(".py", files, "zlib") File "Lib/test/test_zipimport.py", line 65, in doTest file = mod.get_file() AttributeError: 'module' object has no attribute 'get_file' ========================================== ============================ ERROR: testAFakeZlib (__main__.CompressedZipImportTestCase) ------------------------------------------------------- --------------- Traceback (most recent call last): File "Lib/test/test_zipimport.py", line 89, in testAFakeZlib self.doTest(".py", files, "zlib") File "Lib/test/test_zipimport.py", line 65, in doTest file = mod.get_file() AttributeError: 'module' object has no attribute 'get_file' ------------------------------------------------------- --------------- Ran 24 tests in 0.692s FAILED (errors=2) Traceback (most recent call last): File "Lib/test/test_zipimport.py", line 196, in ? test_main() File "Lib/test/test_zipimport.py", line 192, in test_main CompressedZipImportTestCase File "/fads/cn5a/csw/free/Python2.3b2/Lib/test/test_sup port.py", line 259, in run_unittest run_suite(suite, testclass) File "/fads/cn5a/csw/free/Python2.3b2/Lib/test/test_sup port.py", line 246, in run_suite raise TestFailed(msg) test.test_support.TestFailed: errors occurred; run in verbose mode for details
msg16835 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-07-03 18:19
Logged In: YES user_id=33168 Just, any ideas why get_file() doesn't exist? I'll start testing on the snake farm (AIX 4.3.1.0) and let you know if I find anything.
msg16836 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-07-03 19:15
Logged In: YES user_id=33168 The test passes for me on AIX. Robin, did you build from a clean directory?
msg16837 - (view) Author: Just van Rossum (jvr) * (Python triager) Date: 2003-07-04 07:32
Logged In: YES user_id=92689 get_file() not existing might be a symptom of a module existing with a name as used in the test suite, eg. "ziptestmodule". Since the error occurs in a nested package this seems very unlikely. Maybe running test_zipimport.py with -v can help to debug the problem.
msg16838 - (view) Author: Just van Rossum (jvr) * (Python triager) Date: 2003-08-13 14:46
Logged In: YES user_id=92689 Robin, does this test still fail for you?
msg16839 - (view) Author: Richard Townsend (rptownsend) Date: 2003-08-29 07:21
Logged In: YES user_id=200117 I also get this error using Python2.3 (final release) on HP- UX11i
msg16840 - (view) Author: Just van Rossum (jvr) * (Python triager) Date: 2003-08-29 08:43
Logged In: YES user_id=92689 Hm, I seem to be able to reproduce the problem if I remove these lines if "zlib" in sys.modules: del sys.modules["zlib"] from the offending testAFakeZlib method (line 98 and 99 in test_zipimport.py). rptownsend: could you run test_zipimport.py with python -v, and attach the output as a file to this bug? Maybe that gives us a clue as to what is going on.
msg16841 - (view) Author: Richard Townsend (rptownsend) Date: 2003-08-29 12:32
Logged In: YES user_id=200117 Hi Just, Here is the output: capulet:Lib/test > ../../python -v test_zipimport.py # installing zipimport hook import zipimport # builtin # installed zipimport hook # /home/richardt/python.new/Python- Lib/test/../../Lib/site.pyc matches /home/richardt/python.new/Python- Lib/test/../../Lib/site.py import site # precompiled from /home/richardt/python.new/Python- Lib/test/../../Lib/site.pyc # /home/richardt/python.new/Python- Lib/test/../../Lib/os.pyc matches /home/richardt/python.new/Python- Lib/test/../../Lib/os.py import os # precompiled from /home/richardt/python.new/Python- Lib/test/../../Lib/os.pyc import posix # builtin # /home/richardt/python.new/Python- Lib/test/../../Lib/posixpath.pyc matches /home/richardt/python.new/Python- Lib/test/../../Lib/posixpath.py import posixpath # precompiled from /home/richardt/python.new/Python- Lib/test/../../Lib/posixpath.pyc # /home/richardt/python.new/Python- Lib/test/../../Lib/stat.pyc matches /home/richardt/python.new/Python- Lib/test/../../Lib/stat.py import stat # precompiled from /home/richardt/python.new/Python- Lib/test/../../Lib/stat.pyc # /home/richardt/python.new/Python- Lib/test/../../Lib/UserDict.pyc matches /home/richardt/python.new/Python- Lib/test/../../Lib/UserDict.py import UserDict # precompiled from /home/richardt/python.new/Python- Lib/test/../../Lib/UserDict.pyc # /home/richardt/python.new/Python- Lib/test/../../Lib/copy_reg.pyc matches /home/richardt/python.new/Python- Lib/test/../../Lib/copy_reg.py import copy_reg # precompiled from /home/richardt/python.new/Python- Lib/test/../../Lib/copy_reg.pyc # /home/richardt/python.new/Python- Lib/test/../../Lib/types.pyc matches /home/richardt/python.new/Python- Lib/test/../../Lib/types.py import types # precompiled from /home/richardt/python.new/Python- Lib/test/../../Lib/types.pyc import distutils # directory /home/richardt/python.new/Python-2.3/Lib/distutils # /home/richardt/python.new/Python- Lib/distutils/__init__.pyc matches /home/richardt/python.new/Python- Lib/distutils/__init__.py import distutils # precompiled from /home/richardt/python.new/Python- Lib/distutils/__init__.pyc # /home/richardt/python.new/Python-2.3/Lib/distutils/util.pyc matches /home/richardt/python.new/Python- Lib/distutils/util.py import distutils.util # precompiled from /home/richardt/python.new/Python- Lib/distutils/util.pyc # /home/richardt/python.new/Python-2.3/Lib/string.pyc matches /home/richardt/python.new/Python-2.3/Lib/string.py import string # precompiled from /home/richardt/python.new/Python-2.3/Lib/string.pyc # /home/richardt/python.new/Python-2.3/Lib/re.pyc matches /home/richardt/python.new/Python-2.3/Lib/re.py import re # precompiled from /home/richardt/python.new/Python-2.3/Lib/re.pyc # /home/richardt/python.new/Python-2.3/Lib/sre.pyc matches /home/richardt/python.new/Python-2.3/Lib/sre.py import sre # precompiled from /home/richardt/python.new/Python-2.3/Lib/sre.pyc # /home/richardt/python.new/Python-2.3/Lib/sre_compile.pyc matches /home/richardt/python.new/Python- Lib/sre_compile.py import sre_compile # precompiled from /home/richardt/python.new/Python- Lib/sre_compile.pyc import _sre # builtin # /home/richardt/python.new/Python- Lib/sre_constants.pyc matches /home/richardt/python.new/Python- Lib/sre_constants.py import sre_constants # precompiled from /home/richardt/python.new/Python- Lib/sre_constants.pyc # /home/richardt/python.new/Python-2.3/Lib/sre_parse.pyc matches /home/richardt/python.new/Python- Lib/sre_parse.py import sre_parse # precompiled from /home/richardt/python.new/Python-2.3/Lib/sre_parse.pyc # /home/richardt/python.new/Python- Lib/distutils/errors.pyc matches /home/richardt/python.new/Python- Lib/distutils/errors.py import distutils.errors # precompiled from /home/richardt/python.new/Python- Lib/distutils/errors.pyc # /home/richardt/python.new/Python- Lib/distutils/dep_util.pyc matches /home/richardt/python.new/Python- Lib/distutils/dep_util.py import distutils.dep_util # precompiled from /home/richardt/python.new/Python- Lib/distutils/dep_util.pyc # /home/richardt/python.new/Python- Lib/distutils/spawn.pyc matches /home/richardt/python.new/Python- Lib/distutils/spawn.py import distutils.spawn # precompiled from /home/richardt/python.new/Python- Lib/distutils/spawn.pyc # /home/richardt/python.new/Python-2.3/Lib/distutils/log.pyc matches /home/richardt/python.new/Python- Lib/distutils/log.py import distutils.log # precompiled from /home/richardt/python.new/Python- Lib/distutils/log.pyc # /home/richardt/python.new/Python-2.3/Lib/warnings.pyc matches /home/richardt/python.new/Python- Lib/warnings.py import warnings # precompiled from /home/richardt/python.new/Python-2.3/Lib/warnings.pyc # /home/richardt/python.new/Python-2.3/Lib/linecache.pyc matches /home/richardt/python.new/Python- Lib/linecache.py import linecache # precompiled from /home/richardt/python.new/Python-2.3/Lib/linecache.pyc import encodings # directory /home/richardt/python.new/Python- Lib/encodings # /home/richardt/python.new/Python- Lib/encodings/__init__.pyc matches /home/richardt/python.new/Python- Lib/encodings/__init__.py import encodings # precompiled from /home/richardt/python.new/Python- Lib/encodings/__init__.pyc # /home/richardt/python.new/Python-2.3/Lib/codecs.pyc matches /home/richardt/python.new/Python- Lib/codecs.py import codecs # precompiled from /home/richardt/python.new/Python-2.3/Lib/codecs.pyc import _codecs # builtin # /home/richardt/python.new/Python- Lib/encodings/aliases.pyc matches /home/richardt/python.new/Python- Lib/encodings/aliases.py import encodings.aliases # precompiled from /home/richardt/python.new/Python- Lib/encodings/aliases.pyc Python 2.3 (#4, Aug 28 2003, 14:10:33) [C] on hp-ux11 Type "help", "copyright", "credits" or "license" for more information. import marshal # builtin import imp # builtin shl_load /home/richardt/python.new/Python-2.3/build/lib.hp- ux-B.11.11-9000/785-2.3/struct.sl shl_findsym initstruct import struct # dynamically loaded from /home/richardt/python.new/Python-2.3/build/lib.hp-ux- B.11.11-9000/785-2.3/struct.sl shl_load /home/richardt/python.new/Python-2.3/build/lib.hp- ux-B.11.11-9000/785-2.3/time.sl shl_findsym inittime import time # dynamically loaded from /home/richardt/python.new/Python-2.3/build/lib.hp-ux- B.11.11-9000/785-2.3/time.sl import zlib # builtin # /home/richardt/python.new/Python-2.3/Lib/zipfile.pyc matches /home/richardt/python.new/Python-2.3/Lib/zipfile.py import zipfile # precompiled from /home/richardt/python.new/Python-2.3/Lib/zipfile.pyc shl_load /home/richardt/python.new/Python-2.3/build/lib.hp- ux-B.11.11-9000/785-2.3/binascii.sl shl_findsym initbinascii import binascii # dynamically loaded from /home/richardt/python.new/Python-2.3/build/lib.hp-ux- B.11.11-9000/785-2.3/binascii.sl import test # directory /home/richardt/python.new/Python- Lib/test # /home/richardt/python.new/Python- Lib/test/__init__.pyc matches /home/richardt/python.new/Python- Lib/test/__init__.py import test # precompiled from /home/richardt/python.new/Python- Lib/test/__init__.pyc # /home/richardt/python.new/Python- Lib/test/test_support.pyc matches /home/richardt/python.new/Python- Lib/test/test_support.py import test.test_support # precompiled from /home/richardt/python.new/Python- Lib/test/test_support.pyc # /home/richardt/python.new/Python-2.3/Lib/unittest.pyc matches /home/richardt/python.new/Python- Lib/unittest.py import unittest # precompiled from /home/richardt/python.new/Python-2.3/Lib/unittest.pyc # /home/richardt/python.new/Python-2.3/Lib/traceback.pyc matches /home/richardt/python.new/Python- Lib/traceback.py import traceback # precompiled from /home/richardt/python.new/Python- Lib/traceback.pyc # /home/richardt/python.new/Python- Lib/test/test_importhooks.pyc matches /home/richardt/python.new/Python- Lib/test/test_importhooks.py import test.test_importhooks # precompiled from /home/richardt/python.new/Python- Lib/test/test_importhooks.pyc import zlib # previously loaded (zlib) testAFakeZlib (__main__.UncompressedZipImportTestCase) ... ERROR # zipimport: found 2 names in /home/richardt/python.new/Python- Lib/test/junk95142.zip # /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestmodule.pyc has bad mtime import ziptestmodule # loaded from Zip /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestmodule.py testBadMTime (__main__.UncompressedZipImportTestCase) ... ok # zipimport: found 2 names in /home/richardt/python.new/Python- Lib/test/junk95142.zip # /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestmodule.pyc has bad magic import ziptestmodule # loaded from Zip /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestmodule.py testBadMagic (__main__.UncompressedZipImportTestCase) ... ok # zipimport: found 1 names in /home/richardt/python.new/Python- Lib/test/junk95142.zip # /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestmodule.pyc has bad magic testBadMagic2 (__main__.UncompressedZipImportTestCase) ... ok # zipimport: found 2 names in /home/richardt/python.new/Python- Lib/test/junk95142.zip import ziptestmodule # loaded from Zip /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestmodule.pyc testBoth (__main__.UncompressedZipImportTestCase) ... ok # zipimport: found 3 names in /home/richardt/python.new/Python- Lib/test/junk95142.zip import ziptestpackage # loaded from Zip /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestpackage/__init__.pyc import ziptestpackage.ziptestpackage2 # loaded from Zip /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestpackage/ziptestpackage2/__i nit__.pyc import ziptestpackage.ziptestpackage2.ziptestmodule # loaded from Zip /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestpackage/ziptestpackage2/zip testmodule.pyc testDeepPackage (__main__.UncompressedZipImportTestCase) ... ok # zipimport: found 1 names in /home/richardt/python.new/Python- Lib/test/junk95142.zip import ziptestmodule # loaded from Zip /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestmodule.py testEmptyPy (__main__.UncompressedZipImportTestCase) ... ok # zipimport: found 1 names in /home/richardt/python.new/Python- Lib/test/junk95142.zip testGetData (__main__.UncompressedZipImportTestCase) ... ok # zipimport: found 1 names in /home/richardt/python.new/Python- Lib/test/junk95142.zip import ziptestmodule # loaded from Zip /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestmodule.py testImport_WithStuff (__main__.UncompressedZipImportTestCase) ... ok # zipimport: found 2 names in /home/richardt/python.new/Python- Lib/test/junk95142.zip import ziptestmodule # loaded from Zip /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestmodule.pyc testImporterAttr (__main__.UncompressedZipImportTestCase) ... ok # zipimport: found 2 names in /home/richardt/python.new/Python- Lib/test/junk95142.zip import ziptestpackage # loaded from Zip /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestpackage/__init__.pyc import ziptestpackage.ziptestmodule # loaded from Zip /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestpackage/ziptestmodule.pyc testPackage (__main__.UncompressedZipImportTestCase) ... ok # zipimport: found 1 names in /home/richardt/python.new/Python- Lib/test/junk95142.zip import ziptestmodule # loaded from Zip /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestmodule.py testPy (__main__.UncompressedZipImportTestCase) ... ok # zipimport: found 1 names in /home/richardt/python.new/Python- Lib/test/junk95142.zip import ziptestmodule # loaded from Zip /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestmodule.pyc testPyc (__main__.UncompressedZipImportTestCase) ... ok import zlib # previously loaded (zlib) testAFakeZlib (__main__.CompressedZipImportTestCase) ... ERROR # zipimport: found 2 names in /home/richardt/python.new/Python- Lib/test/junk95142.zip import zlib # previously loaded (zlib) # zipimport: zlib available # /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestmodule.pyc has bad mtime import ziptestmodule # loaded from Zip /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestmodule.py testBadMTime (__main__.CompressedZipImportTestCase) ... ok # zipimport: found 2 names in /home/richardt/python.new/Python- Lib/test/junk95142.zip # /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestmodule.pyc has bad magic import ziptestmodule # loaded from Zip /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestmodule.py testBadMagic (__main__.CompressedZipImportTestCase) ... ok # zipimport: found 1 names in /home/richardt/python.new/Python- Lib/test/junk95142.zip # /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestmodule.pyc has bad magic testBadMagic2 (__main__.CompressedZipImportTestCase) ... ok # zipimport: found 2 names in /home/richardt/python.new/Python- Lib/test/junk95142.zip import ziptestmodule # loaded from Zip /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestmodule.pyc testBoth (__main__.CompressedZipImportTestCase) ... ok # zipimport: found 3 names in /home/richardt/python.new/Python- Lib/test/junk95142.zip import ziptestpackage # loaded from Zip /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestpackage/__init__.pyc import ziptestpackage.ziptestpackage2 # loaded from Zip /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestpackage/ziptestpackage2/__i nit__.pyc import ziptestpackage.ziptestpackage2.ziptestmodule # loaded from Zip /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestpackage/ziptestpackage2/zip testmodule.pyc testDeepPackage (__main__.CompressedZipImportTestCase) ... ok # zipimport: found 1 names in /home/richardt/python.new/Python- Lib/test/junk95142.zip import ziptestmodule # loaded from Zip /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestmodule.py testEmptyPy (__main__.CompressedZipImportTestCase) ... ok # zipimport: found 1 names in /home/richardt/python.new/Python- Lib/test/junk95142.zip testGetData (__main__.CompressedZipImportTestCase) ... ok # zipimport: found 1 names in /home/richardt/python.new/Python- Lib/test/junk95142.zip import ziptestmodule # loaded from Zip /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestmodule.py testImport_WithStuff (__main__.CompressedZipImportTestCase) ... ok # zipimport: found 2 names in /home/richardt/python.new/Python- Lib/test/junk95142.zip import ziptestmodule # loaded from Zip /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestmodule.pyc testImporterAttr (__main__.CompressedZipImportTestCase) ... ok # zipimport: found 2 names in /home/richardt/python.new/Python- Lib/test/junk95142.zip import ziptestpackage # loaded from Zip /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestpackage/__init__.pyc import ziptestpackage.ziptestmodule # loaded from Zip /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestpackage/ziptestmodule.pyc testPackage (__main__.CompressedZipImportTestCase) ... ok # zipimport: found 1 names in /home/richardt/python.new/Python- Lib/test/junk95142.zip import ziptestmodule # loaded from Zip /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestmodule.py testPy (__main__.CompressedZipImportTestCase) ... ok # zipimport: found 1 names in /home/richardt/python.new/Python- Lib/test/junk95142.zip import ziptestmodule # loaded from Zip /home/richardt/python.new/Python- Lib/test/junk95142.zip/ziptestmodule.pyc testPyc (__main__.CompressedZipImportTestCase) ... ok ============================================== ======================== ERROR: testAFakeZlib (__main__.UncompressedZipImportTestCase) ------------------------------------------------------------ ---------- Traceback (most recent call last): File "test_zipimport.py", line 102, in testAFakeZlib self.doTest(".py", files, "zlib") File "test_zipimport.py", line 78, in doTest file = mod.get_file() AttributeError: 'module' object has no attribute 'get_file' ============================================== ======================== ERROR: testAFakeZlib (__main__.CompressedZipImportTestCase) ------------------------------------------------------------ ---------- Traceback (most recent call last): File "test_zipimport.py", line 102, in testAFakeZlib self.doTest(".py", files, "zlib") File "test_zipimport.py", line 78, in doTest file = mod.get_file() AttributeError: 'module' object has no attribute 'get_file' ------------------------------------------------------------ ---------- Ran 26 tests in 0.287s FAILED (errors=2) Traceback (most recent call last): File "test_zipimport.py", line 215, in ? test_main() File "test_zipimport.py", line 211, in test_main CompressedZipImportTestCase File "/home/richardt/python.new/Python- Lib/test/test_support.py", line 262, in run_unittest run_suite(suite, testclass) File "/home/richardt/python.new/Python- Lib/test/test_support.py", line 246, in run_suite raise TestFailed(msg) test.test_support.TestFailed: errors occurred; run in verbose mode for details # clear __builtin__._ # clear sys.path # clear sys.argv # clear sys.ps1 # clear sys.ps2 # clear sys.exitfunc # clear sys.exc_type # clear sys.exc_value # clear sys.exc_traceback # clear sys.last_type # clear sys.last_value # clear sys.last_traceback # clear sys.path_hooks # clear sys.path_importer_cache # clear sys.meta_path # restore sys.stdin # restore sys.stdout # restore sys.stderr # cleanup __main__ # cleanup[1] distutils # cleanup[1] encodings # cleanup[1] site # cleanup[1] distutils.util # cleanup[1] distutils.dep_util # cleanup[1] sre_constants # cleanup[1] re # cleanup[1] _codecs # cleanup[1] test # cleanup[1] zipimport # cleanup[1] warnings # cleanup[1] zipfile # cleanup[1] codecs # cleanup[1] struct # cleanup[1] sre # cleanup[1] signal # cleanup[1] distutils.errors # cleanup[1] marshal # cleanup[1] distutils.spawn # cleanup[1] posix # cleanup[1] encodings.aliases # cleanup[1] exceptions # cleanup[1] sre_parse # cleanup[1] distutils.log # cleanup[1] sre_compile # cleanup[1] _sre # cleanup[1] test.test_importhooks # cleanup[1] test.test_support # cleanup[1] imp # cleanup[1] binascii # cleanup[1] unittest # cleanup[1] string # cleanup[1] time # cleanup[1] traceback # cleanup[1] types # cleanup[1] linecache # cleanup[2] copy_reg # cleanup[2] posixpath # cleanup[2] os.path # cleanup[2] stat # cleanup[2] UserDict # cleanup[2] os # cleanup sys # cleanup __builtin__ # cleanup ints: 11 unfreed ints in 7 out of 108 blocks # cleanup floats capulet:Lib/test > [there aren't any widgets at the bottom of this web page for attaching a file, do they only appear for the originator?]
msg16842 - (view) Author: Shawn Leard (sleard1) Date: 2003-08-29 13:43
Logged In: YES user_id=328879 Below is the output of this problem on Solaris 8 with gcc 3.3.1. vette$ ./python -v Lib/test/test_zipimport.py # installing zipimport hook import zipimport # builtin # installed zipimport hook # /files/local/src/Python-2.3/Lib/site.pyc matches /files/local/src/Python-2.3/Lib/site.py import site # precompiled from /files/local/src/Python-2.3/Lib/site.pyc # /files/local/src/Python-2.3/Lib/os.pyc matches /files/local/src/Python-2.3/Lib/os.py import os # precompiled from /files/local/src/Python-2.3/Lib/os.pyc import posix # builtin # /files/local/src/Python-2.3/Lib/posixpath.pyc matches /files/local/src/Python-2.3/Lib/posixpath.py import posixpath # precompiled from /files/local/src/Python-2.3/Lib/posixpath.pyc # /files/local/src/Python-2.3/Lib/stat.pyc matches /files/local/src/Python-2.3/Lib/stat.py import stat # precompiled from /files/local/src/Python-2.3/Lib/stat.pyc # /files/local/src/Python-2.3/Lib/UserDict.pyc matches /files/local/src/Python-2.3/Lib/UserDict.py import UserDict # precompiled from /files/local/src/Python-2.3/Lib/UserDict.pyc # /files/local/src/Python-2.3/Lib/copy_reg.pyc matches /files/local/src/Python-2.3/Lib/copy_reg.py import copy_reg # precompiled from /files/local/src/Python-2.3/Lib/copy_reg.pyc # /files/local/src/Python-2.3/Lib/types.pyc matches /files/local/src/Python-2.3/Lib/types.py import types # precompiled from /files/local/src/Python-2.3/Lib/types.pyc import distutils # directory /files/local/src/Python-2.3/Lib/distutils # /files/local/src/Python-2.3/Lib/distutils/__init__.pyc matches /files/local/src/Python-2.3/Lib/distutils/__init__.py import distutils # precompiled from /files/local/src/Python-2.3/Lib/distutils/__init__.pyc # /files/local/src/Python-2.3/Lib/distutils/util.pyc matches /files/local/src/Python-2.3/Lib/distutils/util.py import distutils.util # precompiled from /files/local/src/Python-2.3/Lib/distutils/util.pyc # /files/local/src/Python-2.3/Lib/string.pyc matches /files/local/src/Python-2.3/Lib/string.py import string # precompiled from /files/local/src/Python-2.3/Lib/string.pyc # /files/local/src/Python-2.3/Lib/re.pyc matches /files/local/src/Python-2.3/Lib/re.py import re # precompiled from /files/local/src/Python-2.3/Lib/re.pyc # /files/local/src/Python-2.3/Lib/sre.pyc matches /files/local/src/Python-2.3/Lib/sre.py import sre # precompiled from /files/local/src/Python-2.3/Lib/sre.pyc # /files/local/src/Python-2.3/Lib/sre_compile.pyc matches /files/local/src/Python-2.3/Lib/sre_compile.py import sre_compile # precompiled from /files/local/src/Python-2.3/Lib/sre_compile.pyc import _sre # builtin # /files/local/src/Python-2.3/Lib/sre_constants.pyc matches /files/local/src/Python-2.3/Lib/sre_constants.py import sre_constants # precompiled from /files/local/src/Python-2.3/Lib/sre_constants.pyc # /files/local/src/Python-2.3/Lib/sre_parse.pyc matches /files/local/src/Python-2.3/Lib/sre_parse.py import sre_parse # precompiled from /files/local/src/Python-2.3/Lib/sre_parse.pyc # /files/local/src/Python-2.3/Lib/distutils/errors.pyc matches /files/local/src/Python-2.3/Lib/distutils/errors.py import distutils.errors # precompiled from /files/local/src/Python-2.3/Lib/distutils/errors.pyc # /files/local/src/Python-2.3/Lib/distutils/dep_util.pyc matches /files/local/src/Python-2.3/Lib/distutils/dep_util.py import distutils.dep_util # precompiled from /files/local/src/Python-2.3/Lib/distutils/dep_util.pyc # /files/local/src/Python-2.3/Lib/distutils/spawn.pyc matches /files/local/src/Python-2.3/Lib/distutils/spawn.py import distutils.spawn # precompiled from /files/local/src/Python-2.3/Lib/distutils/spawn.pyc # /files/local/src/Python-2.3/Lib/distutils/log.pyc matches /files/local/src/Python-2.3/Lib/distutils/log.py import distutils.log # precompiled from /files/local/src/Python-2.3/Lib/distutils/log.pyc # /files/local/src/Python-2.3/Lib/warnings.pyc matches /files/local/src/Python-2.3/Lib/warnings.py import warnings # precompiled from /files/local/src/Python-2.3/Lib/warnings.pyc # /files/local/src/Python-2.3/Lib/linecache.pyc matches /files/local/src/Python-2.3/Lib/linecache.py import linecache # precompiled from /files/local/src/Python-2.3/Lib/linecache.pyc import encodings # directory /files/local/src/Python-2.3/Lib/encodings # /files/local/src/Python-2.3/Lib/encodings/__init__.pyc matches /files/local/src/Python-2.3/Lib/encodings/__init__.py import encodings # precompiled from /files/local/src/Python-2.3/Lib/encodings/__init__.pyc # /files/local/src/Python-2.3/Lib/codecs.pyc matches /files/local/src/Python-2.3/Lib/codecs.py import codecs # precompiled from /files/local/src/Python-2.3/Lib/codecs.pyc import _codecs # builtin # /files/local/src/Python-2.3/Lib/encodings/iso8859_1.pyc matches /files/local/src/Python-2.3/Lib/encodings/iso8859_1.py import encodings.iso8859_1 # precompiled from /files/local/src/Python-2.3/Lib/encodings/iso8859_1.pyc Python 2.3 (#2, Aug 27 2003, 18:12:40) [GCC 3.3.1] on sunos5 Type "help", "copyright", "credits" or "license" for more information. import marshal # builtin import imp # builtin dlopen("/files/local/src/Python-2.3/build/lib.solaris-2.8-sun4u-2.3/struct.so", 2); import struct # dynamically loaded from /files/local/src/Python-2.3/build/lib.solaris-2.8-sun4u-2.3/struct.so dlopen("/files/local/src/Python-2.3/build/lib.solaris-2.8-sun4u-2.3/time.so", 2); import time # dynamically loaded from /files/local/src/Python-2.3/build/lib.solaris-2.8-sun4u-2.3/time.so # /files/local/src/Python-2.3/Lib/zipfile.pyc matches /files/local/src/Python-2.3/Lib/zipfile.py import zipfile # precompiled from /files/local/src/Python-2.3/Lib/zipfile.pyc dlopen("/files/local/src/Python-2.3/build/lib.solaris-2.8-sun4u-2.3/binascii.so", 2); import binascii # dynamically loaded from /files/local/src/Python-2.3/build/lib.solaris-2.8-sun4u-2.3/binascii.so import zlib # builtin import test # directory /files/local/src/Python-2.3/Lib/test # /files/local/src/Python-2.3/Lib/test/__init__.pyc matches /files/local/src/Python-2.3/Lib/test/__init__.py import test # precompiled from /files/local/src/Python-2.3/Lib/test/__init__.pyc # /files/local/src/Python-2.3/Lib/test/test_support.pyc matches /files/local/src/Python-2.3/Lib/test/test_support.py import test.test_support # precompiled from /files/local/src/Python-2.3/Lib/test/test_support.pyc # /files/local/src/Python-2.3/Lib/unittest.pyc matches /files/local/src/Python-2.3/Lib/unittest.py import unittest # precompiled from /files/local/src/Python-2.3/Lib/unittest.pyc # /files/local/src/Python-2.3/Lib/traceback.pyc matches /files/local/src/Python-2.3/Lib/traceback.py import traceback # precompiled from /files/local/src/Python-2.3/Lib/traceback.pyc # /files/local/src/Python-2.3/Lib/test/test_importhooks.pyc matches /files/local/src/Python-2.3/Lib/test/test_importhooks.py import test.test_importhooks # precompiled from /files/local/src/Python-2.3/Lib/test/test_importhooks.pyc import zlib # previously loaded (zlib) testAFakeZlib (__main__.UncompressedZipImportTestCase) ... ERROR # zipimport: found 2 names in /files/local/src/Python-2.3/junk95142.zip # /files/local/src/Python-2.3/junk95142.zip/ziptestmodule.pyc has bad mtime import ziptestmodule # loaded from Zip /files/local/src/Python-2.3/junk95142.zip/ziptestmodule.py testBadMTime (__main__.UncompressedZipImportTestCase) ... ok # zipimport: found 2 names in /files/local/src/Python-2.3/junk95142.zip # /files/local/src/Python-2.3/junk95142.zip/ziptestmodule.pyc has bad magic import ziptestmodule # loaded from Zip /files/local/src/Python-2.3/junk95142.zip/ziptestmodule.py testBadMagic (__main__.UncompressedZipImportTestCase) ... ok # zipimport: found 1 names in /files/local/src/Python-2.3/junk95142.zip # /files/local/src/Python-2.3/junk95142.zip/ziptestmodule.pyc has bad magic testBadMagic2 (__main__.UncompressedZipImportTestCase) ... ok # zipimport: found 2 names in /files/local/src/Python-2.3/junk95142.zip import ziptestmodule # loaded from Zip /files/local/src/Python-2.3/junk95142.zip/ziptestmodule.pyc testBoth (__main__.UncompressedZipImportTestCase) ... ok # zipimport: found 3 names in /files/local/src/Python-2.3/junk95142.zip import ziptestpackage # loaded from Zip /files/local/src/Python-2.3/junk95142.zip/ziptestpackage/__init__.pyc import ziptestpackage.ziptestpackage2 # loaded from Zip /files/local/src/Python-2.3/junk95142.zip/ziptestpackage/ziptestpackage2/__init__.pyc import ziptestpackage.ziptestpackage2.ziptestmodule # loaded from Zip /files/local/src/Python-2.3/junk95142.zip/ziptestpackage/ziptestpackage2/ziptestmodule.pyc testDeepPackage (__main__.UncompressedZipImportTestCase) ... ok # zipimport: found 1 names in /files/local/src/Python-2.3/junk95142.zip import ziptestmodule # loaded from Zip /files/local/src/Python-2.3/junk95142.zip/ziptestmodule.py testEmptyPy (__main__.UncompressedZipImportTestCase) ... ok # zipimport: found 1 names in /files/local/src/Python-2.3/junk95142.zip testGetData (__main__.UncompressedZipImportTestCase) ... ok # zipimport: found 1 names in /files/local/src/Python-2.3/junk95142.zip import ziptestmodule # loaded from Zip /files/local/src/Python-2.3/junk95142.zip/ziptestmodule.py testImport_WithStuff (__main__.UncompressedZipImportTestCase) ... ok # zipimport: found 2 names in /files/local/src/Python-2.3/junk95142.zip import ziptestmodule # loaded from Zip /files/local/src/Python-2.3/junk95142.zip/ziptestmodule.pyc testImporterAttr (__main__.UncompressedZipImportTestCase) ... ok # zipimport: found 2 names in /files/local/src/Python-2.3/junk95142.zip import ziptestpackage # loaded from Zip /files/local/src/Python-2.3/junk95142.zip/ziptestpackage/__init__.pyc import ziptestpackage.ziptestmodule # loaded from Zip /files/local/src/Python-2.3/junk95142.zip/ziptestpackage/ziptestmodule.pyc testPackage (__main__.UncompressedZipImportTestCase) ... ok # zipimport: found 1 names in /files/local/src/Python-2.3/junk95142.zip import ziptestmodule # loaded from Zip /files/local/src/Python-2.3/junk95142.zip/ziptestmodule.py testPy (__main__.UncompressedZipImportTestCase) ... ok # zipimport: found 1 names in /files/local/src/Python-2.3/junk95142.zip import ziptestmodule # loaded from Zip /files/local/src/Python-2.3/junk95142.zip/ziptestmodule.pyc testPyc (__main__.UncompressedZipImportTestCase) ... ok import zlib # previously loaded (zlib) testAFakeZlib (__main__.CompressedZipImportTestCase) ... ERROR # zipimport: found 2 names in /files/local/src/Python-2.3/junk95142.zip import zlib # previously loaded (zlib) # zipimport: zlib available # /files/local/src/Python-2.3/junk95142.zip/ziptestmodule.pyc has bad mtime import ziptestmodule # loaded from Zip /files/local/src/Python-2.3/junk95142.zip/ziptestmodule.py testBadMTime (__main__.CompressedZipImportTestCase) ... ok # zipimport: found 2 names in /files/local/src/Python-2.3/junk95142.zip # /files/local/src/Python-2.3/junk95142.zip/ziptestmodule.pyc has bad magic import ziptestmodule # loaded from Zip /files/local/src/Python-2.3/junk95142.zip/ziptestmodule.py testBadMagic (__main__.CompressedZipImportTestCase) ... ok # zipimport: found 1 names in /files/local/src/Python-2.3/junk95142.zip # /files/local/src/Python-2.3/junk95142.zip/ziptestmodule.pyc has bad magic testBadMagic2 (__main__.CompressedZipImportTestCase) ... ok # zipimport: found 2 names in /files/local/src/Python-2.3/junk95142.zip import ziptestmodule # loaded from Zip /files/local/src/Python-2.3/junk95142.zip/ziptestmodule.pyc testBoth (__main__.CompressedZipImportTestCase) ... ok # zipimport: found 3 names in /files/local/src/Python-2.3/junk95142.zip import ziptestpackage # loaded from Zip /files/local/src/Python-2.3/junk95142.zip/ziptestpackage/__init__.pyc import ziptestpackage.ziptestpackage2 # loaded from Zip /files/local/src/Python-2.3/junk95142.zip/ziptestpackage/ziptestpackage2/__init__.pyc import ziptestpackage.ziptestpackage2.ziptestmodule # loaded from Zip /files/local/src/Python-2.3/junk95142.zip/ziptestpackage/ziptestpackage2/ziptestmodule.pyc testDeepPackage (__main__.CompressedZipImportTestCase) ... ok # zipimport: found 1 names in /files/local/src/Python-2.3/junk95142.zip import ziptestmodule # loaded from Zip /files/local/src/Python-2.3/junk95142.zip/ziptestmodule.py testEmptyPy (__main__.CompressedZipImportTestCase) ... ok # zipimport: found 1 names in /files/local/src/Python-2.3/junk95142.zip testGetData (__main__.CompressedZipImportTestCase) ... ok # zipimport: found 1 names in /files/local/src/Python-2.3/junk95142.zip import ziptestmodule # loaded from Zip /files/local/src/Python-2.3/junk95142.zip/ziptestmodule.py testImport_WithStuff (__main__.CompressedZipImportTestCase) ... ok # zipimport: found 2 names in /files/local/src/Python-2.3/junk95142.zip import ziptestmodule # loaded from Zip /files/local/src/Python-2.3/junk95142.zip/ziptestmodule.pyc testImporterAttr (__main__.CompressedZipImportTestCase) ... ok # zipimport: found 2 names in /files/local/src/Python-2.3/junk95142.zip import ziptestpackage # loaded from Zip /files/local/src/Python-2.3/junk95142.zip/ziptestpackage/__init__.pyc import ziptestpackage.ziptestmodule # loaded from Zip /files/local/src/Python-2.3/junk95142.zip/ziptestpackage/ziptestmodule.pyc testPackage (__main__.CompressedZipImportTestCase) ... ok # zipimport: found 1 names in /files/local/src/Python-2.3/junk95142.zip import ziptestmodule # loaded from Zip /files/local/src/Python-2.3/junk95142.zip/ziptestmodule.py testPy (__main__.CompressedZipImportTestCase) ... ok # zipimport: found 1 names in /files/local/src/Python-2.3/junk95142.zip import ziptestmodule # loaded from Zip /files/local/src/Python-2.3/junk95142.zip/ziptestmodule.pyc testPyc (__main__.CompressedZipImportTestCase) ... ok ====================================================================== ERROR: testAFakeZlib (__main__.UncompressedZipImportTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_zipimport.py", line 102, in testAFakeZlib self.doTest(".py", files, "zlib") File "Lib/test/test_zipimport.py", line 78, in doTest file = mod.get_file() AttributeError: 'module' object has no attribute 'get_file' ====================================================================== ERROR: testAFakeZlib (__main__.CompressedZipImportTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_zipimport.py", line 102, in testAFakeZlib self.doTest(".py", files, "zlib") File "Lib/test/test_zipimport.py", line 78, in doTest file = mod.get_file() AttributeError: 'module' object has no attribute 'get_file' ---------------------------------------------------------------------- Ran 26 tests in 0.221s FAILED (errors=2) Traceback (most recent call last): File "Lib/test/test_zipimport.py", line 215, in ? test_main() File "Lib/test/test_zipimport.py", line 211, in test_main CompressedZipImportTestCase File "/files/local/src/Python-2.3/Lib/test/test_support.py", line 262, in run_unittest run_suite(suite, testclass) File "/files/local/src/Python-2.3/Lib/test/test_support.py", line 246, in run_suite raise TestFailed(msg) test.test_support.TestFailed: errors occurred; run in verbose mode for details # clear __builtin__._ # clear sys.path # clear sys.argv # clear sys.ps1 # clear sys.ps2 # clear sys.exitfunc # clear sys.exc_type # clear sys.exc_value # clear sys.exc_traceback # clear sys.last_type # clear sys.last_value # clear sys.last_traceback # clear sys.path_hooks # clear sys.path_importer_cache # clear sys.meta_path # restore sys.stdin # restore sys.stdout # restore sys.stderr # cleanup __main__ # cleanup[1] distutils # cleanup[1] encodings # cleanup[1] site # cleanup[1] distutils.util # cleanup[1] distutils.dep_util # cleanup[1] sre_constants # cleanup[1] re # cleanup[1] _codecs # cleanup[1] test # cleanup[1] zipimport # cleanup[1] warnings # cleanup[1] zipfile # cleanup[1] struct # cleanup[1] sre # cleanup[1] signal # cleanup[1] distutils.errors # cleanup[1] marshal # cleanup[1] distutils.spawn # cleanup[1] posix # cleanup[1] exceptions # cleanup[1] sre_parse # cleanup[1] encodings.iso8859_1 # cleanup[1] distutils.log # cleanup[1] sre_compile # cleanup[1] _sre # cleanup[1] test.test_importhooks # cleanup[1] test.test_support # cleanup[1] imp # cleanup[1] binascii # cleanup[1] codecs # cleanup[1] unittest # cleanup[1] string # cleanup[1] time # cleanup[1] traceback # cleanup[1] types # cleanup[1] linecache # cleanup[2] copy_reg # cleanup[2] posixpath # cleanup[2] os.path # cleanup[2] stat # cleanup[2] UserDict # cleanup[2] os # cleanup sys # cleanup __builtin__ [7751 refs] # cleanup ints: 11 unfreed ints in 8 out of 113 blocks # cleanup floats vette$
msg16843 - (view) Author: Just van Rossum (jvr) * (Python triager) Date: 2003-08-29 14:26
Logged In: YES user_id=92689 Wait, is the zlib module perhaps statically linked on these platforms? >>> import sys >>> print "zlib" in sys.builtin_module_names ?
msg16844 - (view) Author: Richard Townsend (rptownsend) Date: 2003-08-29 14:43
Logged In: YES user_id=200117 >>> import sys >>> print "zlib" in sys.builtin_module_names This gives 'True' on HP-UX11i. I edited the zlib line in Modules/Setup when I built Python2.3.
msg16845 - (view) Author: Just van Rossum (jvr) * (Python triager) Date: 2003-11-18 23:06
Logged In: YES user_id=92689 So the problem was the test. Fixed in the trunk in rev. 1.11, and 1.10.4.1 in the release23-maint branch.
History
Date User Action Args
2022-04-10 16:09:40 admin set github: 38782
2003-07-03 16:42:04 robinf1 create