Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Add the ability for @async_generator to produce a native async generator #17
This improves performance and offers cleaner tracebacks, although native generators continue to have the failure mode of https://bugs.python.org/issue32526 and to provide not-very-clear exception messages when they're misused.
Since the semantics of native async generators are slightly different, this change has
Also add an
@@ Coverage Diff @@ ## pr15-pr16-combined #17 +/- ## ================================================== Coverage 100% 100% ================================================== Files 7 7 Lines 991 1108 +117 Branches 78 100 +22 ================================================== + Hits 991 1108 +117
…unction For example, `@trio.enable_ki_protection` requires this if you put it below `@async_generator`. We can't support native-generator-ization in this case, but we can at least avoid crashing.
I originally made this maximally paranoid about the minor behavioral differences, but on reflection I'm not sure that level of paranoia is necessary -- I think it would reasonable to make