Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change asyncio detection to use get_running_loop #36

Closed
wants to merge 4 commits into from

Conversation

tapetersen
Copy link

Attempt to solve #35

Not sure if the other tests are still needed (get_running_loop appeared in 3.7).
Added a test to ensure this works and could add more if needed.
Havn't tested under different event loops and for now only ran the tests on 3.10

@codecov
Copy link

codecov bot commented Nov 21, 2022

Codecov Report

Merging #36 (ec7d250) into master (0cfdab8) will decrease coverage by 5.85%.
The diff coverage is 65.38%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #36      +/-   ##
==========================================
- Coverage   96.51%   90.65%   -5.86%     
==========================================
  Files           4        4              
  Lines          86      107      +21     
  Branches       17       16       -1     
==========================================
+ Hits           83       97      +14     
- Misses          2        9       +7     
  Partials        1        1              
Impacted Files Coverage Δ
sniffio/_impl.py 74.35% <18.18%> (-16.56%) ⬇️
sniffio/_tests/test_sniffio.py 100.00% <100.00%> (ø)

@tapetersen
Copy link
Author

Not sure about backwards compatibility guarantees. I think the old part with Task could be removed if we don't need to support <3.7 . The windows errors in CI I don't really understand but it feels like they aren't related to my code.

@oremanj
Copy link
Member

oremanj commented Jul 11, 2023

Thanks for the PR! Closing in favor of #39 which is a bit more streamlined, but we're planning to adopt these semantics.

@oremanj oremanj closed this Jul 11, 2023
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.

None yet

2 participants