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

Relative path passed using join fails in pyrestcli if it has / at the beggining #95

Merged
merged 3 commits into from
Oct 18, 2018

Conversation

ethervoid
Copy link
Contributor

pyrestcli uses urljoin to merge base_url and the relative_path but if
the relative_path has / at the beggining, it overrides the current path
in the base url and that's a problem if the base url is like
https://carto.com/user/testuser so for example:

base url: https://carto.com/user/testuser
send path: /api/v3/endpoint

the url used in the send method is going to be:
https://carto.com/api/v3/endpoint removing the /user/carto path which is
really important for us

beggining

pyrestcli uses urljoin to merge base_url and the relative_path but if
the relative_path has / at the beggining, it overrides the current path
in the base url and that's a problem if the base url is like
https://carto.com/user/testuser so for example:

base url: https://carto.com/user/testuser
send path: /api/v3/endpoint

the url used in the send method is going to be:
https://carto.com/api/v3/endpoint removing the /user/carto path which is
really important for us
@ethervoid ethervoid requested a review from alrocar October 17, 2018 16:29
@@ -17,7 +17,7 @@
author="Daniel Carrión",
author_email="daniel@carto.com",
description="SDK around CARTO's APIs",
version="1.3.0",
version="1.3.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a new release could you please update the version in conf.py and NEWS.md? See the release process here

@ethervoid
Copy link
Contributor Author

@alrocar second 👁️ ?

Copy link
Contributor

@alrocar alrocar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

I'm going to merge and see if I can do the release today.

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants