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:
@@ -19,7 +19,6 @@ import lxml.etree
|
|||||||
import lxml.objectify
|
import lxml.objectify
|
||||||
import requests.exceptions
|
import requests.exceptions
|
||||||
import requests_mock
|
import requests_mock
|
||||||
import six
|
|
||||||
|
|
||||||
from dracclient import exceptions
|
from dracclient import exceptions
|
||||||
from dracclient.tests import base
|
from dracclient.tests import base
|
||||||
@@ -58,8 +57,9 @@ class ClientTestCase(base.BaseTest):
|
|||||||
|
|
||||||
@requests_mock.Mocker()
|
@requests_mock.Mocker()
|
||||||
def test_enumerate_with_invalid_utf8(self, mock_requests):
|
def test_enumerate_with_invalid_utf8(self, mock_requests):
|
||||||
mock_requests.post('https://1.2.3.4:443/wsman',
|
mock_requests.post(
|
||||||
content=six.b('<result>yay!\xC0</result>'))
|
'https://1.2.3.4:443/wsman',
|
||||||
|
content=b'<result>yay!\xC0</result>')
|
||||||
|
|
||||||
resp = self.client.enumerate('resource')
|
resp = self.client.enumerate('resource')
|
||||||
self.assertEqual('yay!', resp.text)
|
self.assertEqual('yay!', resp.text)
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
import six
|
|
||||||
import time
|
import time
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
@@ -167,9 +166,8 @@ class Client(object):
|
|||||||
|
|
||||||
# Filter out everything except for printable ASCII characters and
|
# Filter out everything except for printable ASCII characters and
|
||||||
# tab
|
# tab
|
||||||
resp_xml = ElementTree.fromstring(re.sub(six.b('[^\x20-\x7e\t]'),
|
resp_xml = ElementTree.fromstring(re.sub(
|
||||||
six.b(''),
|
b'[^\x20-\x7e\t]', b'', resp.content))
|
||||||
resp.content))
|
|
||||||
|
|
||||||
if auto_pull:
|
if auto_pull:
|
||||||
# The first response returns "<wsman:Items>"
|
# The first response returns "<wsman:Items>"
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ maintainer = DracClient Team
|
|||||||
author_email = openstack-discuss@lists.openstack.org
|
author_email = openstack-discuss@lists.openstack.org
|
||||||
home_page = https://launchpad.net/python-dracclient
|
home_page = https://launchpad.net/python-dracclient
|
||||||
license = Apache-2
|
license = Apache-2
|
||||||
|
python_requires = >=3.6
|
||||||
classifier =
|
classifier =
|
||||||
Intended Audience :: Developers
|
Intended Audience :: Developers
|
||||||
Intended Audience :: Information Technology
|
Intended Audience :: Information Technology
|
||||||
|
|||||||
Reference in New Issue
Block a user