#twisted

/

      • kevc_ joined the channel
      • specing
        still nothing
      • I guess PINGs it is
      • aalex joined the channel
      • apparently leaving out a parameter in a method means it will silently not be called
      • hard to catch
      • Makes one really really miss the protections of an explicitly typed language
      • simpson
        specing: If it makes you feel any better, no compiler can type-check the network.
      • specing
        they cannot, but they can catch trying to pass a method that mismatches in the number of parameters
      • And why are these "Unhandled error in Deferred:" errors always : followed by two newlines?
      • there is no help at all
      • And adding .addErrback just makes things not work at all heh
      • meejah
        you should get stacktraces from unhandled errors, IIRC. In any case you should be attacking an errback to every Deferred
      • attaching. although attacking might not be wrong either ;)
      • also what *is* the status of PB? am I wrong that "other things" should be preferred?
      • specing
        I'm trying to, but apparently doing so has unintended consequences
      • meejah
        that sounds very wrong; what is your errback receiving?
      • (most useful would be to pastebin your code)
      • specing
        e.g. [Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionRefusedError'>: Connection was refused by other side: 111: Connection refused.]
      • meejah
        that's an errback from a PB call?
      • specing
        very likely the one bound to dfr = factory.getRootObject()
      • But right now doing addErrback to another deferred object causes this call to block somehow, i.e. flow does not reach the code after it
      • meejah
        can you pastebin your code? that shouldn't happen
      • specing
        Oh was using .AddErrback instead of .addErrback
      • meejah
        (i.e. attaching an errback shouldn't cause blocking)
      • specing
        Another case of < specing> Makes one really really miss the protections of an explicitly typed language
      • meejah
        unless maybe your errback is doing something weird?
      • specing
        its just a print error & reconnect
      • meejah
        you can do type stuff in Python if you really want that pain
      • (e.g. see mypy)
      • specing
        Odd, there is no AddErrback in the API
      • but somehow it still works?
      • meejah
        ??
      • specing
        Or maybe the stacktrace is supressed
      • i.e. python does produce an error, but it is supressed by Twisted
      • meejah
        i think PB rips out stacktraces of "local" errors it sends across the wire
      • specing
        but this is in stdout/stderr
      • meejah
        from which side?
      • specing
        I should be getting full traces
      • from where I start the client
      • meejah
        it's really hard to help w/o seeing the code
      • specing
        I can try making a minimal example
      • kenaan
        Tickets pending review: https://tm.tl/#8566, #8966 (the0id), #9100, #9101, #9118 (the0id), #4964 (jameshilliard), #9131, #5739, #9138, #9143, #6938, #9156
      • yuppie has left the channel
      • dol-sen- has quit
      • dol-sen- joined the channel
      • dol-sen- is now known as dol-sen
      • aalex has quit
      • bkeys has quit
      • derek_v has quit
      • derek_v joined the channel
      • clokep joined the channel
      • __marco__ joined the channel
      • Tickets pending review: https://tm.tl/#8566, #8966 (the0id), #9100, #9101, #9118 (the0id), #4964 (jameshilliard), #9131, #5739, #9138, #9143, #6938, #9156
      • dau[m]1 joined the channel
      • wsanchez has quit
      • dau[m] has quit
      • allenap has quit
      • Brend_ joined the channel
      • merlinsbrain_ joined the channel
      • wsanchez joined the channel
      • allenap joined the channel
      • jml joined the channel
      • sdehaan__ joined the channel
      • slav0nic joined the channel
      • epopt has quit
      • slav0nic joined the channel
      • b3h3m0th joined the channel
      • glyph has quit
      • glyph joined the channel
      • liiwi_ is now known as liiwi
      • oberstet joined the channel
      • __marco joined the channel
      • __marco__ has quit
      • __marco__ joined the channel
      • __marco__ has quit
      • glyph joined the channel
      • frege joined the channel
      • terrycojones joined the channel
      • terrycojones has quit
      • Tickets pending review: https://tm.tl/#8566, #8966 (the0id), #9100, #9101, #9118 (the0id), #4964 (jameshilliard), #9131, #5739, #9138, #9143, #6938, #9156
      • __marco has quit
      • Taggnostr2 joined the channel
      • clokep joined the channel
      • frege joined the channel
      • bkeys joined the channel
      • itamarst joined the channel
      • clokep joined the channel
      • Lukasa submitted <https://tm.tl/#9157>; - AlreadyCalled error when timing out unresponsive HTTPS client. (unassigned) for review
      • __marco joined the channel
      • ch40s
        can you stop ClientService from rescheduling a reconnect? or should i not use clientservice if i dont want a reconnect?
      • evil_gordita has quit
      • clokep1 joined the channel
      • clokep1 is now known as clokep
      • hawkowl joined the channel
      • bigpet joined the channel
      • epopt joined the channel
      • __marco has quit
      • iffy joined the channel
      • iffy has left the channel
      • kenaan
        Tickets pending review: https://tm.tl/#8566, #8966 (the0id), #9100, #9101, #9118 (the0id), #4964 (jameshilliard), #9131, #5739, #9138, #9143, #6938, #9157, #9156
      • Guest61056 has quit
      • bkeys1 joined the channel
      • b3h3m0th joined the channel
      • meejah
        ch40s: I think if you stop the service (i.e. detach it from parent, and/or call .stopService()) then it won't reconnect any longer
      • [Arfrever] joined the channel
      • oberstet joined the channel
      • rthille-ciena joined the channel
      • terrycojones joined the channel
      • Abyll joined the channel
      • slav0nic joined the channel
      • rthille-ciena joined the channel
      • verterok` is now known as verterok
      • kolko joined the channel
      • mesozoic has quit
      • mesozoic_ joined the channel
      • mesozoic_ has quit
      • mesozoic joined the channel
      • aotaointbin
        hey, i haven't used twisted in a while, anyone want to help refresh my memory?
      • simpson
        aotaointbin: Twisted is a networking library. It comes with its own pluggable event loop, thread pool, a bunch of useful protocols, and various useful utilities.
      • aotaointbin
        i have a long-running function A and a short-running function B, both running with task.LoopingCall.
      • but obviously B doesn't run while A is running. do i just insert yields into A or something?
      • aotaointbin can't remember how any of this works
      • ah, yes, @inlineCallbacks and yields, right?
      • simpson
        Well, @inlineCallbacks isn't magic. You'll have to break your function up into parts; @inlineCallbacks does that for you, sort of, with a slight cost.
      • aotaointbin
        right, i don't mind dropping a yield in front of any blocking io calls...
      • ah, wait, no, that's wrong too... everything needs to return a deferred...
      • aotaointbin needs to rtfm again :(
      • simpson
        If you have blocking calls, then you either need to kick those out to the threadpool with .deferToThread() or you need to rewrite them to use Twisted's event-handling and not block.
      • aotaointbin
        not my blocking functions, will need to deferToThread :(
      • so there's nothing like LoopingCallInThread? :P
      • jamesaxl
        hi
      • how to transfer files using twisted?
      • simpson
        jamesaxl: magic-wormhole has a Python API that is pretty decent.
      • aotaointbin: No, and also all the normal caveats of threaded programming apply, so you probably *don't* want to do that much work in a thread.
      • jamesaxl
        simpson: thank a lot
      • aotaointbin
        very limited shared state, not worried about race conditions.
      • kenaan
        Tickets pending review: https://tm.tl/#8566, #8966 (the0id), #9100, #9101, #9118 (the0id), #4964 (jameshilliard), #9131, #5739, #9138, #9143, #6938, #9157, #9156
      • aotaointbin
        sweet, got it working, thanks!
      • mesozoic has quit
      • mesozoic joined the channel
      • cyphase joined the channel
      • ephemer0l_ joined the channel
      • mesozoic has quit
      • mesozoic joined the channel
      • pocek has quit
      • pocek joined the channel
      • mesozoic has quit
      • mesozoic joined the channel
      • bkeys has left the channel