New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tiger buildbot: test_pep277 failures #52670
Comments
http://www.python.org/dev/buildbot/3.x/builders/x86 Tiger 3.x/builds/6/steps/test/logs/stdio test test_pep277 failed -- multiple errors occurred; run in verbose mode for details ====================================================================== test test_pep277 crashed -- <class 'UnicodeEncodeError'>: 'ascii' codec can't encode characters in position 222-239: ordinal not in range(128)
Traceback (most recent call last):
File "./Lib/test/regrtest.py", line 905, in runtest_inner
File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/test_pep277.py", line 195, in test_main
UnicodeNFKDFileTests,
File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/support.py", line 1000, in run_unittest
_run_suite(suite)
File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/support.py", line 974, in _run_suite
result = runner.run(suite)
File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/unittest/runner.py", line 158, in run
result.printErrors()
File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/unittest/runner.py", line 108, in printErrors
self.printErrorList('ERROR', self.errors)
File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/unittest/runner.py", line 116, in printErrorList
self.stream.writeln("%s" % err)
File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/unittest/runner.py", line 24, in writeln
self.write(arg)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 222-239: ordinal not in range(128) |
See also bpo-8422. |
Some diagnosis information ...
I've added some lines to regrtest.py to identify each platform: I don't know how the endianness may be linked with this issue. Failing files (4): One solution is to skip these files on all 'darwin' platforms, without losing more time on this issue. |
It prefer if it were clear why these tests fail (but don't have time to look into this at the moment). That is, I don't mind if the tests get disabled on darwin, but only if there is a documented reason for it because otherwise disabling the test might hide a real issue. |
I agree. There's little point having tests if we're just going to disable them when they fail without understanding why they're failing first. At that point a green buildbot just means "Hey, we disabled all failing tests!", rather than being an indication that Python's working well on that platform. |
The gory details... >>> import os, unicodedata
>>> tempdir = u'temp_pep277'
>>> name = u'\u0385\u03d3\u03d4'
>>> os.mkdir(tempdir)
>>> with open(os.path.join(tempdir, name), 'w') as f:
... f.write('foo')
>>> unicodedata.normalize('NFD', name)
u'\xa8\u0301\u03d2\u0301\u03d2\u0308'
>>> os.listdir(tempdir)
[u'\xa8\u0301\u03d2\u03d2\u0301\u0308'] The filename should use the Normal Decomposition (NFD) of the original filename. But the decomposition looks wrong on this platform. The problem is similar for the other special filenames. Examples:
I have no idea how to investigate further. Reference about OSX decomposition: |
Mac OS X source code: |
bpo-8207 was the same issue and r79426 (for trunk and r79426 in py3k) was supposed to fix it. |
I opened the issue bpo-10209: "Mac OS X: Decompose filenames on encode, and precompose filenames on decode". |
It was a bad idea. I fixed test_pep277 instead with:
And test_pep277 now pass on "x86 Tiger 3.x" buildbot, and so I can close this issue (and issue bpo-10209). |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: