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 izbyshev
Recipients eryksun, izbyshev, miss-islington, paul.moore, steve.dower, tim.golden, zach.ware
Date 2018-03-08.23:22:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> unless users are not prepared to deal with it
ARE prepared

> What do you think about handling this failure by calling GetFullPathName instead (e.g. "C:\Temp\NUL" => "\\.\NUL")?

I think it would indeed be nice if pathlib handled such paths in its resolve(), especially since os.path.abspath() does handle them, and it looks weird that even resolve(strict=False) fails. That could be an enhancement, but note that it'll expose users to '\\.\'-prefixed paths which can't be returned from resolve() now. It is not necessary a problem because users should be prepared to handle UNC-like paths anyway.

> Currently pathlib's resolve method doesn't handle PermissionError like I think it should in non-strict mode. It only handles FileNotFoundError

That behavior doesn't look good, and it's inconsistent with POSIX resolve() which doesn't propagate any OSError in non-strict mode. I think this warrants an issue report.
Date User Action Args
2018-03-08 23:22:07izbyshevsetrecipients: + izbyshev, paul.moore, tim.golden, zach.ware, eryksun, steve.dower, miss-islington
2018-03-08 23:22:07izbyshevsetmessageid: <>
2018-03-08 23:22:07izbyshevlinkissue33016 messages
2018-03-08 23:22:07izbyshevcreate