Skip to content

Asyncio conversion - #148

Open
ptsOSL wants to merge 12 commits into
mainfrom
asyncio-conversion
Open

ptsOSL wants to merge 12 commits into
mainfrom
asyncio-conversion

Conversation

@ptsOSL

@ptsOSL ptsOSL commented Oct 15, 2025 •

Copy link
Copy Markdown
Collaborator

Convert pytac from using cothread to aioca. This requires us to adopt asyncio.

This will be a breaking change for pytac and we will not support backwards compatibility.

@ptsOSL ptsOSL changed the title Asyncio conversion Draft: Asyncio conversion Oct 15, 2025
@codecov

codecov Bot commented Oct 15, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.23%. Comparing base (e458189) to head (08baff8).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #148   +/-   ##
=======================================
  Coverage   99.23%   99.23%           
=======================================
  Files          12       12           
  Lines         781      784    +3     
=======================================
+ Hits          775      778    +3     
  Misses          6        6           

☔ View full report in Codecov by Harness.
📢 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.

Comment thread src/pytac/data_source.py
Comment thread src/pytac/data_source.py Outdated
ptsOSL added 10 commits October 1, 2026 14:24
This is the majority of the changes required to make the code asyncio
complient and to switch to aioca.
Namely converting get_single()
Awaited on functions where required. I also had to switch to
AsyncMock from MagicMock anywhere that a function needed
to return a coroutine.
The special patter of making a class object return true
or false using __bool__ is for sync code only
Some devices need awaiting and some dont
@ptsOSL
ptsOSL force-pushed the asyncio-conversion branch from 3ccbca6 to 9d5116b Compare October 1, 2026 13:24
ptsOSL added 2 commits October 7, 2026 12:01
This will add a slight overhead when interacting with
devices that dont do async operations, but its worth it to simplify
the code and speed up async devices by removing if statement.
@ptsOSL
ptsOSL force-pushed the asyncio-conversion branch from 9d5116b to 08baff8 Compare October 7, 2026 12:02
@ptsOSL ptsOSL changed the title Draft: Asyncio conversion Asyncio conversion Oct 7, 2026

This branch has not been deployed

No deployments
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.

1 participant