Skip to content

Conversation

@pquentin
Copy link
Member

@pquentin pquentin commented Jan 5, 2024

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.

We can rely on the standard library starting from Python 3.7.
@pquentin pquentin requested review from ezimuel and technige January 5, 2024 14:02
# 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.
Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Member Author

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

@pquentin
Copy link
Member Author

Sorry, this is not done yet. I need to add a DeprecationWarning.

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.

3 participants