Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erroneous double slash in returned URL #10

Open
impredicative opened this issue Feb 13, 2020 · 1 comment
Open

Erroneous double slash in returned URL #10

impredicative opened this issue Feb 13, 2020 · 1 comment

Comments

@impredicative
Copy link

impredicative commented Feb 13, 2020

I am trying urlpath 1.1.4 with Python 3.8. The output it's producing has an extra slash:

>>> from urlpath import URL
>>> URL('s3://mybucket/') / 'myprefix'
URL('s3://mybucket//myprefix')

There is an extra slash above between mybucket and myprefix which shouldn't exist.

Compare it with the output of pathlib which is undesirable in another way, but doesn't have this extra slash in that location:

>>> from pathlib import Path
>>> Path('s3://mybucket/') / 'myprefix'
PosixPath('s3:/mybucket/myprefix')
@pykong
Copy link

pykong commented May 14, 2021

Possibly related: The .with_scheme method adds a triple slash.

url = URL("www.abc.com").with.scheme("https")
print(url)  # prints https:///www.abc.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants