asyncio
asyncio copied to clipboard
asyncio historical repository
Don't pass ssl certivicate error to loop.call_exception_handler() Handle ssl.CertificateError only because ssl.SSLError may be raised not only on connection establishment. @1st1 please take a look
This topic was originally brought up in PR #297. `StreamReader` class allows to implement protocols parsers in a very convenient way already. Instead of managing buffers and callbacks, one can...
Installing asyncio 3.4.3 on python 2.7 break python: ``` File "/usr/local/lib/python2.7/site-packages/asyncio/selectors.py", line 39 "{!r}".format(fileobj)) from None ^ SyntaxError: invalid syntax ``` If asyncio is not compatible with python 2.7, it...
like this ``` def data_received(self, data): resp = b'\x05' + struct.pack('!B', self.method) self.transport.write(resp) ``` in asyncio.Protocol
Unfortunatelly this is not so easy. 1. Safe, but (seems?) undocumented way in Linux -- is to call `os.fchmod(socket.fileno())` BEFORE `bind()` + set `umask` to proper value. Since umask is...
Here is an example: ``` @asyncio.coroutine def something(sleep,marker): try: print ('something() is sleeping for %s seconds!' % sleep,flush=True) yield from asyncio.sleep(sleep) finally: print ('cleaning something()!',flush=True) marker['cleaned'] = True @asyncio.coroutine def...
It doesn't appear to be possible to receive replies to multicast UDP messages. Server-side multicast does work, but only with a bit of extra config. Given the following (working) server...
I reported this issue [on the Python tracker](https://bugs.python.org/issue26455) but got no answer. If you trigger `KeyboardInterrupt` in a coroutine and catch it, the program terminates cleanly: ``` import asyncio async...
``` Currently, asyncio doesn't provide any helper to read asynchronously data from sys.stdin, like input(). Twisted implements twisted.internet.stdio: https://twistedmatrix.com/trac/browser/trunk/twisted/internet/stdio.py https://twistedmatrix.com/trac/browser/trunk/twisted/internet/_posixstdio.py https://twistedmatrix.com/trac/browser/trunk/twisted/internet/process.py#L106 https://twistedmatrix.com/trac/browser/trunk/twisted/internet/_win32stdio.py See also https://code.google.com/p/tulip/issues/detail?id=147 ``` Original issue reported on...