Fixed python 3 incompatibility in logging API implemenation of findCaller#5058
Fixed python 3 incompatibility in logging API implemenation of findCaller#5058
Conversation
cognifloyd
left a comment
There was a problem hiding this comment.
From reading and comparing with the python code, LGTM.
Though it seems there have been changes in 3.9 since you looked, so the line numbers have changed.
|
@nmaludy Looks like there's an issue starting sensor container. The integration test in travis is failing consistently on both PRs. |
Co-authored-by: Jacob Floyd <cognifloyd@gmail.com>
|
@cognifloyd good catch, i had the right line numbers in the description of this PR, but must have had a bad copy/paste in the code itself. @m4dcoder i re-ran the integration tests and they passed (i just committed @cognifloyd change so we'll see how they run this time), also note that i tested sensors explicitly since that is what @punkrokk reported and they definitely worked on my systems (centos7, centos8, ubuntu18) |
|
@nmaludy @cognifloyd LGTM Thanks guys! |
Closes #5057
See that issue for description of what the problem was. The fix was simply to ensure our implementation handles both the python 2 version and returns a 3-tuple, along with the python 3 version which returns a 4-tuple and is based on the code here: https://github.com/python/cpython/blob/3.9/Lib/logging/__init__.py#L1502-L1536
I've tested this change both my a python 2.7 (centos7) and python 3.6 (centos8 and ubuntu18) box and the logging modules are returned properly.