1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
--- a/setup.py
+++ b/setup.py
@@ -59,7 +59,6 @@
python_requires=">=3.7",
install_requires=[
'python-dateutil>=1.5',
- 'six>=1.10.0'
],
classifiers=[
"Development Status :: 5 - Production/Stable",
--- a/vertica_python/compat.py
+++ b/vertica_python/compat.py
@@ -67,7 +67,6 @@
from __future__ import division
from __future__ import print_function
-import six as _six
def as_bytes(bytes_or_text, encoding='utf-8'):
@@ -80,7 +79,7 @@
Raises:
TypeError: If `bytes_or_text` is not a binary or unicode string.
"""
- if isinstance(bytes_or_text, _six.text_type):
+ if isinstance(bytes_or_text, str):
return bytes_or_text.encode(encoding)
elif isinstance(bytes_or_text, bytearray):
return bytes(bytes_or_text)
@@ -101,7 +100,7 @@
Raises:
TypeError: If `bytes_or_text` is not a binary or unicode string.
"""
- if isinstance(bytes_or_text, _six.text_type):
+ if isinstance(bytes_or_text, str):
return bytes_or_text
elif isinstance(bytes_or_text, (bytes, bytearray)):
return bytes_or_text.decode(encoding)
@@ -110,10 +109,7 @@
# Convert an object to a `str` in both Python 2 and 3.
-if _six.PY2:
- as_str = as_bytes
-else:
- as_str = as_text
+as_str = as_text
def as_str_any(value):
@@ -130,7 +126,7 @@
# Either bytes or text.
-bytes_or_text_types = (bytes, bytearray, _six.text_type)
+bytes_or_text_types = (bytes, bytearray, str)
_allowed_symbols = [
'as_str',
|