gremlinpython 3.5.6rc1__tar.gz → 3.5.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. gremlinpython-3.5.8/NOTICE +5 -0
  2. {gremlinpython-3.5.6rc1/gremlinpython.egg-info → gremlinpython-3.5.8}/PKG-INFO +1 -1
  3. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlin_python/__version__.py +2 -2
  4. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlin_python/driver/client.py +8 -1
  5. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlin_python/driver/driver_remote_connection.py +4 -0
  6. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlin_python/driver/useragent.py +2 -6
  7. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlin_python/process/graph_traversal.py +1 -1
  8. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlin_python/process/translator.py +5 -3
  9. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8/gremlinpython.egg-info}/PKG-INFO +1 -1
  10. gremlinpython-3.5.6rc1/NOTICE +0 -5
  11. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/LICENSE +0 -0
  12. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/MANIFEST.in +0 -0
  13. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/README.rst +0 -0
  14. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlin_python/__init__.py +0 -0
  15. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlin_python/driver/__init__.py +0 -0
  16. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlin_python/driver/aiohttp/__init__.py +0 -0
  17. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlin_python/driver/aiohttp/transport.py +0 -0
  18. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlin_python/driver/connection.py +0 -0
  19. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlin_python/driver/protocol.py +0 -0
  20. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlin_python/driver/remote_connection.py +0 -0
  21. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlin_python/driver/request.py +0 -0
  22. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlin_python/driver/resultset.py +0 -0
  23. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlin_python/driver/serializer.py +0 -0
  24. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlin_python/driver/transport.py +0 -0
  25. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlin_python/process/__init__.py +0 -0
  26. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlin_python/process/anonymous_traversal.py +0 -0
  27. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlin_python/process/strategies.py +0 -0
  28. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlin_python/process/traversal.py +0 -0
  29. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlin_python/statics.py +0 -0
  30. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlin_python/structure/__init__.py +0 -0
  31. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlin_python/structure/graph.py +0 -0
  32. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlin_python/structure/io/__init__.py +0 -0
  33. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlin_python/structure/io/graphbinaryV1.py +0 -0
  34. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlin_python/structure/io/graphsonV2d0.py +0 -0
  35. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlin_python/structure/io/graphsonV3d0.py +0 -0
  36. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlin_python/structure/io/util.py +0 -0
  37. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlinpython.egg-info/SOURCES.txt +0 -0
  38. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlinpython.egg-info/dependency_links.txt +0 -0
  39. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlinpython.egg-info/requires.txt +0 -0
  40. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/gremlinpython.egg-info/top_level.txt +0 -0
  41. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/setup.cfg +0 -0
  42. {gremlinpython-3.5.6rc1 → gremlinpython-3.5.8}/setup.py +0 -0
@@ -0,0 +1,5 @@
1
+ Apache TinkerPop
2
+ Copyright 2015-2023 The Apache Software Foundation.
3
+
4
+ This product includes software developed at
5
+ The Apache Software Foundation (http://www.apache.org/).
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gremlinpython
3
- Version: 3.5.6rc1
3
+ Version: 3.5.8
4
4
  Summary: Gremlin-Python for Apache TinkerPop
5
5
  Home-page: http://tinkerpop.apache.org
6
6
  License: Apache 2
@@ -16,5 +16,5 @@ KIND, either express or implied. See the License for the
16
16
  specific language governing permissions and limitations
17
17
  under the License.
18
18
  '''
19
- version = '3.5.6-rc1'
20
- timestamp = 1676568852
19
+ version = '3.5.8'
20
+ timestamp = 1701712643
@@ -134,7 +134,11 @@ class Client:
134
134
  processor='session', op='close',
135
135
  args={'session': str(self._session)})
136
136
  conn = self._pool.get(True)
137
- return conn.write(message).result()
137
+ try:
138
+ write_result_set = conn.write(message).result()
139
+ return write_result_set.all().result() # wait for _receive() to finish
140
+ except protocol.GremlinServerError:
141
+ pass
138
142
 
139
143
  def _get_connection(self):
140
144
  protocol = self._protocol_factory()
@@ -154,6 +158,9 @@ class Client:
154
158
  return self.submit_async(message, bindings, request_options)
155
159
 
156
160
  def submit_async(self, message, bindings=None, request_options=None):
161
+ if self.is_closed():
162
+ raise Exception("Client is closed")
163
+
157
164
  logging.debug("message '%s'", str(message))
158
165
  args = {'gremlin': message, 'aliases': {'g': self._traversal_source}}
159
166
  processor = ''
@@ -155,6 +155,10 @@ class DriverRemoteConnection(RemoteConnection):
155
155
  self.__spawned_sessions.append(conn)
156
156
  return conn
157
157
 
158
+ def remove_session(self, session_based_connection):
159
+ session_based_connection.close()
160
+ self.__spawned_sessions.remove(session_based_connection)
161
+
158
162
  def commit(self):
159
163
  logging.info("Submitting commit graph operation.")
160
164
  return self._client.submit(Bytecode.GraphOp.commit())
@@ -18,20 +18,16 @@
18
18
  #
19
19
  import platform
20
20
 
21
+ gremlin_version = "3.5.8" # DO NOT MODIFY - Configured automatically by Maven Replacer Plugin
21
22
 
22
23
  def _generate_user_agent():
23
24
  application_name = "NotAvailable"
24
- try:
25
- from gremlin_python import __version__
26
- driver_version = __version__.version.replace(" ", "_")
27
- except ImportError:
28
- driver_version = "NotAvailable"
29
25
  runtime_version = platform.python_version().replace(" ", "_")
30
26
  os_name = platform.system().replace(" ", "_")
31
27
  os_version = platform.release().replace(" ", "_")
32
28
  architecture = platform.machine().replace(" ", "_")
33
29
  user_agent = "{appName} Gremlin-Python.{driverVersion} {runtimeVersion} {osName}.{osVersion} {cpuArch}".format(
34
- appName=application_name, driverVersion=driver_version, runtimeVersion=runtime_version,
30
+ appName=application_name, driverVersion=gremlin_version, runtimeVersion=runtime_version,
35
31
  osName=os_name, osVersion=os_version, cpuArch=architecture)
36
32
 
37
33
  return user_agent
@@ -1090,8 +1090,8 @@ class Transaction:
1090
1090
  raise Exception(error_message)
1091
1091
 
1092
1092
  def __close_session(self, session):
1093
- self._session_based_connection.close()
1094
1093
  self.__is_open = False
1094
+ self._remote_connection.remove_session(self._session_based_connection)
1095
1095
  return session
1096
1096
 
1097
1097
 
@@ -67,7 +67,7 @@ class Translator:
67
67
  # Do any needed special processing for the representation
68
68
  # of strings and dates.
69
69
  def fixup(self, v):
70
- if type(v) == str:
70
+ if isinstance(v, str):
71
71
  return f'\'{v}\''
72
72
  elif type(v) == datetime:
73
73
  return self.process_date(v)
@@ -133,7 +133,7 @@ class Translator:
133
133
  script += f'WithOptions.{self.options[p]}'
134
134
  elif type(p) == Bytecode:
135
135
  script += self.translate(p, True)
136
- elif type(p) == P:
136
+ elif isinstance(p, P):
137
137
  script += self.process_predicate(p)
138
138
  elif type(p) in [Cardinality, Pop]:
139
139
  tmp = str(p)
@@ -146,10 +146,12 @@ class Translator:
146
146
  elif p == WithOptions.tokens:
147
147
  script += 'WithOptions.tokens'
148
148
  with_opts = True
149
- elif type(p) == str:
149
+ elif isinstance(p, str):
150
150
  script += f'\'{p}\''
151
151
  elif type(p) == bool:
152
152
  script += 'true' if p else 'false'
153
+ elif p is None:
154
+ script += 'null'
153
155
  else:
154
156
  script += str(p)
155
157
  c += 1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gremlinpython
3
- Version: 3.5.6rc1
3
+ Version: 3.5.8
4
4
  Summary: Gremlin-Python for Apache TinkerPop
5
5
  Home-page: http://tinkerpop.apache.org
6
6
  License: Apache 2
@@ -1,5 +0,0 @@
1
- Apache TinkerPop
2
- Copyright 2015-2022 The Apache Software Foundation.
3
-
4
- This product includes software developed at
5
- The Apache Software Foundation (http://www.apache.org/).
File without changes
File without changes