8000 Correct asyncio ref documentation for Python 3.11+ by davidwagnerkc · Pull Request #54157 · ray-project/ray · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Correct asyncio ref documentation for Python 3.11+ #54157

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

davidwagnerkc
Copy link
@davidwagnerkc davidwagnerkc commented Jun 26, 2025

Why are these changes needed?

Python 3.11+ issue identified in #31606 (comment), but not explicitly called out in docs leading to failure running this example: https://docs.ray.io/en/latest/ray-core/actors/async_api.html#objectrefs-as-asyncio-futures

Will come back to get all checks in place, figure out build locally, but will get some eyes on this change first.

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

@davidwagnerkc
Copy link
Author
image

Signed-off-by: David Wagner <david@wagnerkc.com>
@davidwagnerkc davidwagnerkc force-pushed the dwagner/async-doc-update branch from 62219b9 to 413d98a Compare June 26, 2025 23:08
@davidwagnerkc davidwagnerkc marked this pull request as ready for review June 26, 2025 23:08
@Copilot Copilot AI review requested due to automatic review settings June 26, 2025 23:08
@davidwagnerkc davidwagnerkc requested a review from a team as a code owner June 26, 2025 23:08
Copy link
Contributor
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the async actor docs to explicitly call out asyncio patterns supported in different Python versions and moves the external asyncio link below the examples.

  • Clarify how to wait on an ObjectRef in Python 3.9 and 3.10
  • Show direct Future object usage in Python 3.11+
  • Relocate the reference to the official asyncio docs after both examples
Comments suppressed due to low confidence (2)

doc/source/ray-core/actors/async_api.rst:107

  • [nitpick] Consider renaming this heading to 'Wait on ObjectRef (Python 3.9 & 3.10):' for clarity, consistent casing, and to match the style of other subheadings.
you can wait on the ref (Python 3.9 and Python 3.10):

doc/source/ray-core/actors/async_api.rst:124

  • [nitpick] To keep a parallel imperative style, you might use 'Access the Future object directly (Python 3.11+):' instead of starting with 'or'.
or the Future object directly (Python 3.11+):

Copy link
Contributor
@angelinalg angelinalg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for maintaining the docs!

davidwagnerkc and others added 3 commits June 26, 2025 18:25
Co-authored-by: angelinalg <122562471+angelinalg@users.noreply.github.com>
Signed-off-by: David Wagner <david@wagnerkc.com>
Co-authored-by: angelinalg <122562471+angelinalg@users.noreply.github.com>
Signed-off-by: David Wagner <david@wagnerkc.com>
Signed-off-by: David Wagner <david@wagnerkc.com>
Copy link
Contributor
@dayshah dayshah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ty!! this is a broken window that probably should've been fixed a long time ago cc @edoakes for merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0