Skip to content

Remove references to event loop policies. #131

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

johnzhou721
Copy link

No description provided.

Copy link
Author

@johnzhou721 johnzhou721 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove myself from credits, obviously.

@hosaka
Copy link
Collaborator

hosaka commented Jul 14, 2025

This breaks qasync.run, for example with a simple test:

def test_run_with_contextmanager():
    async def coro():
        event_loop = asyncio.get_event_loop()
        assert type(event_loop).__name__ == "QSelectorEventLoop"
        await asyncio.sleep(0)

    qasync.run(coro())

    event_loop = asyncio.get_event_loop()
    assert type(event_loop).__name__ != "QSelectorEventLoop"

While not used internally, or in any example, we probably shouldn't break the run() interface. You're also not passing the argv to QApplication.

It's also worth pointing out that we currently support python 3.8 - 3.12. The event loop policies will be deprecated in 3.14 and removed in 3.16. This doesn't concern qasync currently, until we decided to support 3.14+, by adding it to CI test targets.

@johnzhou721
Copy link
Author

@hosaka I've made the requested changes, please review again. Thank you!

@johnzhou721
Copy link
Author

@hosaka if we want to support the older event loop policy, I think we can add a version check. Let me know if that is desired.

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

Successfully merging this pull request may close these issues.

2 participants