[issue9018] os.path.normcase(None) does not raise an error on linux and should

2010-06-25 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed in r82214. Now os.path.normcase() raises a TypeError if the arg is not str or bytes. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue9018] os.path.normcase(None) does not raise an error on linux and should

2010-06-22 Thread Ezio Melotti
Ezio Melotti added the comment: This problem should be addressed in another issue though. -- ___ Python tracker ___ ___ Python-bugs-li

[issue9018] os.path.normcase(None) does not raise an error on linux and should

2010-06-22 Thread R. David Murray
R. David Murray added the comment: Ah, I see my lack of knowledge of OS X has betrayed me. Apparently you can set the case sensitivity of OS X file systemsso the deep problem is even deeper than I thought :( -- ___ Python tracker

[issue9018] os.path.normcase(None) does not raise an error on linux and should

2010-06-22 Thread R. David Murray
R. David Murray added the comment: My understanding is that there is a deep problem here, in that file system case (and in some cases encoding) is not OS/platform dependent, but is rather *file system* dependent. Adding lower to normcase on OS X is probably not going to break much code (he s

[issue9018] os.path.normcase(None) does not raise an error on linux and should

2010-06-21 Thread Senthil Kumaran
Senthil Kumaran added the comment: Nice patch. I like the use of new string formating. It can be applied. BTW, do you think that TODO of s.lower() for MAC OS X should be addressed along with this. It might require some research as how much of a desirable behavior it would be. -- __

[issue9018] os.path.normcase(None) does not raise an error on linux and should

2010-06-21 Thread Ezio Melotti
Ezio Melotti added the comment: Here is the patch. -- assignee: -> ezio.melotti components: +Library (Lib) keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file17735/issue9018-2.diff ___ Python tracker

[issue9018] os.path.normcase(None) does not raise an error on linux and should

2010-06-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > ntpath and macpath raise an AttributeError, so we could: > 1) change them all to accept only bytes/str and raise a TypeError for > other wrong types (correct, consistent, non-backward-compatible); Sounds like the best thing to do. > The option 2 is still an

[issue9018] os.path.normcase(None) does not raise an error on linux and should

2010-06-21 Thread Ezio Melotti
Ezio Melotti added the comment: ntpath and macpath raise an AttributeError, so we could: 1) change them all to accept only bytes/str and raise a TypeError for other wrong types (correct, consistent, non-backward-compatible); 2) change only posixpath to raise a TypeError for wrong types (partial

[issue9018] os.path.normcase(None) does not raise an error on linux and should

2010-06-21 Thread Senthil Kumaran
Senthil Kumaran added the comment: On Sat, Jun 19, 2010 at 08:00:55PM +, Shashwat Anand wrote: > Why on Mac OS X, it should return s.lower() ? That is is because some file systems on Mac OS X are case-sensitive. > def normcase(s): > """Normalize case of pathname. Has no effect under P

[issue9018] os.path.normcase(None) does not raise an error on linux and should

2010-06-19 Thread Shashwat Anand
Shashwat Anand added the comment: Following the documentation, os.path.normcase(path) Normalize the case of a pathname. On Unix and Mac OS X, this returns the path unchanged; on case-insensitive filesystems, it converts the path to lowercase. On Windows, it also converts forward slashes to bac

[issue9018] os.path.normcase(None) does not raise an error on linux and should

2010-06-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I've only marked this for 3.2 because I suspect there may be linux code > out there that this will break, It should be noticed that Linux-only code has absolutely no point in using normcase(), since it's a no-op there. -- nosy: +pitrou ___

[issue9018] os.path.normcase(None) does not raise an error on linux and should

2010-06-17 Thread Ezio Melotti
Changes by Ezio Melotti : -- keywords: -patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue9018] os.path.normcase(None) does not raise an error on linux and should

2010-06-17 Thread Ezio Melotti
Ezio Melotti added the comment: Right now posixpath returns the argument unchanged, ntpath performs a .replace(), and macpath a .lower(), so when non-string (or non-bytes) are passed to normcase the results are: posixpath: arg returned as-is; ntpath: AttributeError (object has no attribute 're

[issue9018] os.path.normcase(None) does not raise an error on linux and should

2010-06-17 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue9018] os.path.normcase(None) does not raise an error on linux and should

2010-06-17 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue9018] os.path.normcase(None) does not raise an error on linux and should

2010-06-17 Thread R. David Murray
New submission from R. David Murray : os.path.normcase(None) raises an error on Windows but returns None on linux. os.path.abspath(None) raises an error in both cases. os.path.normcase(None) should raise an error on linux. I've only marked this for 3.2 because I suspect there may be linux co