bpo-36015: logging: handle StreamHandler representaton of stream with int name by xrmx · Pull Request #11908 · python/cpython
Conversation
When debugging uwsgi logging issues with python3.7 i got this:
Traceback (most recent call last):
File "/usr/lib/python3.7/logging/__init__.py", line 269, in _after_at_fork_weak_calls
_at_fork_weak_calls('release')
File "/usr/lib/python3.7/logging/__init__.py", line 261, in _at_fork_weak_calls
method_name, "method:", err, file=sys.stderr)
File "/usr/lib/python3.7/logging/__init__.py", line 1066, in __repr__
name = name + ' '
TypeError: unsupported operand type(s) for +: 'int' and 'str'
This caused us quite some confusion when we started deploying 3.7 applications to Prod two weeks ago, and there were literally zero applicable results on Google for some time, until I looked it up again today and found this PR. Glad to see that it is, as we suspected, a CPython bug, and that there's a fix in the works. Thanks!
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.
Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.
When debugging uwsgi logging issues with python3.7 i got this:
Traceback (most recent call last):
File "/usr/lib/python3.7/logging/__init__.py", line 269, in _after_at_fork_weak_calls
_at_fork_weak_calls('release')
File "/usr/lib/python3.7/logging/__init__.py", line 261, in _at_fork_weak_calls
method_name, "method:", err, file=sys.stderr)
File "/usr/lib/python3.7/logging/__init__.py", line 1066, in __repr__
name = name + ' '
TypeError: unsupported operand type(s) for +: 'int' and 'str'
Thanks for making the requested changes!
@vsajip: please review the changes made to this pull request.
@vsajip thanks for merging, would it be possible to add the label to have this backported to 3.7 please?
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request
May 8, 2019…er name (pythonGH-11908) (cherry picked from commit ca87eeb) Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
vsajip pushed a commit that referenced this pull request
May 15, 2019This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters