-
Notifications
You must be signed in to change notification settings - Fork 16
Remove custom implementation of percent_encode #142
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
base: main
Are you sure you want to change the base?
Conversation
We can rely on the standard library starting from Python 3.7.
# within the 'ALWAYS_SAFE' list. The character was added in Python 3.7 | ||
safe = "".join(_QUOTE_ALWAYS_SAFE.union(set(safe))) | ||
# This function used to add `~` to unreserverd characters, but this was fixed in Python 3.7. | ||
# Keeping the function here as it is part of the public API. |
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.
Can the function be deprecated, though? My guess is that we'd want to steer people away from using a custom function now that it is simply a wrapper.
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.
It can be deprecated, but is currently used in elasticsearch-py. I'll look into doing it, thanks.
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.
Currently blocked by elastic/elasticsearch-py#2268.
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.
18697bd
to
e6be2fb
Compare
Sorry, this is not done yet. I need to add a |
We can rely on the standard library starting from Python 3.7. See https://docs.python.org/3/library/urllib.parse.html#urllib.parse.quote.