shizmob / pydle

An IRCv3-compliant Python 3 IRC library.
BSD 3-Clause "New" or "Revised" License
154 stars 48 forks source link

irccat doesn't work (relies on outdated code) #151

Closed sjohannes closed 3 years ago

sjohannes commented 3 years ago

This is mentioned in https://github.com/Shizmob/pydle/issues/142#issuecomment-645697840, but I don't think there was a proper bug report for it.

$ python3 -m pydle.utils.irccat chat.freenode.net
/usr/lib/python3.8/runpy.py:127: RuntimeWarning: 'pydle.utils.irccat' found in sys.modules after import of package 'pydle.utils', but prior to execution of 'pydle.utils.irccat'; this may result in unpredictable behaviour
  warn(RuntimeWarning(msg))
/usr/local/lib/python3.8/dist-packages/pydle/utils/irccat.py:22: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead
  def _send(self, data):
/usr/local/lib/python3.8/dist-packages/pydle/utils/irccat.py:27: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead
  def process_stdin(self):
/usr/local/lib/python3.8/dist-packages/pydle/utils/irccat.py:44: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead
  def on_raw(self, message):
/usr/local/lib/python3.8/dist-packages/pydle/utils/irccat.py:49: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead
  def on_ctcp_version(self, source, target, contents):
Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.8/dist-packages/pydle/utils/irccat.py", line 65, in <module>
    main()
  File "/usr/local/lib/python3.8/dist-packages/pydle/utils/irccat.py", line 60, in main
    irccat.eventloop.schedule_async(connect())
AttributeError: '_UnixSelectorEventLoop' object has no attribute 'schedule_async'
theunkn0wn1 commented 3 years ago

Thanks for the formal report. Yes, it looks like irccat is woefully out of date, I may have overlooked it during the asyncio /py3.7 upgrade. Presently investigating a fix.