You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by "GumpacG (via GitHub)" <gi...@apache.org> on 2026/07/17 04:19:07 UTC

[PR] Fix gremlin-python GremlinLang equality and submitAsync bugs [tinkerpop]

GumpacG opened a new pull request, #3520:
URL: https://github.com/apache/tinkerpop/pull/3520

   # gremlin-python bug fixes (TinkerPop 4.0.0-beta.1 regressions)
   
   Two bugs introduced in `4.0.0-beta.1` during the Bytecode-to-GremlinLang
   migration.
   
   ## 1. `GremlinLang.__eq__` ignores the query
   
   File: `gremlin_python/process/traversal.py`
   
   `__eq__` compared `self.gremlin` to itself instead of to `other.gremlin`, so
   equality depended only on the parameters and ignored the actual steps.
   
   ### Problem use case
   
   ```python
   a = g.V().count().gremlin_lang
   b = g.V().drop().gremlin_lang
   a == b
   ```
   
   ### Behaviour
   
   | | Result |
   |---|---|
   | Before | `True` - two completely different queries (with equal/empty parameters) compare equal |
   | After | `False` - equality now considers the query steps as well as the parameters |
   
   ## 2. `DriverRemoteConnection.submitAsync` is broken
   
   File: `gremlin_python/driver/driver_remote_connection.py`
   
   The deprecated `submitAsync` alias forwarded three positional arguments to
   `submit_async`, which had been narrowed to a single `gremlin_lang` argument in
   4.x. It also never returned the future.
   
   ### Problem use case
   
   ```python
   conn = DriverRemoteConnection('http://localhost:8182/gremlin', 'g')
   future = conn.submitAsync(gremlin_lang)
   result = future.result()
   ```
   
   ### Behaviour
   
   | | Result |
   |---|---|
   | Before | Raises `TypeError: submit_async() takes 2 positional arguments but 4 were given`; even setting that aside it returned `None` instead of a future |
   | After | Emits the deprecation warning, forwards the single `gremlin_lang`, and returns the `Future` (resolving to a `RemoteTraversal`) |
   
   ## Tests
   
   - `tests/unit/process/test_gremlin_lang.py`: equality of traversals with
     different steps / equal params, equal objects, differing params, and
     non-GremlinLang comparison.
   - `tests/unit/driver/test_remote_connection.py`: `submitAsync` emits the
     deprecation warning, forwards a single argument, returns a `Future` resolving
     to a `RemoteTraversal`, and no longer raises `TypeError`.
   
   
   Assisted-by: Kiro: Claude Opus 4.8
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix gremlin-python GremlinLang equality and submitAsync bugs [tinkerpop]

Posted by "Cole-Greer (via GitHub)" <gi...@apache.org>.
Cole-Greer merged PR #3520:
URL: https://github.com/apache/tinkerpop/pull/3520


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix gremlin-python GremlinLang equality and submitAsync bugs [tinkerpop]

Posted by "xiazcy (via GitHub)" <gi...@apache.org>.
xiazcy commented on PR #3520:
URL: https://github.com/apache/tinkerpop/pull/3520#issuecomment-5005372906

   VOTE +1


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix gremlin-python GremlinLang equality and submitAsync bugs [tinkerpop]

Posted by "Cole-Greer (via GitHub)" <gi...@apache.org>.
Cole-Greer commented on code in PR #3520:
URL: https://github.com/apache/tinkerpop/pull/3520#discussion_r3605760513


##########
gremlin-python/src/main/python/gremlin_python/driver/driver_remote_connection.py:
##########
@@ -75,12 +75,12 @@ def submit(self, gremlin_lang):
                                          request_options=self.extract_request_options(gremlin_lang))
         return RemoteTraversal(result_set)
 
-    def submitAsync(self, message, parameters=None, request_options=None):
+    def submitAsync(self, gremlin_lang):

Review Comment:
   We should arguably just take TinkerPop 4 as the opportunity to delete this deprecated overload instead of continuing to adjust it. It's been deprecated for 5 years at this point. We can kick that into a new JIRA to followup with later if you think it needs more discussion, or to take a more holistic view of the python deprecation situation when we aren't in a release cycle.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix gremlin-python GremlinLang equality and submitAsync bugs [tinkerpop]

Posted by "Cole-Greer (via GitHub)" <gi...@apache.org>.
Cole-Greer commented on PR #3520:
URL: https://github.com/apache/tinkerpop/pull/3520#issuecomment-5006945253

   Building on my comment above, I'd like to either remove `submitAsync()` now, or open a JIRA to track it. I'm happy with either of those directions for this PR.
   
   VOTE +1


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix gremlin-python GremlinLang equality and submitAsync bugs [tinkerpop]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #3520:
URL: https://github.com/apache/tinkerpop/pull/3520#issuecomment-4999003656

   ## [Codecov](https://app.codecov.io/gh/apache/tinkerpop/pull/3520?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 79.67%. Comparing base ([`a28cd1f`](https://app.codecov.io/gh/apache/tinkerpop/commit/a28cd1f2f1f10c140030a56de44c5c6c045af5f0?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`c26d4c4`](https://app.codecov.io/gh/apache/tinkerpop/commit/c26d4c437ef3950d8dd559ca0457ec5ec0376b3c?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 277 commits behind head on master.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #3520      +/-   ##
   ============================================
   + Coverage     76.35%   79.67%   +3.31%     
   ============================================
     Files          1012       32     -980     
     Lines         60341     6878   -53463     
     Branches       7075        0    -7075     
   ============================================
   - Hits          46076     5480   -40596     
   + Misses        11548     1071   -10477     
   + Partials       2717      327    -2390     
   ```
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/tinkerpop/pull/3520?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix gremlin-python GremlinLang equality and submitAsync bugs [tinkerpop]

Posted by "kenhuuu (via GitHub)" <gi...@apache.org>.
kenhuuu commented on PR #3520:
URL: https://github.com/apache/tinkerpop/pull/3520#issuecomment-5009104299

   VOTE +1


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix gremlin-python GremlinLang equality and submitAsync bugs [tinkerpop]

Posted by "GumpacG (via GitHub)" <gi...@apache.org>.
GumpacG commented on code in PR #3520:
URL: https://github.com/apache/tinkerpop/pull/3520#discussion_r3606182987


##########
gremlin-python/src/main/python/gremlin_python/driver/driver_remote_connection.py:
##########
@@ -75,12 +75,12 @@ def submit(self, gremlin_lang):
                                          request_options=self.extract_request_options(gremlin_lang))
         return RemoteTraversal(result_set)
 
-    def submitAsync(self, message, parameters=None, request_options=None):
+    def submitAsync(self, gremlin_lang):

Review Comment:
   Removed, thanks!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org