Fix gremlin-python GremlinLang equality and submitAsync bugs#3520
Open
GumpacG wants to merge 1 commit into
Open
Fix gremlin-python GremlinLang equality and submitAsync bugs#3520GumpacG wants to merge 1 commit into
GumpacG wants to merge 1 commit into
Conversation
Assisted-by: Kiro: Claude Opus 4.8
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3520 +/- ##
============================================
+ Coverage 76.35% 76.41% +0.05%
- Complexity 13424 14269 +845
============================================
Files 1012 1036 +24
Lines 60341 64527 +4186
Branches 7075 7650 +575
============================================
+ Hits 46076 49306 +3230
- Misses 11548 12129 +581
- Partials 2717 3092 +375 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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 bug fixes
Two bugs introduced in
4.0.0-beta.1during the Bytecode-to-GremlinLangmigration.
1.
GremlinLang.__eq__ignores the queryFile:
gremlin_python/process/traversal.py__eq__comparedself.gremlinto itself instead of toother.gremlin, soequality depended only on the parameters and ignored the actual steps.
Problem use case
Behaviour
True- two completely different queries (with equal/empty parameters) compare equalFalse- equality now considers the query steps as well as the parameters2.
DriverRemoteConnection.submitAsyncis brokenFile:
gremlin_python/driver/driver_remote_connection.pyThe deprecated
submitAsyncalias forwarded three positional arguments tosubmit_async, which had been narrowed to a singlegremlin_langargument in4.x. It also never returned the future.
Problem use case
Behaviour
TypeError: submit_async() takes 2 positional arguments but 4 were given; even setting that aside it returnedNoneinstead of a futuregremlin_lang, and returns theFuture(resolving to aRemoteTraversal)Tests
tests/unit/process/test_gremlin_lang.py: equality of traversals withdifferent steps / equal params, equal objects, differing params, and
non-GremlinLang comparison.
tests/unit/driver/test_remote_connection.py:submitAsyncemits thedeprecation warning, forwards a single argument, returns a
Futureresolvingto a
RemoteTraversal, and no longer raisesTypeError.Assisted-by: Kiro: Claude Opus 4.8