Message210460
In trying to figure out why my fix for issue 20053 wasn't working on Windows, I eventually traced it back to the fact that "os.path.exists(os.devnull)" returns False on Windows, so pip isn't picking up my config file override in ensurepip, and reads the global default config file anyway.
However, if you do "if exist NUL (echo exists) ELSE (echo missing)" in cmd, it will print "exists", so this looks like a bug in our os.path.exists implementation.
That is currently implemented in genericpath and assumes that a file exists if-and-only-if os.stat(name) doesn't throw an exception.
It turns out this assumption isn't really correct on Windows - 'NUL' and 'CON' (and presumably other special files) can be opened, but trying to do os.stat() on them throws an exception. |
|
Date |
User |
Action |
Args |
2014-02-07 12:47:34 | ncoghlan | set | recipients:
+ ncoghlan |
2014-02-07 12:47:34 | ncoghlan | set | messageid: <1391777254.4.0.885932258701.issue20541@psf.upfronthosting.co.za> |
2014-02-07 12:47:34 | ncoghlan | link | issue20541 messages |
2014-02-07 12:47:33 | ncoghlan | create | |
|