Consolidate gremlin-python read timeout into a single ReadTimeoutError#3507
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3507 +/- ##
============================================
+ Coverage 76.35% 76.41% +0.05%
- Complexity 13424 13924 +500
============================================
Files 1012 1027 +15
Lines 60341 62630 +2289
Branches 7075 7355 +280
============================================
+ Hits 46076 47856 +1780
- Misses 11548 11793 +245
- Partials 2717 2981 +264 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
kenhuuu
reviewed
Jul 6, 2026
Contributor
|
VOTE +1 |
Contributor
|
merging as lazy consensus reached |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gremlin-python armed two read-timeout mechanisms at the same value - the driver's
async_timeoutwrapper (raisingasyncio.TimeoutError) and aiohttp'ssock_read(raising
SocketTimeoutError). Whichever fired first was a race, so a read timeoutsurfaced nondeterministically as one type or the other, which also made
test_client_side_timeout_set_for_aiohttpflaky (it asserted on the exception message).Change: remove the redundant
async_timeoutread wrapper and keep aiohttpsock_readas the single read-timeout source (it also covers the initial-response wait and is
streaming-safe). Normalize its
SocketTimeoutError/ServerTimeoutErrorinto a newdriver-owned
ReadTimeoutErrorso a read timeout always surfaces as one deterministic,transport-agnostic type.
ReadTimeoutErrorsubclasses the builtinTimeoutError, so itstays catchable via
except TimeoutErrorwhile leaking neither asyncio nor aiohttp types(addresses review feedback). It is documented as temporary: once the driver is fully
async it should revert to
asyncio.TimeoutError(TINKERPOP-2774).Assisted-by: Kiro: Claude Opus 4.8