IRC Logs for #circuits Monday, 2017-03-13

prologicriot: self.unregister() should work00:52
prologicit'll remove itself from the component graph and no longer run00:53
prologicalso circuits.core.utils.kill()00:53
prologicsoftinio: hey00:54
prologiccircuits has been around since 199400:54
prologicit's quite stable in many production envs00:54
prologicit's not perfect though (nothing is) so we continually improve it as a community effort00:55
riotprologic: the first doesn't stop. The events are still received and trigger exceptions because of bad initialization. The latter - i can't find.. was that removed perhaps?01:21
prologicso that has me worried02:31
prologicthat's either a bug02:31
prologicor you are injecting events into the now disconnected subgraph02:31
*** softinio has quit IRC04:19
rioti'm trying to unregister in __init__ - perhaps that?11:58
*** chrismay has joined #circuits12:21
*** chrismay_ has joined #circuits12:24
*** chrismay has quit IRC12:27
spaceoneriot: yes, because in __init__ it is not registered yet12:50
spaceonebut you can self.__unregister = True; def init(): if self.__unregister: self.unregister()12:50
riothah :> thanks a lot!12:58
riotaah, seems init is called _before_ __init__?! i'm confused.13:48
spaceoneno13:55
spaceone__init__ is the python constructor. no method can be called prior to this14:53
riotit says __unregister is an unknown attribute in init, although i assigned it in __init__ for both cases15:41
spaceonepaste your code15:44
spaceoneriot:15:44
spaceonedo you have subclasses?15:44
spaceonethen change it to have only 1 _15:44
spaceoneself._unregister = True...15:44
riothm, that is all in the same class..15:57
riotno, one underscore produces the same15:59
spaceoneplease paste the code then16:00
spaceoneand the traceback16:01
riotaaah, i found it. BaseComponent calls "init(..)" in its __init__ if the class has it. Since my subclassed __init__ hasn't run yet, that fails16:06
riotis the super(..).__init__ supposed to run at the end?16:07
spaceonei would write super(..).__init__ always at the top of my __init__16:07
riotso that won't work - the init depending on self._unregister is run too early then16:08
riotbecause i agree. I would have no (required) baseclass functionality above the super.__init__16:08
spaceoneriot: i just saw you don't need all this. there is a bug in circuits16:12
spaceoneriot: https://bpaste.net/show/149c8db6d19916:12
spaceoneriot: apply this patch and call self.unregister() in init() and it will work16:13
rioteeh, i put the _unregister check into started() - and it works16:13
riotoh, no, i'm mistaken, i had some safety in there preventing the fault from happening :/16:15
riotthe patch doesn't help, as the call to super's __init__ still wasn't completed, when you call it then16:17
spaceonestarted() is probably the better place16:18
riotno, the component is loaded late, so the system is already started :/ it never gets executed :(16:20
rioti'm currently thinking that it makes more sense to leave it running and just safeguard against the init having gone wrong. Benefit: i could rewrite it to be able to fix that after init - after the problem has been corrected (that just makes more sense to me)16:21
riot[x] done16:25
*** sysanthrope has quit IRC19:47
*** sysanthrope has joined #circuits19:47
*** chrismay_ has quit IRC20:22
*** chrismay has joined #circuits20:23
*** chrismay has quit IRC20:23
*** chrismay has joined #circuits20:23
*** chrismay has quit IRC20:24
*** chrismay_ has joined #circuits20:24
*** chrismay_ has quit IRC20:29
*** chrismay has joined #circuits21:10
*** chrismay has quit IRC21:15
*** chrismay has joined #circuits21:32
*** chrismay has quit IRC21:36
*** Coldblackice has quit IRC21:52
*** chrismay has joined #circuits22:33
*** chrismay has quit IRC22:38
*** chrismay has joined #circuits22:55
*** chrismay has quit IRC23:00
*** chrismay has joined #circuits23:17
*** chrismay has quit IRC23:21

Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!