Drop usage of six

six has been used but is not listed in requirements. It's no longer
installed by dependencies.

Remove usage of six because it's no longer required with python 2
support removed.

Change-Id: I7aae4ba993e20dcba0ce7fd3c377616d7a617224
This commit is contained in:
Takashi Kajinami
2024-04-26 23:45:19 +09:00
parent b4f1db2231
commit 64dc97ddd7
3 changed files with 6 additions and 7 deletions

View File

@@ -19,7 +19,6 @@ import lxml.etree
import lxml.objectify
import requests.exceptions
import requests_mock
import six
from dracclient import exceptions
from dracclient.tests import base
@@ -58,8 +57,9 @@ class ClientTestCase(base.BaseTest):
@requests_mock.Mocker()
def test_enumerate_with_invalid_utf8(self, mock_requests):
mock_requests.post('https://1.2.3.4:443/wsman',
content=six.b('<result>yay!\xC0</result>'))
mock_requests.post(
'https://1.2.3.4:443/wsman',
content=b'<result>yay!\xC0</result>')
resp = self.client.enumerate('resource')
self.assertEqual('yay!', resp.text)

View File

@@ -13,7 +13,6 @@
import logging
import re
import six
import time
import uuid
@@ -167,9 +166,8 @@ class Client(object):
# Filter out everything except for printable ASCII characters and
# tab
resp_xml = ElementTree.fromstring(re.sub(six.b('[^\x20-\x7e\t]'),
six.b(''),
resp.content))
resp_xml = ElementTree.fromstring(re.sub(
b'[^\x20-\x7e\t]', b'', resp.content))
if auto_pull:
# The first response returns "<wsman:Items>"

View File

@@ -6,6 +6,7 @@ maintainer = DracClient Team
author_email = openstack-discuss@lists.openstack.org
home_page = https://launchpad.net/python-dracclient
license = Apache-2
python_requires = >=3.6
classifier =
Intended Audience :: Developers
Intended Audience :: Information Technology