From 8c17afafcc7d9d2a8fecb53b853c2b4f004c4121 Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Sat, 8 Jan 2022 13:58:04 -0800 Subject: chore: remove custom URL encoding We were using `str.replace()` calls to take care of URL encoding issues. Switch them to use our `utils.clean_str_id` which itself uses `urllib.parse.quote()` Closes: #1356 --- gitlab/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gitlab/utils.py') diff --git a/gitlab/utils.py b/gitlab/utils.py index a1dcb45..2ae107c 100644 --- a/gitlab/utils.py +++ b/gitlab/utils.py @@ -16,7 +16,7 @@ # along with this program. If not, see . from typing import Any, Callable, Dict, Optional -from urllib.parse import quote +import urllib.parse import requests @@ -57,7 +57,7 @@ def copy_dict(dest: Dict[str, Any], src: Dict[str, Any]) -> None: def clean_str_id(id: str) -> str: - return quote(id, safe="") + return urllib.parse.quote(id, safe="") def remove_none_from_dict(data: Dict[str, Any]) -> Dict[str, Any]: -- cgit v1.2.1