Closed oremanj closed 6 years ago
Merging #15 into master will not change coverage. The diff coverage is
100%
.
@@ Coverage Diff @@
## master #15 +/- ##
======================================
Coverage 100% 100%
======================================
Files 7 7
Lines 776 972 +196
Branches 59 77 +18
======================================
+ Hits 776 972 +196
Impacted Files | Coverage Δ | |
---|---|---|
async_generator/__init__.py | 100% <ø> (ø) |
:arrow_up: |
async_generator/_tests/test_async_generator.py | 100% <100%> (ø) |
:arrow_up: |
async_generator/_impl.py | 100% <100%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 17521f8...c9168c1. Read the comment docs.
ping on this?
Thanks!
Add
async_generator.get_asyncgen_hooks()
andasync_generator.set_asyncgen_hooks()
, and use them under the same circumstances the equivalents insys
would be used for native generators. On 3.6+, theasync_generator
names refer to the same functions as thesys
names, so there's only one set of hooks, and frameworks that usesys.set_asyncgen_hooks()
should work seamlessly withasync_generator
functions as well.There's an issue with GC ordering or something in pypy, which causes the new logic to make the interpreter segfault under some circumstances, so keep the old logic (which complains if any async_generator is GC'ed before its execution has completed) if we detect that we're running under pypy. The bug has been reported upstream: https://bitbucket.org/pypy/pypy/issues/2786/