Skip to content

Commit 18697bd

Browse files
committed
Fully remove percent_encode
1 parent e6be2fb commit 18697bd

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

elastic_transport/client_utils.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
"create_user_agent",
4040
"dataclasses",
4141
"parse_cloud_id",
42-
"percent_encode",
4342
"resolve_default",
4443
"to_bytes",
4544
"to_str",
@@ -149,18 +148,6 @@ def to_bytes(
149148
return value
150149

151150

152-
def percent_encode(
153-
string: Union[bytes, str],
154-
safe: str = "/",
155-
encoding: Optional[str] = None,
156-
errors: Optional[str] = None,
157-
) -> str:
158-
"""Percent-encodes a string so it can be used in an HTTP request target"""
159-
# This function used to add `~` to unreserverd characters, but this was fixed in Python 3.7.
160-
# Keeping the function here as it is part of the public API.
161-
return _quote(string, safe, encoding=encoding, errors=errors) # type: ignore[arg-type]
162-
163-
164151
def basic_auth_to_header(basic_auth: Tuple[str, str]) -> str:
165152
"""Converts a 2-tuple into a 'Basic' HTTP Authorization header"""
166153
if (

0 commit comments

Comments
 (0)