[issue43582] SSLContext.sni_callback docs inaccurately describe available handshake info
Paulo Costa added the comment: Hello! Has this been addressed? I'm also working on implementing acme-tls/1 protocol and having exactly the same difficulties -- nosy: +paulo-raca ___ Python tracker <https://bugs.python.org/issue43582> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26270] Support for read()/write()/select() on asyncio
New submission from Paulo Costa: I want to read from file descriptors from async coroutines. I currently use `loop.add_reader(fd, callback)` and `loop.remove_reader(fd)` It works, but IMO using callbacks feels completely alien in the middle of a coroutine. I suggest adding new APIs to handle this. e.g.: - asyncio.select(fd, mode) - asyncio.read(fd, num) - asyncio.write(fd, str) (It would be nice to support all kinds of IO operations, but these are certainly the most important) Using the current APIs, the async implementation of read() looks like this: async def async_read(fd. n): loop = asyncio.get_event_loop() future = asyncio.Future() def ready(): future.set_result(os.read(fd, n)) loop.remove_reader(fd) loop.add_reader(fd, ready) return future -- components: asyncio messages: 259438 nosy: Paulo Costa, gvanrossum, haypo, yselivanov priority: normal severity: normal status: open title: Support for read()/write()/select() on asyncio type: enhancement ___ Python tracker <http://bugs.python.org/issue26270> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26270] Support for read()/write()/select() on asyncio
Changes by Paulo Costa : -- versions: +Python 3.6 ___ Python tracker <http://bugs.python.org/issue26270> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26270] Support for read()/write()/select() on asyncio
Paulo Costa added the comment: Thanks for the replies. What I'm actually trying to do is to access from a character file from /dev/input/event*. Streams are pretty much what I want to use but (as far as I can tell) asyncio's streams only support network and unix sockets. Files are left behind. Anyway, despite the existence of streams and protocols, I still believe that `asyncio.read()`, `asyncio.write()` and `asyncio.select()` would be nice-to-have low-level APIs. -- ___ Python tracker <http://bugs.python.org/issue26270> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com