-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
Replace urlparse with urlsplit #27389
Conversation
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
|
why are you say |
Its not much faster and maybe its a bit overselling it to be calling it lighterweight, but it is faster as it doesn't try to parse the url for params. The second sentence here of python docs on it says "This should generally be used instead of urlparse()". |
Btw there were other files that could have this change applied to them, but I just wanted to see if it was a wanted change before I updated them too. |
Emm, But, It seems we don't need support RFC 2396 update syntax? |
I don’t think there’s any perceptible performance difference between |
there are more usages for this in the project. Should we adress them as well? |
Yup, I can add them into this pr |
some small ideas, If we replace all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like something went wrong with your git operations. you have a lot of unrelated changes.
Yeah I just saw, should I create a temp branch and cherry pick my commits? |
any strategy that works is fine :) and yeah that sounds like a working strategy. |
This was fixed, could you review again? |
Needs rebase and resolving conflicts |
This reverts commit 5d199a01ff43ec12225fbfc0e4a6fd184cae2bb7.
Awesome work, congrats on your first merged pull request! |
Replaces urlparse with urlsplit as
urlsplit
is faster and lighterweight.urlsplit
is similar to urlparse(), but does not split the params from the URL. The params functionality allows you to put variables in the url. This should generally be used instead ofurlparse()
.urlsplit
: (addressing scheme, network location, path, query, fragment identifier)urlparse
: (addressing scheme, network location, path, params, query, fragment identifier)