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 eryksun
Recipients barneygale, eryksun, terry.reedy
Date 2021-06-12.21:05:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1623531945.96.0.289001876444.issue44316@roundup.psfhosted.org>
In-reply-to
Content
> single dots are collapsed

For pathlib, I've previously discussed a desire to retain a leading dot component from the initializing path. This could be implemented in strict mode for normpath(). 

A leading dot is significant in the path of an executable in a search context, such as the first item in the args sequence of subprocess.Popen(). For example, if "./spam" is normalized as "spam", then the system will search the PATH directories instead of the current working directory. It's also import to note that in Windows a leading dot component is required in order to preclude searching even if the path contains slashes. For example, CreateProcessW() and SearchPathW() will try to resolve r"spam\eggs.exe" against every directory in the search path, whereas r".\spam\eggs.exe" is explicitly relative to just the current working directory.

Retaining a leading dot component can also be important in Windows in order to disambiguate a drive-relative path from a named data stream of a file that has a single-letter filename. For example, "C:spam" is a file named "spam" in the working path on drive "C:" (e.g. "C:spam" -> r"C:\working\path\spam"), but r".\C:spam" is a data stream named "spam" in a file named "C" in the current working directory.
History
Date User Action Args
2021-06-12 21:05:45eryksunsetrecipients: + eryksun, terry.reedy, barneygale
2021-06-12 21:05:45eryksunsetmessageid: <1623531945.96.0.289001876444.issue44316@roundup.psfhosted.org>
2021-06-12 21:05:45eryksunlinkissue44316 messages
2021-06-12 21:05:45eryksuncreate