Issue 5442: test_importlib fails on Mac OSX 10.5.6 w/ case-sensitive file system (original) (raw)

Created on 2009-03-08 12:59 by donmez, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (22)

msg83308 - (view)

Author: Ismail Donmez (donmez) *

Date: 2009-03-08 12:59

Two failures in test_importlib:

====================================================================== FAIL: test_case_insensitivity (importlib.test.extension.test_case_sensitivity.ExtensionModuleCaseSensi tivityTest)

Traceback (most recent call last): File "/Users/cartman/Downloads/Python- 3.1a1/Lib/importlib/test/extension/test_case_sensitivity.py", line 29, in test_case_insensitivity self.assert_(hasattr(loader, 'load_module')) AssertionError: None

====================================================================== FAIL: test_insensitive (importlib.test.source.test_case_sensitivity.CaseSensitivityTest)

Traceback (most recent call last): File "/Users/cartman/Downloads/Python- 3.1a1/Lib/importlib/test/source/test_case_sensitivity.py", line 49, in test_insensitive self.assert_(hasattr(insensitive, 'load_module')) AssertionError: None


msg83329 - (view)

Author: Brett Cannon (brett.cannon) * (Python committer)

Date: 2009-03-08 20:54

Is your version of OS X installed on a case-sensitive filesystem? These tests all pass for me on my Macbook on 10.5.6.

msg83330 - (view)

Author: Ismail Donmez (donmez) *

Date: 2009-03-08 21:28

Yes its case sensitive.

msg83331 - (view)

Author: Brett Cannon (brett.cannon) * (Python committer)

Date: 2009-03-08 21:30

Ah, OK, that explains it then. I guess I need to come up with a test to verify whether commonly case-sensitive filesystems are truly case-sensitive before running the tests.

Thanks for the quick response, Ismail.

msg85164 - (view)

Author: Brett Cannon (brett.cannon) * (Python committer)

Date: 2009-04-02 05:18

Fixed in r71042.

msg85340 - (view)

Author: Brett Cannon (brett.cannon) * (Python committer)

Date: 2009-04-03 22:26

If you could, Ismail, can you verify this either from svn or when the next release of 3.1 comes out and update this issue?

msg85373 - (view)

Author: Ismail Donmez (donmez) *

Date: 2009-04-04 06:18

Sure thing, I am waiting for alpha2.

Regards.

msg85473 - (view)

Author: Ismail Donmez (donmez) *

Date: 2009-04-05 10:24

Still fails with 3.1 alpha2:

====================================================================== ERROR: test_is_package (importlib.test.frozen.test_loader.InspectLoaderTests)

Traceback (most recent call last): File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/frozen/test_loader.py", line 80, in test_is_package result = machinery.FrozenImporter.is_package(name) File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/_bootstrap.py", line 191, in wrapper return fxn(self, fullname) File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/_bootstrap.py", line 301, in is_package return imp.is_frozen_package(fullname) AttributeError: 'module' object has no attribute 'is_frozen_package'

====================================================================== ERROR: test_lacking_parent (importlib.test.source.test_abc_loader.PyLoaderTests)

Traceback (most recent call last): File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 162, in test_lacking_parent loader=mock) File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 128, in eq_attrs "{} attribute: {} != {}".format(attr, found, val)) ValueError: zero length field name in format

====================================================================== ERROR: test_module (importlib.test.source.test_abc_loader.PyLoaderTests)

Traceback (most recent call last): File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 138, in test_module loader=mock) File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 128, in eq_attrs "{} attribute: {} != {}".format(attr, found, val)) ValueError: zero length field name in format

====================================================================== ERROR: test_package (importlib.test.source.test_abc_loader.PyLoaderTests)

Traceback (most recent call last): File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 151, in test_package loader=mock) File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 128, in eq_attrs "{} attribute: {} != {}".format(attr, found, val)) ValueError: zero length field name in format

====================================================================== ERROR: test_lacking_parent (importlib.test.source.test_abc_loader.PyPycLoaderTests)

Traceback (most recent call last): File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 270, in test_lacking_parent mock, name = super().test_lacking_parent() File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 162, in test_lacking_parent loader=mock) File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 128, in eq_attrs "{} attribute: {} != {}".format(attr, found, val)) ValueError: zero length field name in format

====================================================================== ERROR: test_module (importlib.test.source.test_abc_loader.PyPycLoaderTests)

Traceback (most recent call last): File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 262, in test_module mock, name = super().test_module() File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 138, in test_module loader=mock) File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 128, in eq_attrs "{} attribute: {} != {}".format(attr, found, val)) ValueError: zero length field name in format

====================================================================== ERROR: test_package (importlib.test.source.test_abc_loader.PyPycLoaderTests)

Traceback (most recent call last): File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 266, in test_package mock, name = super().test_package() File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 151, in test_package loader=mock) File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 128, in eq_attrs "{} attribute: {} != {}".format(attr, found, val)) ValueError: zero length field name in format

====================================================================== FAIL: test_case_insensitivity (importlib.test.extension.test_case_sensitivity.ExtensionModuleCaseSensi tivityTest)

Traceback (most recent call last): File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/extension/test_case_sensitivity.py", line 29, in test_case_insensitivity self.assert_(hasattr(loader, 'load_module')) AssertionError: False is not True

====================================================================== FAIL: test_module_reuse (importlib.test.source.test_abc_loader.PyPycLoaderTests)

Traceback (most recent call last): File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 275, in test_module_reuse self.verify_bytecode(mock, name) File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/util.py", line 18, in wrapper to_return = fxn(*args, **kwargs) File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 253, in verify_bytecode self.assert_(name in mock.module_bytecode) AssertionError: False is not True

====================================================================== FAIL: test_insensitive (importlib.test.source.test_case_sensitivity.CaseSensitivityTest)

Traceback (most recent call last): File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_case_sensitivity.py", line 49, in test_insensitive self.assert_(hasattr(insensitive, 'load_module')) AssertionError: False is not True

msg85554 - (view)

Author: Brett Cannon (brett.cannon) * (Python committer)

Date: 2009-04-05 18:48

Something is wrong with your build, Ismail, because most of those failures are because of things that were added between alpha1 and alpha2.

But to speed this up, can you tell me what the file I attached to the issue prints out?

msg85558 - (view)

Author: Ismail Donmez (donmez) *

Date: 2009-04-05 19:13

[~]> python3.1 tester.py original name: .CFUserTextEncoding changed name: .CFUSERTEXTENCODING case-sensitive

I'll do a rebuild just in case. Thanks.

msg87366 - (view)

Author: Ismail Donmez (donmez) *

Date: 2009-05-07 11:32

Fails in beta1.

msg87390 - (view)

Author: Brett Cannon (brett.cannon) * (Python committer)

Date: 2009-05-07 18:56

Bloody OS X and its default case-insensitivity.

Ismail, please try the attached patch to double-check this solves the issue ASAP so this doesn't hold up Python 3.1 rc1.

msg87391 - (view)

Author: Ismail Donmez (donmez) *

Date: 2009-05-07 19:05

Tested with: ./python -m test.regrtest -v test_importlib

3 failures:

====================================================================== FAIL: test_case_insensitivity (importlib.test.extension.test_case_sensitivity.ExtensionModuleCaseSensi tivityTest)

Traceback (most recent call last): File "/Users/cartman/Python- 3.1b1/Lib/importlib/test/extension/test_case_sensitivity.py", line 29, in test_case_insensitivity self.assert_(hasattr(loader, 'load_module')) AssertionError: False is not True

====================================================================== FAIL: test_lacking_parent (importlib.test.source.test_abc_loader.PyPycLoaderTests)

Traceback (most recent call last): File "/Users/cartman/Python- 3.1b1/Lib/importlib/test/source/test_abc_loader.py", line 271, in test_lacking_parent self.verify_bytecode(mock, name) File "/Users/cartman/Python-3.1b1/Lib/importlib/test/source/util.py", line 18, in wrapper to_return = fxn(*args, **kwargs) File "/Users/cartman/Python- 3.1b1/Lib/importlib/test/source/test_abc_loader.py", line 253, in verify_bytecode self.assert_(name in mock.module_bytecode) AssertionError: False is not True

====================================================================== FAIL: test_insensitive (importlib.test.source.test_case_sensitivity.CaseSensitivityTest)

Traceback (most recent call last): File "/Users/cartman/Python- 3.1b1/Lib/importlib/test/source/test_case_sensitivity.py", line 49, in test_insensitive self.assert_(hasattr(insensitive, 'load_module')) AssertionError: False is not True


Ran 166 tests in 0.133s

FAILED (failures=3)

msg87401 - (view)

Author: Brett Cannon (brett.cannon) * (Python committer)

Date: 2009-05-07 20:02

Damn, that patch should have caused those case-sensitivity tests to be skipped. I will dig into this later today and hopefully have another patch to test some time tonight.

msg87414 - (view)

Author: Brett Cannon (brett.cannon) * (Python committer)

Date: 2009-05-08 00:00

OK, Ismail, here is another patch. Revert the last one and try this. Looks like I was being stupid by forgetting to remove the 'darwin' platform check. But I also made the check simpler.

msg87425 - (view)

Author: Ismail Donmez (donmez) *

Date: 2009-05-08 05:06

Down to 1 failure:

FAILED (failures=1) test test_importlib failed -- Traceback (most recent call last): File "/Users/cartman/Python- 3.1b1/Lib/importlib/test/source/test_abc_loader.py", line 271, in test_lacking_parent self.verify_bytecode(mock, name) File "/Users/cartman/Python-3.1b1/Lib/importlib/test/source/util.py", line 18, in wrapper to_return = fxn(*args, **kwargs) File "/Users/cartman/Python- 3.1b1/Lib/importlib/test/source/test_abc_loader.py", line 253, in verify_bytecode self.assertIn(name, mock.module_bytecode) AssertionError: 'pkg.mod' not found in {}

msg87450 - (view)

Author: Brett Cannon (brett.cannon) * (Python committer)

Date: 2009-05-08 16:58

Thanks for the quick reply, Ismail! I will look into the last failure this weekend, but off the top of my head I am not sure why that test would be failing since everything to do with that test should be a mock and thus not touching the file system.

msg87515 - (view)

Author: Brett Cannon (brett.cannon) * (Python committer)

Date: 2009-05-09 23:01

OK, here is an attempt to fix this. My guess is it has something to do with sys.dont_write_bytecode, otherwise I cannot understand why you fail and not someone else since no other case-sensitive systems have reported this failure.

msg87516 - (view)

Author: Ismail Donmez (donmez) *

Date: 2009-05-10 06:59

1 Fail:

test test_importlib crashed -- <class 'AttributeError'>: 'module' object has no attribute 'writes_bytecode' Traceback (most recent call last): File "/Users/cartman/Python-3.1b1/Lib/test/regrtest.py", line 620, in runtest_inner indirect_test() File "/Users/cartman/Python-3.1b1/Lib/test/test_importlib.py", line 6, in test_main run_unittest(importlib.test.test_suite('importlib.test')) File "/Users/cartman/Python-3.1b1/Lib/importlib/test/init.py", line 22, in test_suite package_tests = getattr(sys.modules[package_name], 'test_suite')() File "/Users/cartman/Python- 3.1b1/Lib/importlib/test/source/init.py", line 8, in test_suite return importlib.test.test_suite('importlib.test.source', directory) File "/Users/cartman/Python-3.1b1/Lib/importlib/test/init.py", line 16, in test_suite import(module_name, level=0) File "/Users/cartman/Python- 3.1b1/Lib/importlib/test/source/test_file_loader.py", line 111, in class BadBytecodeTest(unittest.TestCase): File "/Users/cartman/Python- 3.1b1/Lib/importlib/test/source/test_file_loader.py", line 130, in BadBytecodeTest @source_util.writes_bytecode AttributeError: 'module' object has no attribute 'writes_bytecode' 1 test failed: test_importlib

msg87538 - (view)

Author: Brett Cannon (brett.cannon) * (Python committer)

Date: 2009-05-10 19:39

Bah, I screwed up and left a file out of skip_bytecode_writing.diff. If you apply test_file_loader along with that patch that should fix the error.

msg87548 - (view)

Author: Ismail Donmez (donmez) *

Date: 2009-05-10 21:02

Applied skip_bytecode.diff and test_file_loader.diff clean build results in:

====================================================================== FAIL: test_case_insensitivity (importlib.test.extension.test_case_sensitivity.ExtensionModuleCaseSensi tivityTest)

Traceback (most recent call last): File "/Users/cartman/Python- 3.1b1/Lib/importlib/test/extension/test_case_sensitivity.py", line 29, in test_case_insensitivity self.assert_(hasattr(loader, 'load_module')) AssertionError: False is not True

====================================================================== FAIL: test_insensitive (importlib.test.source.test_case_sensitivity.CaseSensitivityTest)

Traceback (most recent call last): File "/Users/cartman/Python- 3.1b1/Lib/importlib/test/source/test_case_sensitivity.py", line 49, in test_insensitive self.assert_(hasattr(insensitive, 'load_module')) AssertionError: False is not True


Ran 166 tests in 0.124s

FAILED (failures=2) test test_importlib failed -- errors occurred; run in verbose mode for details

msg87559 - (view)

Author: Brett Cannon (brett.cannon) * (Python committer)

Date: 2009-05-11 01:47

OK, that means everything is fixed as case_sensitivity_tests.diff fixes those test errors.

Committed in r72559.

History

Date

User

Action

Args

2022-04-11 14:56:46

admin

set

nosy: + benjamin.peterson
github: 49692

2009-05-11 01:47:24

brett.cannon

set

status: open -> closed
resolution: fixed
messages: +

stage: patch review -> resolved

2009-05-10 21:02:17

donmez

set

status: pending -> open

messages: +

2009-05-10 19:39:52

brett.cannon

set

status: open -> pending

2009-05-10 19:39:31

brett.cannon

set

files: + test_file_loader.diff

messages: +

2009-05-10 06:59:40

donmez

set

status: pending -> open

messages: +

2009-05-09 23:02:00

brett.cannon

set

status: open -> pending
files: + skip_bytecode_writing.diff
messages: +

2009-05-08 16:58:57

brett.cannon

set

messages: +

2009-05-08 05:07:11

donmez

set

status: pending -> open

messages: +

2009-05-08 00:00:14

brett.cannon

set

status: open -> pending
files: + case_sensitivity_tests.diff
messages: +

2009-05-07 23:58:15

brett.cannon

set

files: - case_sensitivity_tests.diff

2009-05-07 20:02:40

brett.cannon

set

resolution: fixed -> (no value)
messages: +
title: [3.1alpha1,2,beta1] test_importlib fails on Mac OSX 10.5.6 -> test_importlib fails on Mac OSX 10.5.6 w/ case-sensitive file system

2009-05-07 19:05:18

donmez

set

status: pending -> open

messages: +

2009-05-07 18:56:44

brett.cannon

set

status: open -> pending
files: + case_sensitivity_tests.diff
messages: +

keywords: + patch
priority: low -> release blocker
stage: patch review

2009-05-07 18:51:28

brett.cannon

set

files: - tester.py

2009-05-07 11:32:03

donmez

set

messages: +
title: [3.1alpha1,2] test_importlib fails on Mac OSX 10.5.6 -> [3.1alpha1,2,beta1] test_importlib fails on Mac OSX 10.5.6

2009-04-05 19:13:38

donmez

set

messages: +

2009-04-05 18:48:15

brett.cannon

set

files: + tester.py

messages: +

2009-04-05 10:24:36

donmez

set

messages: +
title: [3.1alpha1] test_importlib fails on Mac OSX 10.5.6 -> [3.1alpha1,2] test_importlib fails on Mac OSX 10.5.6

2009-04-04 06🔞58

donmez

set

status: pending -> open

messages: +

2009-04-03 22:26:28

brett.cannon

set

status: closed -> pending

messages: +

2009-04-02 05🔞10

brett.cannon

set

status: open -> closed
resolution: fixed
messages: +

2009-03-08 21:30:45

brett.cannon

set

priority: normal -> low

messages: +

2009-03-08 21:28:09

donmez

set

messages: +

2009-03-08 20:54:11

brett.cannon

set

assignee: brett.cannon
messages: +

2009-03-08 13:05:30

pitrou

set

priority: normal
components: + Library (Lib), Tests

2009-03-08 13:05:15

pitrou

set

nosy: + brett.cannon

2009-03-08 12:59:18

donmez

create