adiroiban reviewed <https://tm.tl/#5812> - PEP 3105 Make print a function (assigned to rodrigc)
daniele_athome joined the channel
__marco_ has quit
c0ded joined the channel
der-landgraf has quit
evil_gordita joined the channel
der-landgraf joined the channel
der-landgraf has quit
der-landgraf joined the channel
__marco_ joined the channel
der-landgraf has quit
kivrin
Hi , I am trying to implement bully algorithm, I am using DatagramProtocol . Lets say , I have sent an election message to my peers , and I expect an "I am alive" message . I am doing reactor.callLater(delay,some_function).. So , should I set some flag value when i receive my data and use in my "some_function" ?
der-landgraf joined the channel
is that the right way to go about it ?
efphe joined the channel
jordanl has quit
adamdangoor joined the channel
kenaan
rodrigc submitted <https://tm.tl/#5812> - PEP 3105 Make print a function (assigned to adiroiban) for review
kivrin has quit
fennesz joined the channel
__marco_ is now known as __marco
kivrin joined the channel
kivrin
??
fennesz has quit
der-landgraf has quit
der-landgraf joined the channel
fennesz joined the channel
adamdangoor joined the channel
terrycojones has quit
terrycojones joined the channel
brodolfo joined the channel
der-landgraf has quit
__marco has quit
__marco joined the channel
der-landgraf joined the channel
fennesz has quit
der-landgraf has quit
der-landgraf joined the channel
terrycojones has quit
terrycojones joined the channel
der-landgraf has quit
der-landgraf joined the channel
robbyoconnor joined the channel
_atdaemon joined the channel
kivrin has quit
der-landgraf has quit
der-landgraf joined the channel
__marco has quit
__marco joined the channel
der-landgraf has quit
}ls{ joined the channel
}ls{ joined the channel
dorvin joined the channel
fennesz joined the channel
__marco has quit
licensed joined the channel
licensed has quit
fennesz has quit
kivrin joined the channel
kivrin has quit
dorvin` joined the channel
kivrin joined the channel
toothe joined the channel
toothe
Something that annoys me about Twisted - it suppresses errors.
errors and exceptions aren't displayed to the terminal.
ashfall has left the channel
simpson
toothe: Twisted's default error handler for Deferreds doesn't kick in until the Deferred is GC'd.
Add your own errbacks if you want to get those errors sooner.
toothe
GC'd?
simpson
Garbage-collected.
toothe
ahh.
is that changable, especially in development?
simpson
There's nothing builtin, but you could hack on it. I'm not sure what behavior you would want, though.
toothe
well, just in development, to see all errors immediately.
simpson
Well, that doesn't mesh with Deferred errbacks. A Deferred in an erroring state will run errbacks attached to it.
Sorry, trying to remember how Deferreds work. It's been a while.
kenaan
hawkowl reviewed <https://tm.tl/#8194> - Add HTTP/2 implementation of HTTPChannel. (assigned to Lukasa)
tomprince
toothe: it "suppresses" errors to the same extent that catch does.
mat^2 has quit
brodolfo has quit
i-one joined the channel
ssbr has quit
_atdaemon has quit
terrycojones
toothe IMO It's good practice to add an errback to deferreds (that you receive) in any case, even (or especially) when you're sure nothing can go wrong. Just call addErrback and pass a logging function, if nothing else. I'm talking about the simple case where something returns you a deferred and you don't pass it on to other code.
i-one has quit
simpson
Can't you use log.err as the errback? ISTR that something like that is available.
asdf
(you can, yes)
terrycojones
simpson yes, assuming you're not passing the deferred on to any other code that might also want to add callbacks (because log.err returns None)
terrycojones afk
asdf
unfortunately you can't do that with twisted.logger :(
simpson
Okay, so that's the missing piece that I forgot; log.err "caps" the Deferred.
jml joined the channel
EvilJStoker has quit
EvilJStoker joined the channel
frymaster joined the channel
rpcope joined the channel
mat^2 joined the channel
ssbr joined the channel
terrycojones
simpson it doesn't really... the deferred can still have things added to it, but after calling log.err the result in the deferred is now None and you're back on the callback chain - probably not very useful. but maybe that's what you meant.
simpson
terrycojones: Yeah. No more data, no more useful information other than knowing that the rest of the Deferred has executed.
terrycojones
right
artige has quit
jordanl joined the channel
mat^2 joined the channel
runciter joined the channel
kivrin has quit
efphe has quit
runciter has quit
jordanl has quit
mesozoic_ joined the channel
kenaan
new core task https://tm.tl/#8368 by mesozoic: Deprecated twisted.cred.credentials.UsernameHashedPassword