[issue32810] Expose ags_gen and agt_gen in asynchronous generators

2019-02-12 Thread Joshua Oreman
Joshua Oreman added the comment: I also ran into this. My workaround was to use gc.get_referents() on the async_generator_asend object, which returns a one-element list containing the async generator object. I don't know if this is guaranteed or just happened to work in the cases I

[issue41979] PEG parser doesn't accept extended unpacking in with statement

2020-10-09 Thread Joshua Oreman
New submission from Joshua Oreman : On Python 3.9.0 with the new PEG parser, the following statement produces a SyntaxError: with contextlib.nullcontext(range(1, 5)) as (first, *rest, last): print(first, rest, last) On 3.8.x, or 3.9.0 with -X oldparser, it succeeds and prints "1 [2,

[issue41451] Cannot subclass typing.Generic with __weakref__ slot in Python 3.6

2020-07-31 Thread Joshua Oreman
Joshua Oreman added the comment: The problem appears to be occurring when the base class is subscripted, not when it's inherited. I can reproduce this issue on Python 3.6.10 by just evaluating Base[T]. 'del Base.__slots__' after Base is constructed seems to work around the issue, and allow

[issue33786] @asynccontextmanager doesn't work well with async generators

2020-08-11 Thread Joshua Oreman
Joshua Oreman added the comment: This doesn't appear to have been backported to 3.7, even though it's in 3.6.6 and 3.8.0a0. -- nosy: +Joshua Oreman, lukasz.langa ___ Python tracker <https://bugs.python.org/issue33

[issue40916] Proposed tweak to allow for per-task async generator semantics

2020-06-08 Thread Joshua Oreman
New submission from Joshua Oreman : The current async generator finalization hooks are per-thread, but sometimes you want different async generator semantics in different async tasks in the same thread. This is currently challenging to implement using the thread-level hooks. I'm proposing