Skip to content

Comments

Support 3.14#334

Open
khsrali wants to merge 2 commits intoaiidateam:masterfrom
khsrali:3.14
Open

Support 3.14#334
khsrali wants to merge 2 commits intoaiidateam:masterfrom
khsrali:3.14

Conversation

@khsrali
Copy link
Contributor

@khsrali khsrali commented Feb 19, 2026

Rebase of #329

Free from nest_asyncio
Plus more changes

Update 1:
We should address #283 here

Update 2:
This PR should be break into at lest three commits:

  • UV
  • 3.14
  • Drop the use of deprecated methods of asyncio

Update 3:

@khsrali khsrali changed the title 3.14 should be working here Support 3.14 Feb 19, 2026
@codecov
Copy link

codecov bot commented Feb 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.81%. Comparing base (051b3fe) to head (25d12a8).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #334      +/-   ##
==========================================
- Coverage   90.83%   90.81%   -0.02%     
==========================================
  Files          22       23       +1     
  Lines        3009     3024      +15     
==========================================
+ Hits         2733     2746      +13     
- Misses        276      278       +2     

☔ 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.


- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- name: Set up uv
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Uv installs python itself

def reset_event_loop_policy() -> None:
"""Reset the event loop policy to the default."""
asyncio.set_event_loop_policy(None)
def get_or_create_event_loop() -> asyncio.AbstractEventLoop:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This file has the most important changes

@khsrali khsrali requested a review from agoscinski February 19, 2026 14:15
@khsrali khsrali marked this pull request as ready for review February 19, 2026 14:16
Co-authored-by: Daniel Hollas <danekhollas@gmail.com>
This commit localizes all usecases of get_event_loop() in aiida-core in
one single function get_or_create_event_loop.
asyncio freqenctly is changing it's mind what should be deprecated and what should be back from
deprecation and that's maintenance burden. By localizing all get/set logic in one place, we help ourselves
to adopt in future.
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.

Fix usage of asyncio.get_event_loop which was changed in Python 3.12 to raise when no event loop was set

1 participant