-
Notifications
You must be signed in to change notification settings - Fork 822
[TINKERPOP-3116] async_timeout not declared in gremlinpython dependencies #2844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 3.6-dev #2844 +/- ##
=============================================
+ Coverage 75.14% 75.42% +0.27%
- Complexity 12346 12371 +25
=============================================
Files 1058 1033 -25
Lines 63610 59912 -3698
Branches 6962 6976 +14
=============================================
- Hits 47801 45189 -2612
+ Misses 13225 12328 -897
+ Partials 2584 2395 -189 ☔ View full report in Codecov by Sentry. |
Hi and thanks for contributing. Just to let you know, we are currently in code freeze. Could you explain a bit more about why this is needed? If I run something like
Edit: just realized that you made a Jira for this that included more information. I can't quite repro what you saw using Fedora-based distro and Python 9. Were you just trying to run the examples? |
I was confirming connectivity from my host to the gremlin-server docker image as I was putting together a local testing environment. Yeah that makes sense that this used to be solved via a transitive dependency; that was my gut feeling as well. I'll dig more into this and report back on the specifics, however I suggest that this be an explicit direct dependency either way because it's referenced in the first party code. |
It seems to be related to the version of python; when using python >= 3.11, 3.10: ➜ uv add 'gremlinpython; python_version == "3.10"'
Using CPython 3.10.15
Removed virtual environment at: .venv
Creating virtual environment at: .venv
Resolved 17 packages in 9ms
Installed 16 packages in 15ms
+ aenum==3.1.15
+ aiohappyeyeballs==2.4.3
+ aiohttp==3.10.10
+ aiosignal==1.3.1
+ async-timeout==4.0.3
+ attrs==24.2.0
+ frozenlist==1.5.0
+ gremlinpython==3.7.2
+ idna==3.10
+ isodate==0.7.2
+ multidict==6.1.0
+ nest-asyncio==1.6.0
+ propcache==0.2.0
+ six==1.16.0
+ typing-extensions==4.12.2
+ yarl==1.16.0
➜ uv tree
Resolved 17 packages in 5ms
example v0.1.0
└── gremlinpython v3.7.2
├── aenum v3.1.15
├── aiohttp v3.10.10
│ ├── aiohappyeyeballs v2.4.3
│ ├── aiosignal v1.3.1
│ │ └── frozenlist v1.5.0
│ ├── async-timeout v4.0.3
│ ├── attrs v24.2.0
│ ├── frozenlist v1.5.0
│ ├── multidict v6.1.0
│ │ └── typing-extensions v4.12.2
│ └── yarl v1.16.0
│ ├── idna v3.10
│ ├── multidict v6.1.0 (*)
│ └── propcache v0.2.0
├── isodate v0.7.2
├── nest-asyncio v1.6.0
└── six v1.16.0
(*) Package tree already displayed
3.11: ➜ uv add 'gremlinpython; python_version == "3.11"'
Using CPython 3.11.10
Removed virtual environment at: .venv
Creating virtual environment at: .venv
Resolved 15 packages in 5ms
Prepared 5 packages in 246ms
Installed 14 packages in 20ms
+ aenum==3.1.15
+ aiohappyeyeballs==2.4.3
+ aiohttp==3.10.10
+ aiosignal==1.3.1
+ attrs==24.2.0
+ frozenlist==1.5.0
+ gremlinpython==3.7.2
+ idna==3.10
+ isodate==0.7.2
+ multidict==6.1.0
+ nest-asyncio==1.6.0
+ propcache==0.2.0
+ six==1.16.0
+ yarl==1.16.0
➜ uv tree
Resolved 15 packages in 8ms
example v0.1.0
└── gremlinpython v3.7.2
├── aenum v3.1.15
├── aiohttp v3.10.10
│ ├── aiohappyeyeballs v2.4.3
│ ├── aiosignal v1.3.1
│ │ └── frozenlist v1.5.0
│ ├── attrs v24.2.0
│ ├── frozenlist v1.5.0
│ ├── multidict v6.1.0
│ └── yarl v1.16.0
│ ├── idna v3.10
│ ├── multidict v6.1.0
│ └── propcache v0.2.0
├── isodate v0.7.2
├── nest-asyncio v1.6.0
└── six v1.16.0 |
Thanks for taking the time to investigate this.
Agreed. VOTE +1 |
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
|
@Cole-Greer I looked at that a bit, but versions prior to 4.0.3 don't support Python 3.11 according to their changelog, so I thought this would be more appropriate given:
Perhaps a middle ground is something like Speaking of bigger changes, using
So perhaps in the if sys.version_info >= (3, 11):
import asyncio as async_timeout
else:
import async_timeout and update the dependency to be something like: async-timeout >= 4; python_version < "3.11" If we're on the same page I'd be happy to open a separate PR for Side note: |
Thanks @JonZeolla, both 3.6-dev and 3.7-dev are accumulating changes for minor version releases, and in that regard they are equivalent in their lack of tolerance for breaking changes. Breaking changes should target our master branch which will be picked up in our next major release. That being said, looking at their changelog, it seems very unlikely that someone would be using say I think a followup change to remove async_timeout for python versions >= 3.11 as you suggested makes sense for the VOTE +1 |
Thank you all for the thoughtful discussion. VOTE +1 |
This adds
async_timeout
togremlin-python
'ssetup.py
as a runtime dependency which is required when using python >= 3.11