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 <1459569595.75.0.451230687393.issue26657@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
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: <1459569595.75.0.451230687393.issue26657@psf.upfronthosting.co.za>
2016-04-02 03:59:55martin.panterlinkissue26657 messages
2016-04-02 03:59:55martin.pantercreate