This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
The following commit(s) were added to refs/heads/master by this push:
new 9231b31 Removed dependency on six in gremlin-python
9231b31 is described below
commit 9231b319c6293cd130999e13b21b6d7ffb123557
Author: Stephen Mallette <[email protected]>
AuthorDate: Fri Feb 18 12:03:22 2022 -0500
Removed dependency on six in gremlin-python
Since six is a python 2/3 compatibility library and we removed support for
python 2 in 3.5.0, there is little need for keeping six related code in place.
Migrated all six code to native python 3 and removed the dependency. CTR
---
CHANGELOG.asciidoc | 1 +
gremlin-python/src/main/python/gremlin_python/driver/client.py | 2 +-
gremlin-python/src/main/python/gremlin_python/driver/connection.py | 2 +-
gremlin-python/src/main/python/gremlin_python/driver/protocol.py | 4 +---
.../src/main/python/gremlin_python/driver/remote_connection.py | 4 +---
gremlin-python/src/main/python/gremlin_python/driver/transport.py | 4 +---
.../src/main/python/gremlin_python/structure/io/graphbinaryV1.py | 4 +---
.../src/main/python/gremlin_python/structure/io/graphsonV2d0.py | 4 +---
.../src/main/python/gremlin_python/structure/io/graphsonV3d0.py | 4 +---
gremlin-python/src/main/python/setup.py | 1 -
gremlin-python/src/main/python/tests/conftest.py | 3 +--
.../python/tests/driver/test_driver_remote_connection_threaded.py | 2 +-
12 files changed, 11 insertions(+), 24 deletions(-)
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index b69c50b..d95a3b1 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -53,6 +53,7 @@
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
* Removed previously deprecated `AuthenticationSettings.enableAuditLog`.
* Removed previously deprecated `GroovyTranslator` from `gremlin-groovy`
module.
* Removed previously deprecated Gremlin steps that conflicted with Python
keywords.
+* Removed the dependency on `six` from `gremlin-python`.
* Bumped to Apache Hadoop 3.3.1.
* Bumped to Apache Spark 3.2.0.
* Bumped node.js in `gremlin-javascript` to v16.13.0.
diff --git a/gremlin-python/src/main/python/gremlin_python/driver/client.py
b/gremlin-python/src/main/python/gremlin_python/driver/client.py
index 8c560ac..6f2bf9b 100644
--- a/gremlin-python/src/main/python/gremlin_python/driver/client.py
+++ b/gremlin-python/src/main/python/gremlin_python/driver/client.py
@@ -18,8 +18,8 @@
#
import logging
import warnings
+import queue
from concurrent.futures import ThreadPoolExecutor
-from six.moves import queue
from gremlin_python.driver import connection, protocol, request, serializer
from gremlin_python.process import traversal
diff --git a/gremlin-python/src/main/python/gremlin_python/driver/connection.py
b/gremlin-python/src/main/python/gremlin_python/driver/connection.py
index 705d9d7..c26a09e 100644
--- a/gremlin-python/src/main/python/gremlin_python/driver/connection.py
+++ b/gremlin-python/src/main/python/gremlin_python/driver/connection.py
@@ -15,8 +15,8 @@
# specific language governing permissions and limitations
# under the License.
import uuid
+import queue
from concurrent.futures import Future
-from six.moves import queue
from gremlin_python.driver import resultset
diff --git a/gremlin-python/src/main/python/gremlin_python/driver/protocol.py
b/gremlin-python/src/main/python/gremlin_python/driver/protocol.py
index 28eca8b..39aafe9 100644
--- a/gremlin-python/src/main/python/gremlin_python/driver/protocol.py
+++ b/gremlin-python/src/main/python/gremlin_python/driver/protocol.py
@@ -22,7 +22,6 @@ import base64
import struct
# import kerberos Optional dependency imported in relevant codeblock
-import six
try:
import ujson as json
@@ -52,8 +51,7 @@ class ConfigurationError(Exception):
pass
[email protected]_metaclass(abc.ABCMeta)
-class AbstractBaseProtocol:
+class AbstractBaseProtocol(metaclass=abc.ABCMeta):
@abc.abstractmethod
def connection_made(self, transport):
diff --git
a/gremlin-python/src/main/python/gremlin_python/driver/remote_connection.py
b/gremlin-python/src/main/python/gremlin_python/driver/remote_connection.py
index 6c5830d..7bd6172 100644
--- a/gremlin-python/src/main/python/gremlin_python/driver/remote_connection.py
+++ b/gremlin-python/src/main/python/gremlin_python/driver/remote_connection.py
@@ -17,15 +17,13 @@
# under the License.
#
import abc
-import six
from gremlin_python.process import traversal
__author__ = 'Marko A. Rodriguez (http://markorodriguez.com), Lyndon Bauto
([email protected])'
[email protected]_metaclass(abc.ABCMeta)
-class RemoteConnection(object):
+class RemoteConnection(object, metaclass=abc.ABCMeta):
def __init__(self, url, traversal_source):
self._url = url
self._traversal_source = traversal_source
diff --git a/gremlin-python/src/main/python/gremlin_python/driver/transport.py
b/gremlin-python/src/main/python/gremlin_python/driver/transport.py
index e7535e0..e6ae3d5 100644
--- a/gremlin-python/src/main/python/gremlin_python/driver/transport.py
+++ b/gremlin-python/src/main/python/gremlin_python/driver/transport.py
@@ -17,13 +17,11 @@
# under the License.
#
import abc
-import six
__author__ = 'David M. Brown ([email protected])'
[email protected]_metaclass(abc.ABCMeta)
-class AbstractBaseTransport:
+class AbstractBaseTransport(metaclass=abc.ABCMeta):
@abc.abstractmethod
def connect(self, url, headers=None):
diff --git
a/gremlin-python/src/main/python/gremlin_python/structure/io/graphbinaryV1.py
b/gremlin-python/src/main/python/gremlin_python/structure/io/graphbinaryV1.py
index f39197a..b20b70c 100644
---
a/gremlin-python/src/main/python/gremlin_python/structure/io/graphbinaryV1.py
+++
b/gremlin-python/src/main/python/gremlin_python/structure/io/graphbinaryV1.py
@@ -17,7 +17,6 @@ specific language governing permissions and limitations
under the License.
"""
-import six
import datetime
import calendar
import uuid
@@ -204,8 +203,7 @@ class GraphBinaryReader(object):
return self.deserializers[data_type].objectify(buff, self,
nullable)
[email protected]_metaclass(GraphBinaryTypeType)
-class _GraphBinaryTypeIO(object):
+class _GraphBinaryTypeIO(object, metaclass=GraphBinaryTypeType):
python_type = None
graphbinary_type = None
diff --git
a/gremlin-python/src/main/python/gremlin_python/structure/io/graphsonV2d0.py
b/gremlin-python/src/main/python/gremlin_python/structure/io/graphsonV2d0.py
index 20d186e..14426ef 100644
--- a/gremlin-python/src/main/python/gremlin_python/structure/io/graphsonV2d0.py
+++ b/gremlin-python/src/main/python/gremlin_python/structure/io/graphsonV2d0.py
@@ -26,7 +26,6 @@ from collections import OrderedDict
from decimal import *
from datetime import timedelta
-import six
from aenum import Enum
from isodate import parse_duration, duration_isoformat
@@ -133,8 +132,7 @@ class GraphSONReader(object):
return obj
[email protected]_metaclass(GraphSONTypeType)
-class _GraphSONTypeIO(object):
+class _GraphSONTypeIO(object, metaclass=GraphSONTypeType):
python_type = None
graphson_type = None
diff --git
a/gremlin-python/src/main/python/gremlin_python/structure/io/graphsonV3d0.py
b/gremlin-python/src/main/python/gremlin_python/structure/io/graphsonV3d0.py
index 9ba2127..c20b5cd 100644
--- a/gremlin-python/src/main/python/gremlin_python/structure/io/graphsonV3d0.py
+++ b/gremlin-python/src/main/python/gremlin_python/structure/io/graphsonV3d0.py
@@ -24,7 +24,6 @@ from decimal import *
import logging
from datetime import timedelta
-import six
from aenum import Enum
from isodate import parse_duration, duration_isoformat
@@ -135,8 +134,7 @@ class GraphSONReader(object):
return obj
[email protected]_metaclass(GraphSONTypeType)
-class _GraphSONTypeIO(object):
+class _GraphSONTypeIO(object, metaclass=GraphSONTypeType):
python_type = None
graphson_type = None
diff --git a/gremlin-python/src/main/python/setup.py
b/gremlin-python/src/main/python/setup.py
index 2a6cbce..8c94635 100644
--- a/gremlin-python/src/main/python/setup.py
+++ b/gremlin-python/src/main/python/setup.py
@@ -48,7 +48,6 @@ install_requires = [
'nest_asyncio',
'aiohttp>=3.8.0,<=3.8.1',
'aenum>=1.4.5,<4.0.0',
- 'six>=1.10.0,<2.0.0',
'isodate>=0.6.0,<1.0.0'
]
diff --git a/gremlin-python/src/main/python/tests/conftest.py
b/gremlin-python/src/main/python/tests/conftest.py
index fc3ef8b..64f66bf 100644
--- a/gremlin-python/src/main/python/tests/conftest.py
+++ b/gremlin-python/src/main/python/tests/conftest.py
@@ -22,8 +22,7 @@ import ssl
import pytest
import socket
import logging
-
-from six.moves import queue
+import queue
from gremlin_python.driver.client import Client
from gremlin_python.driver.connection import Connection
diff --git
a/gremlin-python/src/main/python/tests/driver/test_driver_remote_connection_threaded.py
b/gremlin-python/src/main/python/tests/driver/test_driver_remote_connection_threaded.py
index c3899a4..665690a 100644
---
a/gremlin-python/src/main/python/tests/driver/test_driver_remote_connection_threaded.py
+++
b/gremlin-python/src/main/python/tests/driver/test_driver_remote_connection_threaded.py
@@ -18,8 +18,8 @@
#
import concurrent.futures
import sys
+import queue
from threading import Thread
-from six.moves import queue
from gremlin_python.driver.driver_remote_connection import (
DriverRemoteConnection)