Skip to content

Commit

Permalink
Merge branch '3.6-dev' into 3.7-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentyn Kahamlyk authored and Valentyn Kahamlyk committed Jul 26, 2024
2 parents 97e1c7a + b382a1c commit a846d88
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 24 deletions.
2 changes: 1 addition & 1 deletion gremlin-python/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion gremlin-python/src/main/python/examples/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 0 additions & 3 deletions gremlin-python/src/main/python/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 1 addition & 6 deletions gremlin-python/src/main/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,17 @@
'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,
packages=['gremlin_python', 'gremlin_python.driver',
'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',
Expand All @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -37,7 +37,7 @@
from gremlin_python.process.graph_traversal import __


class TestGraphSONReader(object):
class TestGraphSONReader:
graphson_reader = GraphSONReader()

def test_number_input(self):
Expand Down Expand Up @@ -216,7 +216,7 @@ def test_path(self):
def test_custom_mapping(self):

# extended mapping
class X(object):
class X:
pass

type_string = "test:Xtype"
Expand Down Expand Up @@ -298,7 +298,7 @@ def test_null(self):
assert c is None


class TestGraphSONWriter(object):
class TestGraphSONWriter:
graphson_writer = GraphSONWriter()
graphson_reader = GraphSONReader()

Expand Down Expand Up @@ -418,7 +418,7 @@ def test_graph(self):

def test_custom_mapping(self):
# extended mapping
class X(object):
class X:
pass

serdes = Mock()
Expand Down Expand Up @@ -489,7 +489,7 @@ def test_char(self):
assert expected == output


class TestFunctionalGraphSONIO(object):
class TestFunctionalGraphSONIO:
"""Functional IO tests"""

def test_timestamp(self, remote_connection_graphsonV2):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -37,7 +37,7 @@
from gremlin_python.process.graph_traversal import __


class TestGraphSONReader(object):
class TestGraphSONReader:
graphson_reader = GraphSONReader()

def test_collections(self):
Expand All @@ -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},
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -344,7 +344,7 @@ def test_null(self):
assert c is None


class TestGraphSONWriter(object):
class TestGraphSONWriter:
graphson_writer = GraphSONWriter()
graphson_reader = GraphSONReader()

Expand All @@ -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}))
Expand Down Expand Up @@ -484,7 +484,7 @@ def test_graph(self):

def test_custom_mapping(self):
# extended mapping
class X(object):
class X:
pass

serdes = Mock()
Expand Down

0 comments on commit a846d88

Please sign in to comment.