This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients Thomas, martin.panter, paul.moore, phihag, steve.dower, tim.golden, xiang.zhang, zach.ware
Date 2016-04-02.03:59:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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:55martin.pantersetrecipients: + martin.panter, paul.moore, tim.golden, phihag, zach.ware, steve.dower, xiang.zhang, Thomas
2016-04-02 03:59:55martin.pantersetmessageid: <>
2016-04-02 03:59:55martin.panterlinkissue26657 messages
2016-04-02 03:59:55martin.pantercreate