proceeding here:
<http://twistedmatrix.com/trac/ticket/4735>.
-glyph
On Dec 17, 2013, at 3:27 AM, Antoine Pitrou wrote:
> On Mon, 16 Dec 2013 22:21:14 -0800
> Glyph wrote:
>>
>> This is another case where pushing more convenience functionality into a
>> primitive just means more re-implementation of that convenience
>> functi
if the transport itself remembers everything.
So if you have a protocol that needs to know how to re-establish its
connection, just write a protocol that knows what "re-establish" means.
-glyph
On Dec 18, 2013, at 11:08 PM, Antoine Pitrou wrote:
> On Wed, 18 Dec 2013 20:02:48 -0800
> Glyph wrote:
>> On Dec 18, 2013, at 5:43 AM, Antoine Pitrou wrote:
>>
>>>> If you need to do something in connection_lost anyway, then why not just
>>>
ns use
serverFromString or clientFromString to parse their command-line arguments, and
an increasing number of the servers built in to Twisted do).
> (Glyph kept telling me they were cool but not quite ready or something, so I
> never had a good look.)
The thing that wasn't ready wa
ern of using a zope Interface or a python type object to
identify the required semantics (as he pointed out above).
In the case of endpoints, we just don't have any interfaces for datagram
endpoints yet, since those are pretty esoteric and the only other use-case
besides UDP we can come up with is DTLS (which, due to session-management
issues, is also esoteric enough to require other setup).
-glyph
On Jan 5, 2014, at 12:20 AM, Guido van Rossum wrote:
> On Sat, Jan 4, 2014 at 9:32 PM, Glyph wrote:
>> Endpoints are really very simple. They're two interfaces for listening and
>> connecting; .listen(factory) for servers and .connect(factory) for clients.
>> T
On Jan 5, 2014, at 12:44 AM, Guido van Rossum wrote:
> On Sat, Jan 4, 2014 at 10:11 PM, Glyph wrote:
>> Twisted's syntax is actually pretty bad [...]
>
> Noted.
>
>> "connected UDP" is a strange beast, and it doesn't make UDP a connected
>> p
ement something
like what it does with feed_data, unblocking futures that are waiting for
data_received to be called:
<https://code.google.com/p/tulip/source/browse/asyncio/streams.py#261>.
-glyph
this for my day job, but nevertheless, I still dream of making some cool games
in Python ;-).)
On Feb 7, 2014, at 4:18 PM, Guido van Rossum wrote:
> OK, go for it unless Glyph pipes up. :-)
>
>
> On Fri, Feb 7, 2014 at 2:03 PM, Yury Selivanov
> wrote:
> On 2/7/2014, 4:47
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 wrote:
> I have a use-case, which is to direct T
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
tried this on any
other machines, and so on.
On May 5, 2014, at 5:24 PM, Imran Geriskovan wrote:
> - Lack of proper CA certificates on Debian during this period
On *your* debian installation, perhaps.
Did you install the "ca-certificates" package? Is it updated?
-glyph
OS X 10.9.
If that says the same thing as asyncio, (ok for linkedin.com, not ok for
licdn.com) then perhaps the issue is with your network.
Good luck,
-glyph
analyze.html?d=static.licdn.com>. Maybe your
OpenSSL is mad about one 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
earch project") in Twisted 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
"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
milar to and
interoperable with standard library 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
o check in this code 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
ay of hardware :-).
Anyway, to make a long story short, returning a Deferred from a test is a very
advanced, somewhat risky feature that you should use only if you have no other
tools at your disposal that do what you want to do. And there are probably
more tools to do what you want to do than you might initially think :).
Happy testing,
-glyph
aio>.
-glyph
On Aug 25, 2014, at 6:55 PM, Guido van Rossum wrote:
> On most OSes, select() and other polling APIs always report disk files to be
> "ready", so you basically can't use asyncio with them. On Windows it will
> fail; on *n*x it will appear to work but ac
ntation isn't complete, I'm pretty confident that the
"right" way to do this is simply to have a separate (optional) callback which
is only invoked on protocols with a TLS transport. Probably rather than having
the transport promise to store its peer certificate forever, you
> On Jan 29, 2015, at 12:49 AM, Victor Stinner wrote:
>
> Hi,
>
> 2015-01-29 5:19 GMT+01:00 Glyph :
>> Twisted always immediately reports the connectionMade to the
>> application-level protocol, so a TLS protocol's connectionMade means the
>> same th
ation of every transport.
So how do you imagine this would be used?
-glyph
, having constructors do I/O is an anti-pattern for these same
reasons; you just notice it faster in an async framework :).
-glyph
put streams and interleaved
writes.
-glyph
> On Jun 12, 2015, at 2:37 PM, Martin Teichmann
> 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 th
'uname' is asking about the version of the kernel; you want the version of Mac
OS X.
10.8.0 is pretty old; up-to-date Darwin kernel is 13.0.2.
If you want the whole-OS product version, the relevant command line is 'sw_vers
-productVersion'.
-glyph
On Jan 10, 2014, a
much of
the useful ancillary functionality hasn't been ported yet; I suspect it could
be used as an event loop for Tulip already).
Would you like to coordinate on contributing such a thing?
-glyph
smime.p7s
Description: S/MIME cryptographic signature
On Jan 14, 2014, at 1:30 PM, Victor Stinner wrote:
> Hi,
>
> 2014/1/14 Glyph Lefkowitz :
>> I'm actually hoping to distribute such a thing within Twisted itself, so
>> that it can run against either Trollius or Tulip (in fact, Twisted's core
>> event l
On Jan 23, 2014, at 9:47 AM, Guido van Rossum wrote:
> So I think we should just note that
> protocols are a lower-level concept than StreamReader. (And more
> versatile -- that's usually how lower-level concepts work. :-)
+1. Even within Twisted, which follows the callback idiom thoroughly,
ing the error of HTTP/0.9's
the-body-is-over-when-the-connection-is-closed non-deterministic framing. You
still need to be able to flush the transport somehow for tuning reasons, but
it's good that people trip over this early.
-glyph
smime.p7s
Description: S/MIME cryptographic signature
rarely doing anything real with job control.
The only real way to deal with this in a portable way is ... to use threads.
Sorry :-(.
-glyph
smime.p7s
Description: S/MIME cryptographic signature
thin the
loop itself.
(And this reminds me, 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
at's a resource for those 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
> On Feb 12, 2015, at 8:39 AM, Andrew Svetlov 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 return type than classmet
> On Feb 12, 2015, at 12:38 PM, Luciano Ramalho 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 or less the sam
you care about performance, PyPy should always be your default.
-glyph
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
39 matches
Mail list logo