[issue3485] os.path.normcase documentation/behaviour unclear on Mac OS X
Mark Lawrence added the comment: Is this or could this be addressed via the new pathlib module? -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3485 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3485] os.path.normcase documentation/behaviour unclear on Mac OS X
Roundup Robot added the comment: New changeset a854d23305de by Ned Deily in branch '3.4': Issue #3485: remove misleading comment http://hg.python.org/cpython/rev/a854d23305de New changeset 3edda677119e by Ned Deily in branch 'default': Issue #3485: merge from 3.4 http://hg.python.org/cpython/rev/3edda677119e -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3485 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3485] os.path.normcase documentation/behaviour unclear on Mac OS X
Ned Deily added the comment: The misleading TODO comment has been removed. -- resolution: accepted - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3485 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3485] os.path.normcase documentation/behaviour unclear on Mac OS X
Changes by Matthieu Labbé bugs.python@mattlabbe.com: -- nosy: +matthieu.labbe ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3485 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3485] os.path.normcase documentation/behaviour unclear on Mac OS X
Ronald Oussoren ronaldousso...@mac.com added the comment: Note that this does not just affect MacOSX, this even affects Linux (although the behaviour on the default filesystems is different). On Linux the default is case-sensitive filesystems, but you can use network filesystems that have case-insensitive behavior, for example by using a CIFS share. This means that /mnt/myserver-share/foo/bar and /mnt/myserver-share/FOO/BAR may or may not refer to the same object: there aren't the same if /mnt/myserver-share is a regular Linux filesystem but will be when /mnt/myserver-share is a mount from a CIFS server. In short: os.path.normcase is hopelessly naive in its assumptions about system behavior. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3485 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3485] os.path.normcase documentation/behaviour unclear on Mac OS X
Ronald Oussoren ronaldousso...@mac.com added the comment: The comment is wrong, os.path.normcase should not return s.lower(), as the other issue notes the case sensitivity is filesystem dependent. Returning s.lower() will break code when dealing with paths that refer to an NFS share on a Linux server, or to a path on a local case sensitive file system. IMHO The comment in posixpath should be changed to something like this: # On MacOS X most but not all filesystems are case sensitive, which # means that using normcase(p1) != normcase(p2) doesn't necessarily mean # that the paths refer to different files. The current comment gives the impression that a trivial should be applied, which isn't true. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3485 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3485] os.path.normcase documentation/behaviour unclear on Mac OS X
Ezio Melotti ezio.melo...@gmail.com added the comment: Changing the function is better than changing the comment. Although changing just the comment is better than leaving it unchanged. -- versions: +Python 3.2 -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3485 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3485] os.path.normcase documentation/behaviour unclear on Mac OS X
Ezio Melotti ezio.melo...@gmail.com added the comment: I'm reopening this because now the normcase implementation of posixpath has a todo that says on Mac OS X, this should really return s.lower(). (see r66743). There is some discussion about this in #9018. -- nosy: +ezio.melotti status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3485 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3485] os.path.normcase documentation/behaviour unclear on Mac OS X
Ronald Oussoren ronaldousso...@mac.com added the comment: The following patch explicitly mentions that os.path.normcase treats OSX like any other Unix platform. I'm in favor of applying this. -- keywords: +patch nosy: +ronaldoussoren versions: +Python 2.6, Python 2.7, Python 3.1 Added file: http://bugs.python.org/file13469/normcase.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3485 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3485] os.path.normcase documentation/behaviour unclear on Mac OS X
Ronald Oussoren ronaldousso...@mac.com added the comment: I've committed a fix for this in r70746 and ported this to 3.1 and 2.6 as well. -- resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3485 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3485] os.path.normcase documentation/behaviour unclear on Mac OS X
New submission from Isaac Morland [EMAIL PROTECTED]: $ python Python 2.5.1 (r251:54863, Apr 15 2008, 22:57:26) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type help, copyright, credits or license for more information. from os.path import normcase normcase ('aB') 'aB' From http://docs.python.org/lib/module-os.path.html: On Unix, this returns the path unchanged; on case-insensitive filesystems, it converts the path to lowercase. Of course, Mac OS X is both Unix and case-insensitive, which is a rather bizarre combination, but that's it is. Where is the item for make all file systems case-sensitive, put the case-insensitivity in the user interface? -- components: Macintosh messages: 70571 nosy: ijmorlan severity: normal status: open title: os.path.normcase documentation/behaviour unclear on Mac OS X type: behavior versions: Python 2.5 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3485 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3485] os.path.normcase documentation/behaviour unclear on Mac OS X
Ned Deily [EMAIL PROTECTED] added the comment: Of course, Mac OS X is both Unix and case-insensitive Not so. Case-{in|}sensitivity is an attribute of HFS+ file systems that is specifiable when a file system is created; it's true that the default is still case-insensitive. There are also other case-sensitive file systems supported on OS X. -- nosy: +nad ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3485 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3485] os.path.normcase documentation/behaviour unclear on Mac OS X
Isaac Morland [EMAIL PROTECTED] added the comment: Ok, good point. Perhaps the documentation should be updated to clarify that Mac OS is treated as Unix even though a default Mac OS X installation will have a case-insensitive file system. Wouldn't it be possible for a Windows machine to have a case-sensitive file system similarly? Or is it more built-in that the file system on a Windows box will be case-insensitive? ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3485 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3485] os.path.normcase documentation/behaviour unclear on Mac OS X
Martin v. Löwis [EMAIL PROTECTED] added the comment: On Windows, case-insensitivity is part of the API, not of the file system. NTFS itself is case-sensitive, and there are case-sensitive subsystems on top of it (e.g. the POSIX subsystem, Interix). Win32, when calling the file system, asks for case-insensitive lookup (which NTFS also supports efficiently). I believe FAT is inherently case-insensitive. -- nosy: +loewis ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3485 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com