Skip to content

Create an event loop if it doesn't exist #1857

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

Merged
merged 1 commit into from
Jun 10, 2025
Merged

Conversation

befeleme
Copy link
Contributor

@befeleme befeleme commented Jun 6, 2025

Python 3.14 has removed the implicit event loop creation. I was running the test suite in Fedora test environment (copr) and in the buildsystem, with varying results: sometimes the tests passed, more often they didn't. I think that if the tests are run in parallel, sometimes they reuse an event loop created for another test case. This ensures that if no event loop is present, a new one will be created.

@martindurant
Copy link
Member

Can you please leave a reference here for posterity, to the python docs announcing this change. I wonder why they did it?

Python 3.14 has removed the implicit event loop creation. The test suite
ran in Fedora test environment (copr) and in the buildsystem
with varying results: sometimes the tests passed, more often they
didn't. I think that if the tests are run in parallel, sometimes they
reuse an event loop created for another test case. This change ensures that if
no event loop is present, a new one will be created.

Announced in https://docs.python.org/dev/whatsnew/3.14.html#id7
@befeleme
Copy link
Contributor Author

Sure, it's here: https://docs.python.org/dev/whatsnew/3.14.html#id7
I also added it to the commit message and fixed the whitespace issue linter was unhappy about.

@martindurant martindurant merged commit 26f1ea7 into fsspec:master Jun 10, 2025
10 checks passed
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