sniffio
sniffio copied to clipboard
Clarify what counts as 'running'
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.
Codecov Report
Merging #39 (852561d) into master (0cfdab8) will increase coverage by
3.48%. The diff coverage is100.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%) |
:arrow_up: |
| sniffio/_tests/test_sniffio.py | 100.00% <100.00%> (ø) |