Different Eventloops on windows can now be explored
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
whoops I did not take ProactorEventLoop attribute into account. When I get back from other activities I will fix this immediately.
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.
Thank goodness I got all of that done. That took longer than it needed to to solve.
Thanks. Once we sort out https://github.com/aio-libs/aiodns/issues/175 we can move this forward