fnmsd / MySQL_Fake_Server

MySQL Fake Server use to help MySQL Client File Reading and JDBC Client Java Deserialize
1.25k stars 151 forks source link

@coroutine has deprecated since python3.8 #11

Open Und3r1ine opened 2 years ago

Und3r1ine commented 2 years ago

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 commented 1 year ago

师傅 你这个问题解决了吗

Eason-zz commented 3 months ago

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

clown1ay commented 2 weeks ago

修改支持python3.8+:https://github.com/clown1ay/MySQL_Fake_Server/blob/master/server.py