[issue44842] String conversion of Path removes '/' from original url

2021-08-05 Thread Eric V. Smith
Eric V. Smith added the comment: 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

[issue44842] String conversion of Path removes '/' from original url

2021-08-05 Thread Manish Satwani
Manish Satwani added the comment: Thanks for the update Eric, if it is not designed to support URI it should tell to the user. It is very wired it just returns wrong data. You can detect it very well if user has specified URI or not. -- ___ Python

[issue44842] String conversion of Path removes '/' from original url

2021-08-05 Thread Eric V. Smith
Eric V. Smith added the comment: pathlib is not designed to support URIs, so this behavior is not surprising. You want to use a different library, maybe urllib. -- nosy: +eric.smith ___ Python tracker

[issue44842] String conversion of Path removes '/' from original url

2021-08-05 Thread Manish Satwani
Manish Satwani added the comment: import pathlib p = pathlib.Path('adl://myblob.azuredatalakestore.net/local/abc/xyz') s = str(p) print(s) what you expect s to be?? There is a bug in path.Path.str(conversion to string) and it remove a slash s is 'adl:/myblob.azuredatalakestore.net/local/abc/xyz

[issue44842] String conversion of Path removes '/' from original url

2021-08-05 Thread Manish Satwani
New submission from Manish Satwani : import pathlib p = pathlib.Path('adl://myblob.azuredatalakestore.net/local/abc/xyz') s = str(p) print(s) what you expect s to be?? There is a bug in path.Path.str(conversion to string) and it remove a slash s is 'adl:/myblob.azuredatalakestore.net/local/abc/x