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

asyncio.coroutine has been deprecated since Python 3.8 and will be removed in future #513

Closed
tirkarthi opened this issue Jul 19, 2020 · 7 comments
Labels

Comments

@tirkarthi
Copy link

Versions

  • Python: 3.8
  • OS: Ubuntu
  • Pymodbus: master branch
  • Modbus Hardware (if used):

Description

asyncio.coroutine has been deprecated since Python 3.8 and will be removed in future. Use async def instead.

Code and Logs

pymodbus/client/asynchronous/asyncio/__init__.py
249:    @asyncio.coroutine
286:    @asyncio.coroutine
329:    @asyncio.coroutine
379:    @asyncio.coroutine
462:    @asyncio.coroutine
509:    @asyncio.coroutine
554:    @asyncio.coroutine
611:    @asyncio.coroutine
710:    @asyncio.coroutine
760:@asyncio.coroutine
777:@asyncio.coroutine

test/test_server_asyncio.py
69:    @asyncio.coroutine
80:    @asyncio.coroutine
88:    @asyncio.coroutine
96:    @asyncio.coroutine
109:    @asyncio.coroutine
143:    @asyncio.coroutine
183:    @asyncio.coroutine
216:    @asyncio.coroutine
248:    @asyncio.coroutine
286:    @asyncio.coroutine
322:    @asyncio.coroutine
361:    @asyncio.coroutine
407:    @asyncio.coroutine
425:    @asyncio.coroutine
433:    @asyncio.coroutine
449:    @asyncio.coroutine
464:    @asyncio.coroutine
485:    @asyncio.coroutine
527:    @asyncio.coroutine
565:    @asyncio.coroutine

test/asyncio_test_helper.py
24:            @asyncio.coroutine
@dhoomakethu dhoomakethu added this to the 3.0.0 milestone Jul 20, 2020
@JamesJeffryes
Copy link

duplicates #467 but with more complete information.

@swamper123
Copy link
Collaborator

This issue is already solved in branch 3.0.

@swamper123
Copy link
Collaborator

Since 3.0.0 is the new default branch and #564 was merged, this issue is solved.
Case closed. 🕵️

@dhoomakethu
Copy link
Contributor

Please be aware, we are supporting 3.7 also so removing co-routines completely would break things for pymodbus on python3.7

@swamper123
Copy link
Collaborator

Isn't this decorator not just a compatible thing to async/await syntax?
Since my PR is a while ago, I will take a look again if I have fixed that the way it was right.

@swamper123
Copy link
Collaborator

Well, it looks like I have just replaced one decorator, but replaced it with modern syntax.
I guess this is for codecompatibility with older versions, but isn't used anymore and not important for >= 3.7.
Even you replaced one last year. ;)

@dhoomakethu
Copy link
Contributor

My memory is fading :P , Thanks for taking care.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants