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

2016-10-30 Thread Glyph Lefkowitz
rreds that we have used in the past. Some of the students at such tutorials would say stuff like "Actually I wanted to do something with IRC and IMAP, not a web app, but this gave me a much clearer idea of how to approach it." So I think having asyncio's tutorial work this way would probably be a big win. -glyph

Re: [python-tulip] StreamWriter.drain cannot be called concurrently

2015-06-13 Thread Glyph
On Jun 12, 2015, at 2:37 PM, Martin Teichmann martin.teichm...@gmail.com wrote: Hi Glyph, hi Guido, hi everyone. You have two very different points of critique, let me respond to both of them: StreamWriter.drain cannot be called from different tasks (asyncio tasks

Re: [python-tulip] StreamWriter.drain cannot be called concurrently

2015-06-11 Thread Glyph
and interleaved writes. -glyph

Re: [python-tulip] Is async object creation supported?

2015-05-16 Thread Glyph
for these same reasons; you just notice it faster in an async framework :). -glyph

Re: [python-tulip] Benchmark Python Web production stack: Nginx with uWSGI, Meinheld and API-Hour

2015-03-12 Thread Glyph Lefkowitz
, PyPy should always be your default. -glyph

Re: [python-tulip] Proposal: make coroutines stand out in the asyncio docs.

2015-02-12 Thread Glyph Lefkowitz
On Feb 12, 2015, at 12:38 PM, Luciano Ramalho luci...@ramalho.org wrote: The asyncio code often uses the inspect module to determine the kind of function, right? From the caller's perspective (i.e. the reader of the documentation), though, isn't a method that returns an asyncio Future more

Re: [python-tulip] Proposal: make coroutines stand out in the asyncio docs.

2015-02-12 Thread Glyph Lefkowitz
On Feb 12, 2015, at 8:39 AM, Andrew Svetlov andrew.svet...@gmail.com wrote: I'm with Ben Darnell: coroutine decorator is more like classmethod than return type. For what it's worth, I disagree; a coroutine is something that a method either returns or doesn't return, so it is more like

Re: [python-tulip] Call protocol.connection_lost() when the creation of transport failed?

2015-01-29 Thread Glyph
On Jan 29, 2015, at 12:49 AM, Victor Stinner victor.stin...@gmail.com wrote: Hi, 2015-01-29 5:19 GMT+01:00 Glyph gl...@twistedmatrix.com: Twisted always immediately reports the connectionMade to the application-level protocol, so a TLS protocol's connectionMade means the same thing

Re: [python-tulip] Call protocol.connection_lost() when the creation of transport failed?

2015-01-28 Thread Glyph
is only invoked on protocols with a TLS transport. Probably rather than having the transport promise to store its peer certificate forever, you could just pass the certificate to this callback. -glyph P.S.: I am definitely going to put the quote below on a bumper sticker, with attribution

Re: [python-tulip] Re: Soliciting feedback on AsyncSSH

2014-07-17 Thread Glyph
unit testing (and the extra features it has are mostly related to letting you do more 'real' I/O in your tests, which are a bad idea for unit tests). -glyph

Re: [python-tulip] Re: Soliciting feedback on AsyncSSH

2014-07-17 Thread Glyph
right away. By all means caption it with big warnings about its unsuitability for long-term use, but it will provide a valuable resource for anyone else who wants to help you unit-test stuff. -glyph

Re: [python-tulip] sockets, eof_received() and shutdown()

2014-06-27 Thread Glyph
Didn't receive any data is the wrong way of looking at this. It closes the socket if it receives an EOF. A 0-byte return is an authoritative statement that there *will be* no more data, not that there isn't any right now. there isn't any right now is EAGAIN. A couple of brief experiments

Re: [python-tulip] Performance of asynchronous data processing.

2014-06-13 Thread Glyph
as to how to fix this in a more general way than creating a new interface for every new form of variable-length data, and if it ever works out, I'll be sure to share the technique with the asyncio community. -glyph

Re: [python-tulip] TLS handshake exception. Bug/Comments/HeartBleed?

2014-05-06 Thread Glyph
for linkedin.com, not ok for licdn.com) then perhaps the issue is with your network. Good luck, -glyph

Re: [python-tulip] TLS handshake exception. Bug/Comments/HeartBleed?

2014-05-06 Thread Glyph
of those things? At any rate, if other OpenSSL programs on the same computer are having the same results, this isn't an asyncio issue per se, and you should probably find an OpenSSL or Debian mailing list to ask :-). Good luck, -glyph

Re: [python-tulip] Connection timeout in create_connection

2014-04-16 Thread Glyph
of this is two or three times as bad if you care about running on PyPy, where garbage collection semantics mean files may not be closed for much longer if there isn't a lot of memory pressure. -glyph

Re: [python-tulip] SyPy Presentation on asyncio: Hitchhiker's Guide To Asyncio in Python 3

2014-03-10 Thread Glyph Lefkowitz
of you who may have to start answering this question on a weekly basis now for the rest of your lives ;-) -glyph smime.p7s Description: S/MIME cryptographic signature

Re: [python-tulip] Idle actions in loop

2014-03-04 Thread Glyph Lefkowitz
, I really need to upstream some patches into urwid to get it to stop doing horrible stuff to various framework internals to get this feature and instead implement it in a simple high-level way...) -glyph smime.p7s Description: S/MIME cryptographic signature

Re: [python-tulip] Event loop error handler

2014-02-10 Thread Glyph
Oops, it was pointed out to me that this message isn't super clear. To put it more simply: Please go ahead and do this, using the loop API everywhere would be a lot better for my uses :-). -glyph On Feb 10, 2014, at 5:12 PM, Glyph gl...@twistedmatrix.com wrote: I have a use-case, which