Skip to content
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

gh-96706: [doc] Fix deprecated use of get_event_loop() #96707

Merged
merged 2 commits into from
Sep 11, 2022

Conversation

zhanpon
Copy link
Contributor

@zhanpon zhanpon commented Sep 9, 2022

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

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

Alas, it's not so straighforward. :-(

The Hello World with call_soon() section has a label asyncio_example_lowlevel_helloworld which is referenced from asyncio-llapi-index.rst, where it is used as an example for get_event_loop(). So the change would make that link confusing.

(The other two are fine.)

I'm not sure what to suggest.

@zhanpon
Copy link
Contributor Author

zhanpon commented Sep 9, 2022

@gvanrossum Thank you for the review! I didn't notice that.

How about we just change the link text?

$ git diff
diff --git a/Doc/library/asyncio-llapi-index.rst b/Doc/library/asyncio-llapi-index.rst
index cdadb7975a..3cec4c69f8 100644
--- a/Doc/library/asyncio-llapi-index.rst
+++ b/Doc/library/asyncio-llapi-index.rst
@@ -267,7 +267,7 @@ See also the main documentation section about the

 .. rubric:: Examples

-* :ref:`Using asyncio.get_event_loop() and loop.run_forever()
+* :ref:`Using asyncio.new_event_loop() and loop.run_forever()
   <asyncio_example_lowlevel_helloworld>`.

 * :ref:`Using loop.call_later() <asyncio_example_call_later>`.

@gvanrossum
Copy link
Member

How about we just change the link text?

That sounds like a good idea. Just add a commit to the PR!

@zhanpon
Copy link
Contributor Author

zhanpon commented Sep 11, 2022

@gvanrossum I've added the commit. Thanks for the confirmation!

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

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

I'll merge!

@gvanrossum gvanrossum merged commit 53a54b7 into python:main Sep 11, 2022
@gvanrossum gvanrossum added the needs backport to 3.11 only security fixes label Sep 11, 2022
@miss-islington
Copy link
Contributor

Thanks @zhanpon for the PR, and @gvanrossum for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 11, 2022
…p() in examples (pythonGH-96707)

(cherry picked from commit 53a54b7)

Co-authored-by: zhanpon <[email protected]>
@bedevere-bot
Copy link

GH-96757 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Sep 11, 2022
@zhanpon zhanpon deleted the improve-asyncio-eventloop-doc branch September 11, 2022 22:11
miss-islington added a commit that referenced this pull request Sep 13, 2022
… examples (GH-96707)

(cherry picked from commit 53a54b7)

Co-authored-by: zhanpon <[email protected]>
pablogsal pushed a commit that referenced this pull request Oct 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants