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

Clarify what counts as 'running' #39

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

oremanj
Copy link
Member

@oremanj oremanj commented Jul 11, 2023

As proposed in #38, this PR updates sniffio's documentation and asyncio detection to adopt a consistent stance on what counts as "currently running". Now, user code that is invoked by an async library but is not part of an async task will still return that async library from sniffio.current_async_library().

Fixes #35. Fixes #38.

@oremanj oremanj requested a review from graingert July 11, 2023 11:13
@codecov
Copy link

codecov bot commented Jul 11, 2023

Codecov Report

Merging #39 (852561d) into master (0cfdab8) will increase coverage by 3.48%.
The diff coverage is 100.00%.

Additional details and impacted files
@@             Coverage Diff             @@
##           master       #39      +/-   ##
===========================================
+ Coverage   96.51%   100.00%   +3.48%     
===========================================
  Files           4         4              
  Lines          86        81       -5     
  Branches       17        15       -2     
===========================================
- Hits           83        81       -2     
+ Misses          2         0       -2     
+ Partials        1         0       -1     
Impacted Files Coverage Δ
sniffio/_impl.py 100.00% <100.00%> (+9.09%) ⬆️
sniffio/_tests/test_sniffio.py 100.00% <100.00%> (ø)

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.

Proposed new sniffio semantics SniffIO doesn't detect asyncio when running sync callbacks in loop
1 participant