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

Using GLibEventLoop on Python 3.8 causes assertion: not instance of AbstractEventLoopPolicy #2

Closed
craftyguy opened this issue Feb 1, 2020 · 1 comment

Comments

@craftyguy
Copy link

Traceback (most recent call last):
  File "app.py", line 11, in <module>
    asyncio.set_event_loop_policy(asyncio_glib.GLibEventLoop())
  File "/usr/lib64/python3.8/asyncio/events.py", line 731, in set_event_loop_policy
    assert policy is None or isinstance(policy, AbstractEventLoopPolicy)
AssertionError
Exception ignored in: <function BaseEventLoop.__del__ at 0x7fe1607db3a0>
Traceback (most recent call last):
  File "/usr/lib64/python3.8/asyncio/base_events.py", line 652, in __del__
  File "/usr/lib64/python3.8/asyncio/unix_events.py", line 58, in close
  File "/usr/lib64/python3.8/asyncio/selector_events.py", line 92, in close
  File "/usr/lib64/python3.8/asyncio/selector_events.py", line 99, in _close_self_pipe
  File "/usr/lib64/python3.8/asyncio/selector_events.py", line 281, in _remove_reader
  File "/home/clayton/repos/app/venv/lib/python3.8/site-packages/asyncio_glib/glib_selector.py", line 88, in unregister
  File "/home/clayton/repos/app/venv/lib/python3.8/site-packages/asyncio_glib/glib_selector.py", line 59, in unregister

Can be reproduced with this on python 3.8:

import asyncio
import asyncio_glib


async def main():
    print('good bye world')
    await asyncio.sleep(42)


asyncio.set_event_loop_policy(asyncio_glib.GLibEventLoop())
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
@craftyguy
Copy link
Author

oof, I should have passed asyncio_glib.GLibEventLoopPolicy instead of asyncio_glib.GLibEventLoop, sorry about the unwarranted issue filing!

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

1 participant