[Python-Dev] os.path.normcase() in site.py

Just van Rossum just@letterror.com
Mon, 25 Jun 2001 08:55:17 +0200

I noticed that these days __file__ attributes of modules are case normalized
(ie. lowercased on case insensitive file systems), or at least the directory
part. Then I noticed that this is caused by the fact that all sys.path entries
are case normalized. It turns out that site.py does this, in a function called
makepath(), added by Fred about 8 months ago.

I think this is wrong: we should always try to *preserve* case. I see
os.path.normcase() as a tool to be able to better compare two paths, but you
shouldn't *store* paths this way. I for one am irritated when I see a path that
doesn't have the proper case.

The intention of makepath() in site.py seems good -- it turns all paths into
absolute paths -- but is the normcase really neccesary?

*** Please CC follow-ups to me, as I'm not on python-dev.