You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by co...@apache.org on 2024/11/01 19:09:14 UTC

(tinkerpop) branch master updated: chore(gremlinpython): remove async_timeout for python 3.11 and newer (#2851)

This is an automated email from the ASF dual-hosted git repository.

colegreer 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 aa327ace6f chore(gremlinpython): remove async_timeout for python 3.11 and newer (#2851)
aa327ace6f is described below

commit aa327ace6feaf6ccd3eca411f3b5f6f86f8571f6
Author: JonZeolla <Ze...@gmail.com>
AuthorDate: Fri Nov 1 15:09:08 2024 -0400

    chore(gremlinpython): remove async_timeout for python 3.11 and newer (#2851)
---
 .../src/main/python/gremlin_python/driver/aiohttp/transport.py   | 9 +++++++--
 gremlin-python/src/main/python/setup.py                          | 4 ++--
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/gremlin-python/src/main/python/gremlin_python/driver/aiohttp/transport.py b/gremlin-python/src/main/python/gremlin_python/driver/aiohttp/transport.py
index 34821ae9c3..a9ab11ff48 100644
--- a/gremlin-python/src/main/python/gremlin_python/driver/aiohttp/transport.py
+++ b/gremlin-python/src/main/python/gremlin_python/driver/aiohttp/transport.py
@@ -16,10 +16,15 @@
 # specific language governing permissions and limitations
 # under the License.
 #
+from aiohttp import ClientResponseError
 import aiohttp
 import asyncio
-import async_timeout
-from aiohttp import ClientResponseError
+import sys
+
+if sys.version_info >= (3, 11):
+    import asyncio as async_timeout
+else:
+    import async_timeout
 
 from gremlin_python.driver.transport import AbstractBaseTransport
 
diff --git a/gremlin-python/src/main/python/setup.py b/gremlin-python/src/main/python/setup.py
index 9bc306cb15..1a38c7a821 100644
--- a/gremlin-python/src/main/python/setup.py
+++ b/gremlin-python/src/main/python/setup.py
@@ -48,7 +48,7 @@ install_requires = [
     'aiohttp>=3.8.0,<4.0.0',
     'aenum>=1.4.5,<4.0.0',
     'isodate>=0.6.0,<1.0.0',
-    'async-timeout>=4.0.3,<5.0.0'
+    'async-timeout>=4.0.3,<5.0; python_version < "3.11"',
 ]
 
 setup(
@@ -78,7 +78,7 @@ setup(
     ],
     install_requires=install_requires,
     extras_require={
-        'kerberos': 'kerberos>=1.3.0,<2.0.0',    # Does not install in Microsoft Windows
+        'kerberos': 'kerberos>=1.3.0,<2.0.0; sys_platform != "win32"',  # Does not install in Microsoft Windows
         'ujson': 'ujson>=2.0.0'
     },
     classifiers=[