remove docs usage of deprecated asyncio.get_event_loop#6032
Open
remove docs usage of deprecated asyncio.get_event_loop#6032
Conversation
and update docs: * only Python 3 is supported * tornado.ioloop.IOLoop.current() is deprecated in favour of asyncio.run * run_forever uses await asyncio.Event().wait() * use `async with` where possible
graingert
commented
Mar 31, 2022
Comment on lines
-100
to
-102
| # Either use Tornado | ||
| from tornado.ioloop import IOLoop | ||
| IOLoop().run_sync(f) |
Member
Author
There was a problem hiding this comment.
the "Either use Tornado" "Or use asyncio" is redundant now that asyncio.run is the recommended approach for starting tornado:
graingert
commented
Mar 31, 2022
| await comm.write(data) | ||
|
|
||
| s = Server({'add': add, 'stream_data': stream_data}) | ||
| s.listen('tcp://:8888') # listen on TCP port 8888 |
Member
Author
There was a problem hiding this comment.
s.listen( was changed to be an async def so this didn't work anymore:
distributed/distributed/core.py
Lines 444 to 461 in 0b5d6eb
graingert
commented
Mar 31, 2022
graingert
commented
Mar 31, 2022
Contributor
Member
|
The docs in distributed.docs.org aren't really pointed to anywhere. I'd be comfortable nuking the entire thing. I encourage you to look through docs/ in dask/dask and not spend much time improving docs in this repository. My apologies that you weren't made aware of this before. |
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.
and update docs:
tornado.ioloop.IOLoop.current()orIOLoop().run_syncis deprecated in favour ofasyncio.runloop.run_foreverin favour ofawait asyncio.Event().wait()async withwhere possiblepre-commit run --all-files