Re: [python-tulip] Discussion thread for: http://lucumr.pocoo.org/2016/10/30/i-dont-understand-asyncio/

2016-10-30 Thread Aymeric Augustin
Hello, As far as I understand, Armin’s starting point was “I want to understand everything about asyncio in order to support it well in Sentry”. This is higher bar than “I want to write decent asyncio code to get $X done”. I suspect that explains the absurd list of “things that you need to know

Re: [python-tulip] Tulip/Asyncio for 2.7

2016-05-21 Thread Aymeric Augustin
On 22 May 2016, at 01:17, Steve Morin wrote: > Is there Tulip/Asyncio for Python 2.7? Hello Steve, The closest thing you’re going to find is Trollius but it isn’t maintained anymore. Best regards, -- Aymeric.

Re: [python-tulip] Coverage.py support for await and yield-from: how should it work?

2016-01-12 Thread Aymeric Augustin
Hello Ned, On 12 janv. 2016, at 01:39, Ned Batchelder wrote: > So we have a choice: Should coverage.py could insist on a branch to the > function exit? Pro: this could alert you to code you thought produced > values, but doesn't. Con: the places you know you aren't getting any values, > you

Re: [python-tulip] Please try with the patch from Issue 25593

2015-11-19 Thread Aymeric Augustin
Hello, I understand the backwards-compatibility concerns. However I have to say that the pattern: loop.call_soon(loop.stop) loop.run_forever() seems much easier to understand and more logical than: loop.stop() loop.run_forever() Show this code to someone who's not familiar with

Re: [python-tulip] Please try with the patch from Issue 25593

2015-11-18 Thread Aymeric Augustin
helper is: > >loop.call_soon(loop.stop) >loop.run_forever() > > On Wed, Nov 18, 2015 at 1:00 AM, Aymeric Augustin > wrote: >> Hello Guido, >> >> I ran the test suite of websockets with this patch. It's interesting because >> the tests stop the event loop in

Re: [python-tulip] Please try with the patch from Issue 25593

2015-11-18 Thread Aymeric Augustin
Hello Guido, I ran the test suite of websockets with this patch. It's interesting because the tests stop the event loop in various ways when testing error conditions. Tests lock in this helper — I can't say I'm surprised: https://github.com/aaugustin/websockets/blob/212fed7/websockets/test_protoc

Re: [python-tulip] Customizing Server.close() and wait_closed()

2015-08-11 Thread Aymeric Augustin
On 11 août 2015, at 18:12, Guido van Rossum wrote: > Hm... The way I read that it seems to say that you shouldn't just close the > socket if the last thing you did was send some data and you'd like to be sure > it was received. I can't disagree with that (SSL has a similar idea IIRC), > but it

Re: [python-tulip] Customizing Server.close() and wait_closed()

2015-08-10 Thread Aymeric Augustin
Hello Guido, On 10 août 2015, at 15:32, Guido van Rossum wrote: > Folks, can we stop the testy interaction? Oops — sorry about that. > I'm personally confused how a protocol can require any kind of exchange on > shutdown. Indeed, even if a protocol recommends an exchange on shutdown, it need

Re: [python-tulip] Customizing Server.close() and wait_closed()

2015-08-10 Thread Aymeric Augustin
On 10 août 2015, at 11:38, Ludovic Gasc wrote: > I don't know all implementation details, however, we use on production for > several daemons this implementation: > http://aiohttp.readthedocs.org/en/latest/web.html#websockets > Yes,

Re: [python-tulip] Customizing Server.close() and wait_closed()

2015-08-10 Thread Aymeric Augustin
Hello Victor, On 10 août 2015, at 10:14, Victor Stinner wrote: > So you are free to develop you own logic to close them. Am I correct in reading your answer as “asyncio won't provide hooks for such logic because it belongs to a higher level”? Thanks, -- Aymeric.

[python-tulip] Customizing Server.close() and wait_closed()

2015-08-09 Thread Aymeric Augustin
Hello, I’m maintaining a library for building websocket servers (mainly). Before shutting down, the server should perform a closing handshake on open connections. I assume many other protocols with long-lived connections have similar requirements. The most natural solution would to inherit asy

Re: [python-tulip] Macro-benchmark with Django, Flask and AsyncIO (aiohttp.web+API-Hour)

2015-02-25 Thread Aymeric Augustin
On 26 févr. 2015, at 00:00, Antoine Pitrou wrote: > On Wed, 25 Feb 2015 23:44:33 +0100 > Ludovic Gasc wrote: >> >> I've disabled keep_alive in api_hour, I quickly tested on agents list >> webservices via localhost, I've 3334.52 req/s instead of 4179 req/s, 0.233 >> latency average instead of 0.

Re: [python-tulip] Improper asyncio installation

2014-04-06 Thread Aymeric Augustin
On 6 avr. 2014, at 20:45, Subhendu Ghosh wrote: > how to install asyncio correctly? any help welcome. Thank you. You’re using Python 2.7, asyncio requires Python 3.3. -- Aymeric.

Re: [python-tulip] WSGI implementation compatible with asyncio?

2014-03-26 Thread Aymeric Augustin
2014-03-26 12:41 GMT+01:00 Victor Stinner : > I would like to know which WSGI implementations are compatible with > Tulip/asyncio (and maybe also Trollius!). > As far as I understand, WSGI as defined by PEP is incompatible with asyncio. The WSGI callable would have to become a coroutine for

Re: [python-tulip] aiohttp and classical web frameworks

2014-02-16 Thread Aymeric Augustin
On 16 févr. 2014, at 16:02, Jonathan Slenders wrote: > I think that integration is indeed the way to go. No point to implement yet > another complete web stack in asyncio. FYI I’ve written the equivalent for Django [1] and discussed at length the limitations [2]. [1] https://github.com/aaugu

Re: [python-tulip] New release on PyPI?

2014-02-10 Thread Aymeric Augustin
Thanks a lot! -- Aymeric. On 10 févr. 2014, at 18:56, Guido van Rossum wrote: > I just pushed Tulip 0.3.1 to PyPI (both source and Windows wheel): > https://pypi.python.org/pypi/asyncio/0.3.1. This should only be relevant if > you're using Tulip with Python 3.3; for Python 3.4, use the upc

Re: [python-tulip] New release on PyPI?

2014-02-08 Thread Aymeric Augustin
rush it in -- it > can go into RC2 if we agree on the API.) > > PS. Have you noticed other incompatible changes? I've tried to be very > conservative about this (but honestly haven't received much feedback on this > aspect). > > > On Sat, Feb 8, 2014 at 12:03 AM,

[python-tulip] New release on PyPI?

2014-02-08 Thread Aymeric Augustin
Hello, asyncio recently received some small but breaking API changes like http://code.google.com/p/tulip/source/detail?r=5054d00a5fb10e5d09db6e419f2891c1b042036f. Since 3.4 RC1 is due tomorrow, I assume the API has stabilized. Would it be possible to push a new release to PyPI? That would spar

Re: [python-tulip] Creation of the new Trollius project

2014-01-08 Thread Aymeric Augustin
2014/1/8 Tobias Oberstein > I thought the 'u' would just be ignored on Py 3 (any version)? PEP 414 was implemented in Python 3.3. -- Aymeric.

Re: [python-tulip] Calling coroutines within asyncio.Protocol.data_received

2013-12-28 Thread Aymeric Augustin
On 28 déc. 2013, at 16:44, Tobias Oberstein wrote: > To be honest, I agree on that. A "pull style" API for WebSocket feels > unnatural to me. But it's a matter of taste, sure. Coroutines seemed easier to me, but that’s probably because I was new to async programming and never wrote significant

Re: [python-tulip] Calling coroutines within asyncio.Protocol.data_received

2013-12-28 Thread Aymeric Augustin
On 28 déc. 2013, at 14:20, Tobias Oberstein wrote: > Also: Autobahn now works with above design (and I have 95% shared code > between Twisted and asyncio), but is this how you intended asyncio to be > used, or am I misusing / not following best practice in some way? I am > totally new to async