From 1a3a9f2fe3523f27589db9df8b3008ce95b7a956 Mon Sep 17 00:00:00 2001 From: Haibo Lin Date: Oct 19 2022 10:15:16 +0000 Subject: client: Drop python 2 support JIRA: RHELCMP-3213 Signed-off-by: Haibo Lin --- diff --git a/client/odcs/client/odcs.py b/client/odcs/client/odcs.py index 73eaf1c..d007ec8 100644 --- a/client/odcs/client/odcs.py +++ b/client/odcs/client/odcs.py @@ -26,7 +26,8 @@ import json import requests import time -from six.moves import urllib_parse +from urllib.parse import urljoin + from requests_gssapi import HTTPKerberosAuth, OPTIONAL @@ -393,7 +394,7 @@ class ODCS(object): :return: the whole complete URL of requested resource. :rtype: str """ - return urllib_parse.urljoin( + return urljoin( self._server_url, "api/{0}/{1}".format(self.api_version, resource_path.lstrip("/")), ) diff --git a/client/requirements.txt b/client/requirements.txt index da735da..b286e53 100644 --- a/client/requirements.txt +++ b/client/requirements.txt @@ -1,6 +1,4 @@ +openidc-client pyOpenSSL -# qpid-python # Python2 only; not necessary; just to hide warning messages -six -requests-gssapi requests -openidc-client +requests-gssapi diff --git a/setup.py b/setup.py index a9bb2b4..2d3d27c 100644 --- a/setup.py +++ b/setup.py @@ -63,7 +63,7 @@ setup( long_description_content_type="text/markdown", version="0.3.8", classifiers=[ - "Programming Language :: Python", + "Programming Language :: Python :: 3" "Topic :: Software Development :: Build Tools", ], keywords="on demand compose service modularity fedora", diff --git a/tox.ini b/tox.ini index 66b4963..1a11317 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ # and then run "tox" from this directory. [tox] -envlist = py27, py3, flake8, bandit, black, docs +envlist = py3, flake8, bandit, black, docs [testenv:py3] install_command = pip install --force-reinstall --ignore-installed {packages} @@ -19,17 +19,6 @@ setenv = ODCS_DEVELOPER_ENV=1 sitepackages = true -[testenv:py27] -commands = - pip install pytest pytest-cov mock requests requests-gssapi - py.test \ - -W "ignore:inspect.getargspec:DeprecationWarning" \ - client/tests/ \ - {posargs} -setenv = - PYTHONPATH = {toxinidir}/client - ODCS_DEVELOPER_ENV=1 - [testenv:flake8] basepython = python3 skip_install = true