Skip to content
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

test_pep277 fails on OS X #52454

Closed
ned-deily opened this issue Mar 23, 2010 · 8 comments
Closed

test_pep277 fails on OS X #52454

ned-deily opened this issue Mar 23, 2010 · 8 comments
Assignees
Labels
OS-mac topic-unicode type-bug An unexpected behavior, bug, or error

Comments

@ned-deily
Copy link
Member

BPO 8207
Nosy @malemburg, @ned-deily, @voidspace, @florentx
Files
  • issue8207_pep277_for_os_x.diff: Patch, apply to trunk
  • 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:

    assignee = 'https://github.com/florentx'
    closed_at = <Date 2010-03-28.00:36:49.583>
    created_at = <Date 2010-03-23.05:43:20.711>
    labels = ['OS-mac', 'type-bug', 'expert-unicode']
    title = 'test_pep277 fails on OS X'
    updated_at = <Date 2010-03-28.00:36:49.581>
    user = 'https://github.com/ned-deily'

    bugs.python.org fields:

    activity = <Date 2010-03-28.00:36:49.581>
    actor = 'flox'
    assignee = 'flox'
    closed = True
    closed_date = <Date 2010-03-28.00:36:49.583>
    closer = 'flox'
    components = ['macOS', 'Unicode']
    creation = <Date 2010-03-23.05:43:20.711>
    creator = 'ned.deily'
    dependencies = []
    files = ['16627']
    hgrepos = []
    issue_num = 8207
    keywords = ['patch']
    message_count = 8.0
    messages = ['101559', '101562', '101564', '101567', '101568', '101570', '101571', '101849']
    nosy_count = 4.0
    nosy_names = ['lemburg', 'ned.deily', 'michael.foord', 'flox']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue8207'
    versions = ['Python 2.7', 'Python 3.2']

    @ned-deily
    Copy link
    Member Author

    With r79207 (bpo-8180) 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'

    @ned-deily ned-deily added the type-bug An unexpected behavior, bug, or error label Mar 23, 2010
    @ned-deily
    Copy link
    Member Author

    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'

    @florentx
    Copy link
    Mannequin

    florentx mannequin commented Mar 23, 2010

    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>

    @florentx florentx mannequin self-assigned this Mar 23, 2010
    @malemburg
    Copy link
    Member

    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.

    @ned-deily
    Copy link
    Member Author

    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.

    @florentx
    Copy link
    Mannequin

    florentx mannequin commented Mar 23, 2010

    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

    @ned-deily
    Copy link
    Member Author

    With the patch for trunk, the test no longer fails on the given file system.

    @florentx
    Copy link
    Mannequin

    florentx mannequin commented Mar 28, 2010

    Fixed on trunk with r79426 and on 3.x with r79474

    @florentx florentx mannequin closed this as completed Mar 28, 2010
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    OS-mac topic-unicode type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants