This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_pep277 fails on OS X
Type: behavior Stage: resolved
Components: macOS, Unicode Versions: Python 3.2, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: flox Nosy List: flox, lemburg, michael.foord, ned.deily
Priority: normal Keywords: patch

Created on 2010-03-23 05:43 by ned.deily, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue8207_pep277_for_os_x.diff flox, 2010-03-23 08:41 Patch, apply to trunk
Messages (8)
msg101559 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2010-03-23 05:43
With r79207 (Issue8180) applied to trunk, seeing this failure (10.6.2, HFS+ case-sensitive file system):

======================================================================
ERROR: test_normalize (test.test_pep277.UnicodeFileTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/private/tmp/pp/usr/local/lib/python2.7/test/test_pep277.py", line 119, in test_normalize
    os.stat(name)
OSError: [Errno 2] No such file or directory: '@test_24797_tmp/\xe2\x80\x82\xe2\x80\x82\xe2\x80\x82A'

----------------------------------------------------------------------
Ran 30 tests in 0.237s

FAILED (errors=1)
test test_pep277 failed -- Traceback (most recent call last):
  File "/private/tmp/pp/usr/local/lib/python2.7/test/test_pep277.py", line 119, in test_normalize
    os.stat(name)
OSError: [Errno 2] No such file or directory: '@test_24797_tmp/\xe2\x80\x82\xe2\x80\x82\xe2\x80\x82A'
msg101562 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2010-03-23 07:39
Also this failure on py3k:

======================================================================
ERROR: test_normalize (test.test_pep277.UnicodeFileTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/private/tmp/pp3/usr/local/lib/python3.2/test/test_pep277.py", line 119, in test_normalize
    os.stat(name)
OSError: [Errno 2] No such file or directory: '@test_42408_tmp/\u2002\u2002\u2002A'

----------------------------------------------------------------------
msg101564 - (view) Author: Florent Xicluna (flox) * (Python committer) Date: 2010-03-23 08:41
This patch should fix it...
"HFS Plus uses a variant of Normal Form D in which U+2000 through U+2FFF, U+F900 through U+FAFF, and U+2F800 through U+2FAFF are not decomposed."

<rant>
I believed there was only one Unicode...
But obviously the Apple's Unicode is something different.
</rant>
msg101567 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2010-03-23 09:13
Florent Xicluna wrote:
> 
> Florent Xicluna <florent.xicluna@gmail.com> added the comment:
> 
> This patch should fix it...
> "HFS Plus uses a variant of Normal Form D in which U+2000 through U+2FFF, U+F900 through U+FAFF, and U+2F800 through U+2FAFF are not decomposed."

Could you provide a reference link for this quote ?

It's rather strange that those ranges are not decomposed,
since they do contain combining code points.
msg101568 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2010-03-23 09:40
Actually, the file system in question is what Apple calls a HFSX case-sensitive (see http://developer.apple.com/mac/library/technotes/tn/tn1150.html#HFSX).  On a typical OS X system, you could encounter any combination of HFS+ case-insensitive, HFSX case-insensitive, HFSX case-sensitive file systems, along with other usual suspects, like NFS or SMB.  I'll note again the warning in r33595.
msg101570 - (view) Author: Florent Xicluna (flox) * (Python committer) Date: 2010-03-23 10:10
> Could you provide a reference link for this quote ?

I put the link in the patch:
http://developer.apple.com/mac/library/qa/qa2001/qa1173.html
msg101571 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2010-03-23 10:43
With the patch for trunk, the test no longer fails on the given file system.
msg101849 - (view) Author: Florent Xicluna (flox) * (Python committer) Date: 2010-03-28 00:36
Fixed on trunk with r79426 and on 3.x with r79474
History
Date User Action Args
2022-04-11 14:56:58adminsetgithub: 52454
2010-03-28 00:36:49floxsetstatus: open -> closed
resolution: accepted -> fixed
messages: + msg101849

stage: patch review -> resolved
2010-03-23 10:43:14ned.deilysetmessages: + msg101571
2010-03-23 10:10:18floxsetmessages: + msg101570
2010-03-23 09:40:35ned.deilysetmessages: + msg101568
2010-03-23 09:13:33lemburgsetnosy: + lemburg
messages: + msg101567
2010-03-23 08:41:58floxsetfiles: + issue8207_pep277_for_os_x.diff


assignee: flox
keywords: + patch
stage: patch review
nosy: + michael.foord
messages: + msg101564
priority: normal
components: + macOS, Unicode
resolution: accepted
2010-03-23 07:39:31ned.deilysetmessages: + msg101562
versions: + Python 3.2
2010-03-23 05:43:20ned.deilycreate