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 eric.smith
Recipients eric.smith, manish.satwani
Date 2021-08-05.22:10:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1628201406.92.0.302972243888.issue44842@roundup.psfhosted.org>
In-reply-to
Content
But that's a perfectly valid filename:

$ mkdir -p adl://myblob.azuredatalakestore.net/local/abc/xyz
$ ls -R adl:
'adl:':
myblob.azuredatalakestore.net/

'adl:/myblob.azuredatalakestore.net':
local/

'adl:/myblob.azuredatalakestore.net/local':
abc/

'adl:/myblob.azuredatalakestore.net/local/abc':
xyz/

'adl:/myblob.azuredatalakestore.net/local/abc/xyz':

The pathlib module isn't going to guess whether you passed it a filename or URI of some sort, especially when it's a valid filename. That's the caller's job to get right.

Removing the double slashes is a normal part of pathlib's behavior of normalizing paths, just as if you said from a bash shell "ls //etc//sysconfig", which will show the contents of "/etc/sysconfig". Although I'll admit I couldn't find this documented anywhere with a quick search.
History
Date User Action Args
2021-08-05 22:10:06eric.smithsetrecipients: + eric.smith, manish.satwani
2021-08-05 22:10:06eric.smithsetmessageid: <1628201406.92.0.302972243888.issue44842@roundup.psfhosted.org>
2021-08-05 22:10:06eric.smithlinkissue44842 messages
2021-08-05 22:10:06eric.smithcreate