Message262786
Thomas: My check for os.path.devnull was just a half-hearted attempt to check for special device names like NUL on Windows. It is far from foolproof, and would fail my CON.fusion test that I mentioned above. Anyway, to address this specific bug it would be better to keep the changes to a minimum and not add any new APIs.
One slight concern I have with Philipp’s patch is the new os_path parameter. I am a bit squeamish about adding parameters that are just to help testing. Perhaps it is enough to just rely on testing this on Windows, or to monkey-patch os.path = ntpath in the test suite? What do others think?
I am posting a modified version (v3) of Philipp’s patch. This version monkey-patches os.path in the tests and avoids the os_path parameter. It is also stricter, by ignoring any path component that does not appear to be a simple file or directory name.
This version will change how some questionable URLs are handled, but I expect that all of these URLs won’t have genuine use cases. Let me know if you think it is okay or not. |
|
| Date |
User |
Action |
Args |
| 2016-04-02 03:59:55 | martin.panter | set | recipients:
+ martin.panter, paul.moore, tim.golden, phihag, zach.ware, steve.dower, xiang.zhang, Thomas |
| 2016-04-02 03:59:55 | martin.panter | set | messageid: <1459569595.75.0.451230687393.issue26657@psf.upfronthosting.co.za> |
| 2016-04-02 03:59:55 | martin.panter | link | issue26657 messages |
| 2016-04-02 03:59:55 | martin.panter | create | |
|