Remove six dependency
Change-Id: I6b7c8bed9d7ac6427e57bb146ce95de7e8bf1934
This commit is contained in:
parent
1719826f87
commit
647289fef6
@ -2,4 +2,3 @@ python-subunit>=0.0.18
|
||||
testtools>=0.9.30
|
||||
oslo.db>=6.0.0;python_version>='3.6'
|
||||
oslo.db==6.0.0;python_version<='3.5'
|
||||
six
|
||||
|
@ -12,8 +12,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import six
|
||||
|
||||
from datetime import datetime
|
||||
from datetime import timedelta
|
||||
|
||||
@ -147,7 +145,7 @@ class LogNode(object):
|
||||
else:
|
||||
if value is None:
|
||||
p.text(tc.Blue)
|
||||
elif isinstance(value, six.string_types):
|
||||
elif isinstance(value, str):
|
||||
p.text(tc.Red)
|
||||
elif isinstance(value, Number):
|
||||
p.text(tc.DarkGray)
|
||||
|
@ -15,7 +15,6 @@
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import six
|
||||
import subunit
|
||||
import sys
|
||||
|
||||
@ -144,13 +143,7 @@ class FileProvider(SubunitProvider):
|
||||
class StandardInputProvider(SubunitProvider):
|
||||
def __init__(self):
|
||||
self.buffer = BytesIO()
|
||||
# Subunit is a binary protocol we need to ensure we read
|
||||
# the contents as binary. On python3 this requires we use
|
||||
# the stdin.buffer object as stdin is encoded otherwise.
|
||||
if six.PY3:
|
||||
shutil.copyfileobj(sys.stdin.buffer, self.buffer)
|
||||
else:
|
||||
shutil.copyfileobj(sys.stdin, self.buffer)
|
||||
shutil.copyfileobj(sys.stdin.buffer, self.buffer)
|
||||
self.buffer.seek(0)
|
||||
|
||||
@property
|
||||
|
Loading…
Reference in New Issue
Block a user