From b0500f5238c302027a9c8c405b01fb345e71105b Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Tue, 19 Nov 2024 09:56:25 +0100 Subject: [PATCH] always use urllib.parse, Python2 is no more --- apypie/api.py | 5 +---- apypie/route.py | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/apypie/api.py b/apypie/api.py index d210a5a..a708d87 100644 --- a/apypie/api.py +++ b/apypie/api.py @@ -12,10 +12,7 @@ except ImportError: JSONDecodeError = ValueError # type: ignore import os -try: - from urlparse import urljoin # type: ignore -except ImportError: - from urllib.parse import urljoin # type: ignore +from urllib.parse import urljoin # type: ignore import requests from apypie.resource import Resource diff --git a/apypie/route.py b/apypie/route.py index 384cc6b..d48cd61 100644 --- a/apypie/route.py +++ b/apypie/route.py @@ -4,10 +4,7 @@ from __future__ import print_function, absolute_import -try: - from urllib.parse import quote # type: ignore -except ImportError: - from urllib import quote # type: ignore +from urllib.parse import quote # type: ignore from typing import List, Optional # pylint: disable=unused-import