Skip to content

Conversation

@danielhollas
Copy link
Contributor

@danielhollas danielhollas commented Oct 23, 2025

The crucial thing to resolve for Python 3.14 is the asyncio.get_event_loop behaviour change -- it now raises RuntimeError if there's not event loop running. See #283.

This is based on #308 that I rebased on master.

I'll try to make a minimal set of changes required for tests to pass on Python 3.14.

@danielhollas danielhollas changed the title Python 3.14 WIP: Support python 3.14 Oct 23, 2025
@codecov
Copy link

codecov bot commented Oct 23, 2025

Codecov Report

❌ Patch coverage is 82.50000% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.70%. Comparing base (051b3fe) to head (06d6f3c).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
src/plumpy/futures.py 33.34% 4 Missing ⚠️
src/plumpy/events.py 83.34% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #329      +/-   ##
==========================================
- Coverage   90.83%   90.70%   -0.13%     
==========================================
  Files          22       22              
  Lines        3009     3031      +22     
==========================================
+ Hits         2733     2749      +16     
- Misses        276      282       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@danielhollas
Copy link
Contributor Author

danielhollas commented Oct 23, 2025

The remaining errors likely come from nest_asyncio since I am seeing a similar test failure in its test suite, see danielhollas/nest_asyncio#3

 File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/site-packages/nest_asyncio.py", line 29, in run
    return loop.run_until_complete(task)
           ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/site-packages/nest_asyncio.py", line 89, in run_until_complete
    return f.result()
           ~~~~~~~~^^
  File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/asyncio/futures.py", line 208, in result
    raise self._exception.with_traceback(self._exception_tb)
  File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/asyncio/tasks.py", line 289, in __step_run_and_handle_result
    result = coro.send(None)
  File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/asyncio/tasks.py", line 487, in wait_for
    async with timeouts.timeout(timeout):
               ~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/asyncio/timeouts.py", line 88, in __aenter__
    raise RuntimeError("Timeout should be used inside a task")
RuntimeError: Timeout should be used inside a task

EDIT: I've confirmed that this is indeed the case; when I disable nest_asyncio, the failing tests are passing. (of course different tests start to fail in that case, as expected)

@danielhollas
Copy link
Contributor Author

@unkcpz I got Python 3.14 working here 🎉
This just requires a simple patch to nest_async, see danielhollas/nest_asyncio#3

@danielhollas danielhollas changed the title WIP: Support python 3.14 Support python 3.14 Oct 23, 2025
TODO: Write a test for this,
it was causing test failures in aiida-core
@danielhollas
Copy link
Contributor Author

TODO: For me, report bug to uv about installing for git branches for repos with dynamic versions.

astral-sh/uv#7866

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