Jonathan Slenders added the comment:
The following patch to inspect.py solves the issue that inspect.signature()
returns the wrong signature on classes that inherit from Generic. Not 100% sure
though if this implementation is the cleanest way possible. I've been looking
into attach
Jonathan Slenders added the comment:
Even simpler, the following code will crash after so many iterations:
```
import asyncio
loop = asyncio.get_event_loop()
while True:
loop.call_soon_threadsafe(loop.stop)
loop.run_forever()
```
Adding a little sleep of 0.01s after `run_forever
Jonathan Slenders added the comment:
It looks like the following code will reproduce the issue:
```
import asyncio
import threading
loop = asyncio.get_event_loop()
while True:
def test():
loop.call_soon_threadsafe(loop.stop)
threading.Thread(target=test).start
Jonathan Slenders added the comment:
Thanks Victor for the reply.
It looks like it's the self-socket in the BaseProactorEventLoop that gets
closed. It's exactly this FD for which the exception is raised.
We don't close the event loop anywhere. I also don't see `_clo
Jonathan Slenders added the comment:
Suppressing `ConnectionResetError` in
`BaseProactorEventLoop._loop_self_reading`, like we do with `CancelledError`
seems to fix it.
Although I'm not sure what it causing the error, and whether we need to handle
it so
New submission from Jonathan Slenders :
We have a snippet of code that runs perfectly fine using the
`SelectorEventLoop`, but crashes *sometimes* using the `ProactorEventLoop`.
The traceback is the following. The exception cannot be caught within the
asyncio application itself (e.g., it is
Jonathan Slenders added the comment:
Niki Spahiev made a valid argument saying that the following code is common:
if not hasattr(src, 'read'): src = open(src)
This will break if we name it 'read'/'write' lik
New submission from Jonathan Slenders:
As discussed on python-ideas, os.pipe should return a structsequence instead of
a plain tuple.
To be decided is the naming for the read and write end.
Personally, I'm in favour of using readfd/writefd.
> our_pipe = pipe()
> os.write(our_p