gawel / irc3

plugable irc client library based on python's asyncio with DCC and SASL support
https://irc3.readthedocs.io/
MIT License
208 stars 46 forks source link

Support for generator-based coroutines is deprecated and is removed in Python 3.11. #203

Closed MentalFS closed 1 year ago

MentalFS commented 1 year ago

Output of irc3 --version with Python 3.11:

Traceback (most recent call last):
  File "/usr/local/bin/irc3", line 5, in <module>
    from irc3 import run
  File "/usr/local/lib/python3.11/site-packages/irc3/__init__.py", line 71, in <module>
    class IrcBot(base.IrcObject):
  File "/usr/local/lib/python3.11/site-packages/irc3/__init__.py", line 376, in IrcBot
    @asyncio.coroutine
     ^^^^^^^^^^^^^^^^^
AttributeError: module 'asyncio' has no attribute 'coroutine'. Did you mean: 'coroutines'?

From the Python documentation:

@asyncio.coroutine Deprecated since version 3.8, will be removed in version 3.11: Use async def instead.

gawel commented 1 year ago

This one was easy to fix but there is another problem with 3.11. The irc3.extend decorator do not behave the same. I suspect a problem related to venusian

gawel commented 1 year ago

Also solved. But tests still failing. The branch may work for you https://github.com/gawel/irc3/pull/204

gawel commented 1 year ago

I've released 1.1.9. Everything should be fine

MentalFS commented 1 year ago

Thank you very much for your work 🙂