gremlinpython
Advanced tools
@@ -19,3 +19,3 @@ ''' | ||
| ''' | ||
| version = '3.7.2' | ||
| timestamp = 1713201447 | ||
| version = '3.6.8' | ||
| timestamp = 1730222094 |
@@ -32,3 +32,4 @@ # | ||
| def __init__(self, call_from_event_loop=None, read_timeout=None, write_timeout=None, **kwargs): | ||
| def __init__(self, call_from_event_loop=None, read_timeout=None, write_timeout=None, enable_compression=False, | ||
| **kwargs): | ||
| if call_from_event_loop is not None and call_from_event_loop and not AiohttpTransport.nest_asyncio_applied: | ||
@@ -54,2 +55,3 @@ """ | ||
| self._read_timeout = read_timeout | ||
| self._enable_compression = enable_compression | ||
| if "max_content_length" in self._aiohttp_kwargs: | ||
@@ -59,2 +61,4 @@ self._aiohttp_kwargs["max_msg_size"] = self._aiohttp_kwargs.pop("max_content_length") | ||
| self._aiohttp_kwargs["ssl"] = self._aiohttp_kwargs.pop("ssl_options") | ||
| if self._enable_compression and "compress" not in self._aiohttp_kwargs: | ||
| self._aiohttp_kwargs["compress"] = 15 # enable per-message deflate compression with 32k sliding window size | ||
@@ -61,0 +65,0 @@ def __del__(self): |
@@ -47,3 +47,4 @@ # | ||
| kerberized_service="", headers=None, session=None, | ||
| enable_user_agent_on_connect=True, **transport_kwargs): | ||
| enable_user_agent_on_connect=True, enable_compression=False, | ||
| **transport_kwargs): | ||
| log.info("Creating Client with url '%s'", url) | ||
@@ -59,2 +60,3 @@ | ||
| self._traversal_source = traversal_source | ||
| self._enable_compression = enable_compression | ||
| if not self._use_http and "max_content_length" not in transport_kwargs: | ||
@@ -82,3 +84,3 @@ transport_kwargs["max_content_length"] = 10 * 1024 * 1024 | ||
| else: | ||
| return AiohttpTransport(**transport_kwargs) | ||
| return AiohttpTransport(enable_compression=enable_compression, **transport_kwargs) | ||
| self._transport_factory = transport_factory | ||
@@ -85,0 +87,0 @@ if protocol_factory is None: |
@@ -42,5 +42,3 @@ # Licensed to the Apache Software Foundation (ASF) under one | ||
| if self._enable_user_agent_on_connect: | ||
| if self._headers is None: | ||
| self._headers = dict() | ||
| self._headers[useragent.userAgentHeader] = useragent.userAgent | ||
| self.__add_header(useragent.userAgentHeader, useragent.userAgent) | ||
@@ -98,1 +96,13 @@ def connect(self): | ||
| self._pool.put_nowait(self) | ||
| def __add_header(self, key, value): | ||
| if self._headers is None: | ||
| self._headers = dict() | ||
| # Headers may be a list of pairs | ||
| if isinstance(self._headers, list): | ||
| for pair in self._headers: | ||
| if pair[0] == key: | ||
| self._headers.remove(pair) | ||
| self._headers.append((key, value)) | ||
| else: | ||
| self._headers[key] = value |
@@ -42,3 +42,3 @@ # | ||
| graphson_writer=None, headers=None, session=None, | ||
| enable_user_agent_on_connect=True, **transport_kwargs): | ||
| enable_user_agent_on_connect=True, enable_compression=False, **transport_kwargs): | ||
| log.info("Creating DriverRemoteConnection with url '%s'", str(url)) | ||
@@ -60,2 +60,3 @@ self.__url = url | ||
| self.__enable_user_agent_on_connect = enable_user_agent_on_connect | ||
| self.__enable_compression = enable_compression | ||
| self.__transport_kwargs = transport_kwargs | ||
@@ -83,2 +84,3 @@ | ||
| enable_user_agent_on_connect=enable_user_agent_on_connect, | ||
| enable_compression=enable_compression, | ||
| **transport_kwargs) | ||
@@ -181,5 +183,5 @@ self._url = self._client._url | ||
| if options_strategy: | ||
| allowed_keys = ['evaluationTimeout', 'scriptEvaluationTimeout', 'batchSize', 'requestId', 'userAgent', 'materializeProperties'] | ||
| allowed_keys = ['evaluationTimeout', 'scriptEvaluationTimeout', 'batchSize', 'requestId', 'userAgent'] | ||
| request_options = {allowed: options_strategy[1].configuration[allowed] for allowed in allowed_keys | ||
| if allowed in options_strategy[1].configuration} | ||
| return request_options |
@@ -21,3 +21,3 @@ # | ||
| gremlin_version = "3.7.2" # DO NOT MODIFY - Configured automatically by Maven Replacer Plugin | ||
| gremlin_version = "3.6.8" # DO NOT MODIFY - Configured automatically by Maven Replacer Plugin | ||
@@ -24,0 +24,0 @@ def _generate_user_agent(): |
@@ -197,9 +197,2 @@ # | ||
| DT = Enum('DT', ' second minute hour day') | ||
| statics.add_static('second', DT.second) | ||
| statics.add_static('minute', DT.minute) | ||
| statics.add_static('hour', DT.hour) | ||
| statics.add_static('day', DT.day) | ||
| Merge = Enum('Merge', ' on_create on_match out_v in_v') | ||
@@ -828,20 +821,2 @@ | ||
| class CardinalityValue(Bytecode): | ||
| def __init__(self, cardinality, val): | ||
| super().__init__() | ||
| self.add_source("CardinalityValueTraversal", cardinality, val) | ||
| @classmethod | ||
| def single(cls, val): | ||
| return CardinalityValue(Cardinality.single, val) | ||
| @classmethod | ||
| def list_(cls, val): | ||
| return CardinalityValue(Cardinality.list_, val) | ||
| @classmethod | ||
| def set_(cls, val): | ||
| return CardinalityValue(Cardinality.set_, val) | ||
| ''' | ||
@@ -848,0 +823,0 @@ BINDINGS |
@@ -46,6 +46,5 @@ # | ||
| class Element(object): | ||
| def __init__(self, id, label, properties=None): | ||
| def __init__(self, id, label): | ||
| self.id = id | ||
| self.label = label | ||
| self.properties = properties | ||
@@ -60,4 +59,4 @@ def __eq__(self, other): | ||
| class Vertex(Element): | ||
| def __init__(self, id, label="vertex", properties=None): | ||
| Element.__init__(self, id, label, properties) | ||
| def __init__(self, id, label="vertex"): | ||
| Element.__init__(self, id, label) | ||
@@ -69,4 +68,4 @@ def __repr__(self): | ||
| class Edge(Element): | ||
| def __init__(self, id, outV, label, inV, properties=None): | ||
| Element.__init__(self, id, label, properties) | ||
| def __init__(self, id, outV, label, inV): | ||
| Element.__init__(self, id, label) | ||
| self.outV = outV | ||
@@ -80,4 +79,4 @@ self.inV = inV | ||
| class VertexProperty(Element): | ||
| def __init__(self, id, label, value, vertex, properties=None): | ||
| Element.__init__(self, id, label, properties) | ||
| def __init__(self, id, label, value, vertex): | ||
| Element.__init__(self, id, label) | ||
| self.value = value | ||
@@ -84,0 +83,0 @@ self.key = self.label |
@@ -36,3 +36,3 @@ """ | ||
| SingleChar | ||
| from gremlin_python.process.traversal import Barrier, Binding, Bytecode, Cardinality, Column, Direction, DT, Merge, \ | ||
| from gremlin_python.process.traversal import Barrier, Binding, Bytecode, Cardinality, Column, Direction, Merge, \ | ||
| Operator, Order, Pick, Pop, P, Scope, TextP, Traversal, Traverser, \ | ||
@@ -101,3 +101,2 @@ TraversalStrategy, T | ||
| merge = 0x2e | ||
| dt = 0x2f | ||
| char = 0x80 | ||
@@ -607,5 +606,4 @@ duration = 0x81 | ||
| outv = Vertex(r.read_object(b), r.to_object(b, DataType.string, False)) | ||
| b.read(2) | ||
| properties = r.read_object(b) | ||
| edge = Edge(edgeid, outv, edgelbl, inv, properties) | ||
| edge = Edge(edgeid, outv, edgelbl, inv) | ||
| b.read(4) | ||
| return edge | ||
@@ -688,3 +686,4 @@ | ||
| def _read_vertex(cls, b, r): | ||
| vertex = Vertex(r.read_object(b), r.to_object(b, DataType.string, False), r.read_object(b)) | ||
| vertex = Vertex(r.read_object(b), r.to_object(b, DataType.string, False)) | ||
| b.read(2) | ||
| return vertex | ||
@@ -715,4 +714,3 @@ | ||
| vp = VertexProperty(r.read_object(b), r.to_object(b, DataType.string, False), r.read_object(b), None) | ||
| b.read(2) | ||
| vp.properties = r.read_object(b) | ||
| b.read(4) | ||
| return vp | ||
@@ -928,7 +926,2 @@ | ||
| class DTIO(_EnumIO): | ||
| graphbinary_type = DataType.dt | ||
| python_type = DT | ||
| class MergeIO(_EnumIO): | ||
@@ -935,0 +928,0 @@ graphbinary_type = DataType.merge |
@@ -588,8 +588,3 @@ # | ||
| def objectify(cls, d, reader): | ||
| properties = None | ||
| if "properties" in d: | ||
| properties = reader.to_object(d["properties"]) | ||
| if properties is not None: | ||
| properties = [item for sublist in properties.values() for item in sublist] | ||
| return Vertex(reader.to_object(d["id"]), d.get("label", "vertex"), properties) | ||
| return Vertex(reader.to_object(d["id"]), d.get("label", "vertex")) | ||
@@ -602,12 +597,6 @@ | ||
| def objectify(cls, d, reader): | ||
| properties = None | ||
| if "properties" in d: | ||
| properties = reader.to_object(d["properties"]) | ||
| if properties is not None: | ||
| properties = list(properties.values()) | ||
| return Edge(reader.to_object(d["id"]), | ||
| Vertex(reader.to_object(d["outV"]), d.get("outVLabel", "vertex")), | ||
| d.get("label", "edge"), | ||
| Vertex(reader.to_object(d["inV"]), d.get("inVLabel", "vertex")), | ||
| properties) | ||
| Vertex(reader.to_object(d["inV"]), d.get("inVLabel", "vertex"))) | ||
@@ -620,7 +609,2 @@ | ||
| def objectify(cls, d, reader): | ||
| properties = None | ||
| if "properties" in d: | ||
| properties = reader.to_object(d["properties"]) | ||
| if properties is not None: | ||
| properties = list(map(lambda x: Property(x[0], x[1], None), properties.items())) | ||
| vertex = Vertex(reader.to_object(d.get("vertex"))) if "vertex" in d else None | ||
@@ -630,4 +614,3 @@ return VertexProperty(reader.to_object(d["id"]), | ||
| reader.to_object(d["value"]), | ||
| vertex, | ||
| properties) | ||
| vertex) | ||
@@ -634,0 +617,0 @@ |
@@ -688,8 +688,3 @@ # Licensed to the Apache Software Foundation (ASF) under one | ||
| def objectify(cls, d, reader): | ||
| properties = None | ||
| if "properties" in d: | ||
| properties = reader.to_object(d["properties"]) | ||
| if properties is not None: | ||
| properties = [item for sublist in properties.values() for item in sublist] | ||
| return Vertex(reader.to_object(d["id"]), d.get("label", "vertex"), properties) | ||
| return Vertex(reader.to_object(d["id"]), d.get("label", "vertex")) | ||
@@ -702,12 +697,6 @@ | ||
| def objectify(cls, d, reader): | ||
| properties = None | ||
| if "properties" in d: | ||
| properties = reader.to_object(d["properties"]) | ||
| if properties is not None: | ||
| properties = list(properties.values()) | ||
| return Edge(reader.to_object(d["id"]), | ||
| Vertex(reader.to_object(d["outV"]), d.get("outVLabel", "vertex")), | ||
| d.get("label", "edge"), | ||
| Vertex(reader.to_object(d["inV"]), d.get("inVLabel", "vertex")), | ||
| properties) | ||
| Vertex(reader.to_object(d["inV"]), d.get("inVLabel", "vertex"))) | ||
@@ -720,7 +709,2 @@ | ||
| def objectify(cls, d, reader): | ||
| properties = None | ||
| if "properties" in d: | ||
| properties = reader.to_object(d["properties"]) | ||
| if properties is not None: | ||
| properties = list(map(lambda x: Property(x[0], x[1], None), properties.items())) | ||
| vertex = Vertex(reader.to_object(d.get("vertex"))) if "vertex" in d else None | ||
@@ -730,4 +714,3 @@ return VertexProperty(reader.to_object(d["id"]), | ||
| reader.to_object(d["value"]), | ||
| vertex, | ||
| properties) | ||
| vertex) | ||
@@ -734,0 +717,0 @@ |
| Metadata-Version: 2.1 | ||
| Name: gremlinpython | ||
| Version: 3.7.2 | ||
| Version: 3.6.8 | ||
| Summary: Gremlin-Python for Apache TinkerPop | ||
| Home-page: http://tinkerpop.apache.org | ||
| Home-page: https://tinkerpop.apache.org | ||
| Maintainer: Apache TinkerPop | ||
| Maintainer-email: dev@tinkerpop.apache.org | ||
| License: Apache 2 | ||
@@ -12,2 +14,3 @@ Platform: UNKNOWN | ||
| Classifier: Programming Language :: Python :: 3 | ||
| Requires-Python: >=3.9 | ||
| Description-Content-Type: text/x-rst | ||
@@ -14,0 +17,0 @@ Provides-Extra: kerberos |
| nest_asyncio | ||
| aiohttp<4.0.0,>=3.8.0 | ||
| aenum<4.0.0,>=1.4.5 | ||
| six<2.0.0,>=1.10.0 | ||
| isodate<1.0.0,>=0.6.0 | ||
| async-timeout<5.0.0,>=4.0.3 | ||
@@ -7,0 +7,0 @@ [kerberos] |
+5
-2
| Metadata-Version: 2.1 | ||
| Name: gremlinpython | ||
| Version: 3.7.2 | ||
| Version: 3.6.8 | ||
| Summary: Gremlin-Python for Apache TinkerPop | ||
| Home-page: http://tinkerpop.apache.org | ||
| Home-page: https://tinkerpop.apache.org | ||
| Maintainer: Apache TinkerPop | ||
| Maintainer-email: dev@tinkerpop.apache.org | ||
| License: Apache 2 | ||
@@ -12,2 +14,3 @@ Platform: UNKNOWN | ||
| Classifier: Programming Language :: Python :: 3 | ||
| Requires-Python: >=3.9 | ||
| Description-Content-Type: text/x-rst | ||
@@ -14,0 +17,0 @@ Provides-Extra: kerberos |
+0
-3
@@ -1,4 +0,1 @@ | ||
| [bdist_wheel] | ||
| universal = 1 | ||
| [aliases] | ||
@@ -5,0 +2,0 @@ test = pytest |
+8
-11
@@ -21,3 +21,2 @@ """ | ||
| import os | ||
| import sys | ||
| import time | ||
@@ -52,9 +51,6 @@ from setuptools import setup | ||
| 'aenum>=1.4.5,<4.0.0', | ||
| 'six>=1.10.0,<2.0.0', | ||
| 'isodate>=0.6.0,<1.0.0' | ||
| 'isodate>=0.6.0,<1.0.0', | ||
| 'async-timeout>=4.0.3,<5.0.0' | ||
| ] | ||
| if sys.version_info < (3, 5): | ||
| install_requires += ['pyparsing>=2.4.7,<3.0.0'] | ||
| setup( | ||
@@ -67,4 +63,6 @@ name='gremlinpython', | ||
| license='Apache 2', | ||
| url='http://tinkerpop.apache.org', | ||
| url='https://tinkerpop.apache.org', | ||
| description='Gremlin-Python for Apache TinkerPop', | ||
| maintainer='Apache TinkerPop', | ||
| maintainer_email='dev@tinkerpop.apache.org', | ||
| long_description=codecs.open("README.rst", "r", "UTF-8").read(), | ||
@@ -80,6 +78,4 @@ long_description_content_type='text/x-rst', | ||
| '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' | ||
| 'PyHamcrest>=1.9.0,<3.0.0' | ||
| ], | ||
@@ -96,3 +92,4 @@ install_requires=install_requires, | ||
| "Programming Language :: Python :: 3" | ||
| ] | ||
| ], | ||
| python_requires='>=3.9' | ||
| ) |
Sorry, the diff of this file is too big to display
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
303369
-3.11%6477
-4.13%