-
Notifications
You must be signed in to change notification settings - Fork 594
Unvendor pyobj + fix py2->py3 compatability fixes. #3574
Conversation
89e112e
to
f483c67
Compare
def watch_topology(data, stats, event): | ||
""" watch topology """ | ||
if data: | ||
topology = Topology() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I see the problem (mismatch number of passed arguments) you are trying to address.
"/Users/someUser/.pex/installed_wheels/7b3448a0635a4c114f98f11df06af06d250c297a/kazoo-2.7.0-py2.py3-none-any.whl/kazoo/recipe/watchers.py", line 162, in _log_func_exception
result = self._func(data, stat, event)
TypeError: watch_execution_state() takes 2 positional arguments but 3 were given
I'm not sure I follow the reasoning of adding event
to each of the method signatures. If it is never used, why do we need to pass it at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it helps by avoiding the questionable pattern here which can obscure the exceptions when they occur within the handler - at least we certainly won't see the TypeError now even if the parameter is junk (no more "exception occurred while handling exception", so that much easier to read)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Thanks for clarifying. Makes sense to me.
|
f483c67
to
763c82a
Compare
thanks @thinker0, I just pushed a quick amendment that should resolve the |
@Code0x58 another
|
763c82a
to
cf3a3e6
Compare
thanks again @thinker0, I pushed another amendment. The amendment isn't 1-to-1 with the python2 implementation, but it's probably saner. I don't know if it will have a knock on effect down the line 🤞 |
@Code0x58 Another
|
cf3a3e6
to
f23265f
Compare
humm, that error looks like it could be a deeper |
f23265f
to
548635a
Compare
1ec15dd
to
e74fa85
Compare
CI passed on my machine, so hopefully the switch to the maintained version of |
@Code0x58 sorry. The last one goes like this. Other features seem to work fine.
|
Thanks again @thinker0! So much for hopes of a dumb upgrade. I'll have to spend some time getting to understand the old and new |
This also uses the longer DataWatcher handler signature to avoid a TypeError, which it relies on to indicate it should retry with the shorter signature. Without this change, exceptions can be reported messily due to a raise in the except path being reasonably expected.
e74fa85
to
0cf3781
Compare
an initial look into |
+1 |
This also uses the longer DataWatcher handler signature to avoid a TypeError, which it relies on to indicate it should retry with the shorter signature. Without this change, exceptions can be reported messily due to a raise in the except path being reasonably expected.
Re. https://heronstreaming.slack.com/archives/C0VKQLKV0/p1595162763201800
This also uses the longer DataWatcher handler signature to avoid a TypeError, which it relies on to indicate it should retry with the shorter signature.
Also sorts #3575