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
|
testtools>=0.9.30
|
||||||
oslo.db>=6.0.0;python_version>='3.6'
|
oslo.db>=6.0.0;python_version>='3.6'
|
||||||
oslo.db==6.0.0;python_version<='3.5'
|
oslo.db==6.0.0;python_version<='3.5'
|
||||||
six
|
|
||||||
|
@ -12,8 +12,6 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import six
|
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
|
||||||
@ -147,7 +145,7 @@ class LogNode(object):
|
|||||||
else:
|
else:
|
||||||
if value is None:
|
if value is None:
|
||||||
p.text(tc.Blue)
|
p.text(tc.Blue)
|
||||||
elif isinstance(value, six.string_types):
|
elif isinstance(value, str):
|
||||||
p.text(tc.Red)
|
p.text(tc.Red)
|
||||||
elif isinstance(value, Number):
|
elif isinstance(value, Number):
|
||||||
p.text(tc.DarkGray)
|
p.text(tc.DarkGray)
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
import six
|
|
||||||
import subunit
|
import subunit
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
@ -144,13 +143,7 @@ class FileProvider(SubunitProvider):
|
|||||||
class StandardInputProvider(SubunitProvider):
|
class StandardInputProvider(SubunitProvider):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.buffer = BytesIO()
|
self.buffer = BytesIO()
|
||||||
# Subunit is a binary protocol we need to ensure we read
|
shutil.copyfileobj(sys.stdin.buffer, self.buffer)
|
||||||
# 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)
|
|
||||||
self.buffer.seek(0)
|
self.buffer.seek(0)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
x
Reference in New Issue
Block a user