urlpath
urlpath copied to clipboard
URLPath drops text between semicolons
Hi! We are using URLPath to handle S3 filepaths (and pathlib for local filepaths). This works well for us, as both have attributes like .suffix
.
An issue we are running into, however, is how some S3 filepaths are handled. It seems to be removing text if there are more than 2 colons in a string. For example, the first abc
is dropped in this case, however it is preserved in urlib
from urlpath import URL
from urllib.parse import urlparse, urlunparse
a = "s3://s3-bucket-name/abc:abc:abc"
print(URL(a))
# s3://s3-bucket-name/abc:abc
print(urlunparse(urlparse(a)))
# s3://s3-bucket-name/abc:abc:abc
Is this expected behavior? We are using Python 3.6, and urlpath 1.1.4