Closed nsavch closed 6 years ago
Thanks for opening an issue! Yes, that assertion can be removed. I've also started using uvloop for some asyncio work, so I'm glad you found this.
Do you want to open a PR and tag yourself in contributors, or should I take care of it?
Thanks, I don't think this is big enough to make me a contributor :) Please do it yourself.
Turns out this is for mypy; it was discussed in python/typeshed#1447 but I don't see a resolution. I bumped mypy to 0.521
which fixed one type: ignore
comment. For now I'm going to add if MYPY:
which should fix the issue for uvloop.
2.1.1 is released, and should fix the issue. Thanks for the report! Hopefully this can be cleaned up as asyncio type annotations improve.
Bottom's protocol makes an assertion that the transport is an instance of asyncio.WriteTransport (see https://github.com/numberoverzero/bottom/blob/master/bottom/protocol.py#L24 )
This assertion isn't compatible with uvloop library - an alternative event loop with better performance ( https://github.com/MagicStack/uvloop )
Is there a good reason to keep the assertion? I tried to remove it and my program works as expected. Thanks in advance for your help.