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

@coroutine has deprecated since python3.8 #11

Open
Und3r1ine opened this issue Nov 15, 2022 · 3 comments
Open

@coroutine has deprecated since python3.8 #11

Und3r1ine opened this issue Nov 15, 2022 · 3 comments

Comments

@Und3r1ine
Copy link

server.py:17: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead
def accept_server(server_reader, server_writer):
server.py:21: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead
def process_fileread(server_reader, server_writer,filename):
server.py:63: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead
def handle_server(server_reader, server_writer):

@est6633
Copy link

est6633 commented Apr 14, 2023

师傅 你这个问题解决了吗

@Eason-zz
Copy link

Eason-zz commented Sep 3, 2024

使用 async def 代替 @asyncio.coroutine 来定义协程,使用 await 代替 yield from 来异步等待。可以解决这个问题

@clown1ay
Copy link

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

No branches or pull requests

4 participants