aiodns icon indicating copy to clipboard operation
aiodns copied to clipboard

Different Eventloops on windows can now be explored

Open Vizonex opened this issue 5 months ago • 4 comments

What do these changes do?

These Changes unlock the ability to use different event-loops with Windows in the future. This will allow users to explore other ideas and workarounds to maybe even Subclass the ProactorEventLoop to get no-event threads instances to work. Winloop no longer needs to be imported to aiodns thus saving a bit of time with checking and configuring. I moved it to a function mainly to be simulated but I can always move these parts back to the make_channel function if needed.

Are there changes in behavior for the user?

Users will no longer be locked to using winloop or the SelectorEventLoop if a windows operating system is being used. Importing winloop to aiodns inside the dns resolver no longer needs to be done. I changed the wording of the error message. Now it says it requires any eventloop but the ProactorEventLoop aiodns cannot use ProactorEventLoop on Windows if event-threads cant be utilized implying that winloop or the SelectorEventLoop or Any Custom EventLoops instead.

Related issue number

Checklist

  • [x] I think the code is well written
  • [x] Unit tests for the changes exist
  • [x] Documentation reflects the changes

Vizonex avatar Jul 09 '25 21:07 Vizonex

whoops I did not take ProactorEventLoop attribute into account. When I get back from other activities I will fix this immediately.

Vizonex avatar Jul 09 '25 21:07 Vizonex

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.01%. Comparing base (ad96d79) to head (8dcdaa3). Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #178      +/-   ##
==========================================
- Coverage   97.25%   97.01%   -0.24%     
==========================================
  Files           3        3              
  Lines         547      503      -44     
  Branches       34       31       -3     
==========================================
- Hits          532      488      -44     
  Misses          8        8              
  Partials        7        7              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov[bot] avatar Jul 10 '25 00:07 codecov[bot]

Thank goodness I got all of that done. That took longer than it needed to to solve.

Vizonex avatar Jul 10 '25 00:07 Vizonex

Thanks. Once we sort out https://github.com/aio-libs/aiodns/issues/175 we can move this forward

bdraco avatar Aug 03 '25 23:08 bdraco