diff --git a/gremlin-python/docker-compose.yml b/gremlin-python/docker-compose.yml index 5f9ef5dd4cf..8b46dff2ad7 100644 --- a/gremlin-python/docker-compose.yml +++ b/gremlin-python/docker-compose.yml @@ -72,7 +72,7 @@ services: bash -c "apt-get update && apt-get -y install libkrb5-dev krb5-user && echo 'password' | kinit stephen && klist - && pip install wheel radish-bdd PyHamcrest aenum isodate kerberos six + && pip install wheel radish-bdd PyHamcrest aenum isodate kerberos && python3 ./setup.py build && python3 ./setup.py test && python3 ./setup.py install diff --git a/gremlin-python/src/main/python/examples/requirements.txt b/gremlin-python/src/main/python/examples/requirements.txt index fb17e70620f..d4399eca742 100644 --- a/gremlin-python/src/main/python/examples/requirements.txt +++ b/gremlin-python/src/main/python/examples/requirements.txt @@ -25,5 +25,4 @@ frozenlist==1.4.1 idna==3.6 isodate==0.6.1 multidict==6.0.5 -six==1.16.0 yarl==1.9.4 diff --git a/gremlin-python/src/main/python/setup.cfg b/gremlin-python/src/main/python/setup.cfg index a4a55e0a1e5..d63f2e15104 100644 --- a/gremlin-python/src/main/python/setup.cfg +++ b/gremlin-python/src/main/python/setup.cfg @@ -14,9 +14,6 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -[bdist_wheel] -universal=1 - [aliases] test=pytest diff --git a/gremlin-python/src/main/python/setup.py b/gremlin-python/src/main/python/setup.py index 2ca7e9a1676..88d4d8c8618 100644 --- a/gremlin-python/src/main/python/setup.py +++ b/gremlin-python/src/main/python/setup.py @@ -48,13 +48,9 @@ 'nest_asyncio', 'aiohttp>=3.8.0,<4.0.0', 'aenum>=1.4.5,<4.0.0', - 'six>=1.10.0,<2.0.0', 'isodate>=0.6.0,<1.0.0' ] -if sys.version_info < (3, 5): - install_requires += ['pyparsing>=2.4.7,<3.0.0'] - setup( name='gremlinpython', version=version, @@ -62,7 +58,7 @@ 'gremlin_python.driver.aiohttp', 'gremlin_python.process', 'gremlin_python.structure', 'gremlin_python.structure.io'], license='Apache 2', - url='http://tinkerpop.apache.org', + url='https://tinkerpop.apache.org', description='Gremlin-Python for Apache TinkerPop', long_description=codecs.open("README.rst", "r", "UTF-8").read(), long_description_content_type='text/x-rst', @@ -74,7 +70,6 @@ ], tests_require=[ 'pytest>=4.6.4,<7.2.0', - 'mock>=3.0.5,<5.0.0', 'radish-bdd==0.13.4', 'PyHamcrest>=1.9.0,<3.0.0', 'PyYAML>=5.3' diff --git a/gremlin-python/src/main/python/tests/structure/io/test_graphsonV2d0.py b/gremlin-python/src/main/python/tests/structure/io/test_graphsonV2d0.py index 2bc2acbb8d9..8bcb1fbb011 100644 --- a/gremlin-python/src/main/python/tests/structure/io/test_graphsonV2d0.py +++ b/gremlin-python/src/main/python/tests/structure/io/test_graphsonV2d0.py @@ -26,7 +26,7 @@ import math from decimal import * -from mock import Mock +from unittest.mock import Mock from gremlin_python.statics import * from gremlin_python.structure.graph import Vertex, Edge, Property, VertexProperty, Graph, Path @@ -38,7 +38,7 @@ from gremlin_python.process.anonymous_traversal import traversal -class TestGraphSONReader(object): +class TestGraphSONReader: graphson_reader = GraphSONReader() def test_number_input(self): @@ -217,7 +217,7 @@ def test_path(self): def test_custom_mapping(self): # extended mapping - class X(object): + class X: pass type_string = "test:Xtype" @@ -299,7 +299,7 @@ def test_null(self): assert c is None -class TestGraphSONWriter(object): +class TestGraphSONWriter: graphson_writer = GraphSONWriter() graphson_reader = GraphSONReader() @@ -419,7 +419,7 @@ def test_graph(self): def test_custom_mapping(self): # extended mapping - class X(object): + class X: pass serdes = Mock() @@ -490,7 +490,7 @@ def test_char(self): assert expected == output -class TestFunctionalGraphSONIO(object): +class TestFunctionalGraphSONIO: """Functional IO tests""" def test_timestamp(self, remote_connection_graphsonV2): diff --git a/gremlin-python/src/main/python/tests/structure/io/test_graphsonV3d0.py b/gremlin-python/src/main/python/tests/structure/io/test_graphsonV3d0.py index 6b852fbf68f..a6a65a84e43 100644 --- a/gremlin-python/src/main/python/tests/structure/io/test_graphsonV3d0.py +++ b/gremlin-python/src/main/python/tests/structure/io/test_graphsonV3d0.py @@ -26,7 +26,7 @@ import math from decimal import * -from mock import Mock +from unittest.mock import Mock from gremlin_python.statics import * from gremlin_python.structure.graph import Vertex, Edge, Property, VertexProperty, Path @@ -37,7 +37,7 @@ from gremlin_python.process.graph_traversal import __ -class TestGraphSONReader(object): +class TestGraphSONReader: graphson_reader = GraphSONReader() def test_collections(self): @@ -57,7 +57,7 @@ def test_collections(self): "3"]})) # return a set as normal assert isinstance(x, set) - assert x == set([1, 2, "3"]) + assert x == {1, 2, "3"} x = self.graphson_reader.read_object( json.dumps({"@type": "g:Set", "@value": [{"@type": "g:Int32", "@value": 1}, @@ -261,7 +261,7 @@ def test_path(self): def test_custom_mapping(self): # extended mapping - class X(object): + class X: pass type_string = "test:Xtype" @@ -344,7 +344,7 @@ def test_null(self): assert c is None -class TestGraphSONWriter(object): +class TestGraphSONWriter: graphson_writer = GraphSONWriter() graphson_reader = GraphSONReader() @@ -356,7 +356,7 @@ def test_collections(self): assert {"@type": "g:Set", "@value": [{"@type": "g:Int32", "@value": 1}, {"@type": "g:Int32", "@value": 2}, {"@type": "g:Int32", "@value": 3}]} == json.loads( - self.graphson_writer.write_object(set([1, 2, 3, 3]))) + self.graphson_writer.write_object({1, 2, 3, 3})) assert {"@type": "g:Map", "@value": ['a', {"@type": "g:Int32", "@value": 1}]} == json.loads( self.graphson_writer.write_object({'a': 1})) @@ -484,7 +484,7 @@ def test_graph(self): def test_custom_mapping(self): # extended mapping - class X(object): + class X: pass serdes = Mock()