[
https://issues.apache.org/jira/browse/TINKERPOP-3116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17892258#comment-17892258
]
ASF GitHub Bot commented on TINKERPOP-3116:
-------------------------------------------
Cole-Greer commented on PR #2844:
URL: https://github.com/apache/tinkerpop/pull/2844#issuecomment-2433110999
Hi @JonZeolla, thanks for opening this PR, it makes sense that we should
directly declare this dependency. I just checked the dependency tree from
gremlinpython 3.6.7 in my environment, and I'm seeing that async_timeout is
transitively included with a looser version restriction than what you are
explicitly adding `>=4.0.0a3,<5.0`. Would you be ok with loosening the version
range in this PR such that we aren't increasing any restrictions on users with
this change?
```
gremlinpython==3.6.7
├── aenum [required: >=1.4.5,<4.0.0, installed: 3.1.15]
├── aiohttp [required: >=3.8.0,<4.0.0, installed: 3.8.6]
│ ├── aiosignal [required: >=1.1.2, installed: 1.3.1]
│ │ └── frozenlist [required: >=1.1.0, installed: 1.4.0]
│ ├── async-timeout [required: >=4.0.0a3,<5.0, installed: 4.0.3]
│ ├── attrs [required: >=17.3.0, installed: 23.1.0]
│ ├── charset-normalizer [required: >=2.0,<4.0, installed: 3.3.0]
│ ├── frozenlist [required: >=1.1.1, installed: 1.4.0]
│ ├── multidict [required: >=4.5,<7.0, installed: 6.0.4]
│ └── yarl [required: >=1.0,<2.0, installed: 1.9.2]
│ ├── idna [required: >=2.0, installed: 3.4]
│ └── multidict [required: >=4.0, installed: 6.0.4]
```
> async_timeout not declared in gremlinpython dependencies
> --------------------------------------------------------
>
> Key: TINKERPOP-3116
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3116
> Project: TinkerPop
> Issue Type: Bug
> Components: python
> Affects Versions: 3.7.2
> Reporter: Jon Zeolla
> Priority: Minor
>
> `async-timeout` is missing from [the install
> requirements|https://github.com/apache/tinkerpop/blob/49829884a5617ed1a86211e69826c16e549b0600/gremlin-python/src/main/python/setup.py#L47-L52].
> This appears to have been untouched for quite a while; possibly some
> upstream dependency no longer uses `async-timeout`?
> `async-timeout` _is_ installed [in the
> example|https://github.com/apache/tinkerpop/blob/49829884a5617ed1a86211e69826c16e549b0600/gremlin-python/src/main/python/examples/requirements.txt#L21]
> and after I do a fresh install of `gremlinpython` I saw the following:
> ```bash
> ➜ python3
> Python 3.12.6 (main, Sep 9 2024, 21:36:32) [Clang 18.1.8 ] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from gremlin_python.process.anonymous_traversal import traversal
> >>> from gremlin_python.driver.driver_remote_connection import
> >>> DriverRemoteConnection
> >>> g =
> >>> traversal().with_remote(DriverRemoteConnection('ws://localhost:8182/gremlin','g'))
> Traceback (most recent call last):
> File
> "/Users/example/tinkerpop/.venv/lib/python3.12/site-packages/gremlin_python/driver/client.py",
> line 70, in __init__
> from gremlin_python.driver.aiohttp.transport import (
> File
> "/Users/example/tinkerpop/.venv/lib/python3.12/site-packages/gremlin_python/driver/aiohttp/transport.py",
> line 21, in <module>
> import async_timeout
> ModuleNotFoundError: No module named 'async_timeout'
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File
> "/Users/example/tinkerpop/.venv/lib/python3.12/site-packages/gremlin_python/driver/driver_remote_connection.py",
> line 69, in __init__
> self._client = client.Client(url, traversal_source,
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File
> "/Users/example/tinkerpop/.venv/lib/python3.12/site-packages/gremlin_python/driver/client.py",
> line 73, in __init__
> raise Exception("Please install AIOHTTP or pass "
> ```
> After installing `async-timeout` I now get:
> ```bash
> ➜ python3
> Python 3.12.6 (main, Sep 9 2024, 21:36:32) [Clang 18.1.8 ] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from gremlin_python.process.anonymous_traversal import traversal
> >>> from gremlin_python.driver.driver_remote_connection import
> >>> DriverRemoteConnection
> >>>
> >>> g =
> >>> traversal().with_remote(DriverRemoteConnection('ws://localhost:8182/gremlin',
> >>> 'g'))
> ```
> h2. My environment
> macOS 15.0.1, M2
> Python 3.12.6
> gremlin_python 3.7.2
--
This message was sent by Atlassian Jira
(v8.20.10#820010)