[issue38013] AsyncGenerator breaks when not iterated fully with RuntimeError("can't send non-None value to a just-started coroutine")

2019-09-02 Thread Michael Yoo


New submission from Michael Yoo :

Version: Python 3.7.3

When I run this code:

import asyncio


class TestAsyncGenerator:
def __init__(self):
pass

async def aiter(self):
yield 1
yield 2


async def main():
gen = TestAsyncGenerator()
async for number in gen.aiter():
break


asyncio.run(main())

# unhandled exception during asyncio.run() shutdown
# task: ()> 
exception=RuntimeError("can't send non-None value to a just-started coroutine")>
# RuntimeError: can't send non-None value to a just-started coroutine


There is a warning message that I don't expect to see. I would expect breaking 
from an async iteration to behave as if breaking from a normal iteration - that 
is, no problems.

However, I see the warning message shown above. Am I missing something? 
Otherwise, I believe this is a bug. Thanks!

--
components: asyncio
messages: 351044
nosy: Michael Yoo, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: AsyncGenerator breaks when not iterated fully with RuntimeError("can't 
send non-None value to a just-started coroutine")
type: behavior
versions: Python 3.7

___
Python tracker 
<https://bugs.python.org/issue38013>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39273] ncurses does not include BUTTON5_* constants

2020-01-08 Thread Michael Yoo


New submission from Michael Yoo :

Hi,

Recently I was working with ncurses, and when handling the mouse scroll events, 
I noticed that the curses library does not include the BUTTON5_* macros 
provided by ncurses. On my system, BUTTON5 corresponds to the mouse down event.

Is there a reason for this, or has it just not been updated? If so, the 
expectation is that it exists.

Relevant source location: 
https://github.com/python/cpython/blob/2bc3434/Modules/_cursesmodule.c#L4668

--
components: Library (Lib)
messages: 359657
nosy: michael@akunacapital.com
priority: normal
severity: normal
status: open
title: ncurses does not include BUTTON5_* constants
type: enhancement
versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue39273>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com