Skip to content

bpo-36015: logging: handle StreamHandler representaton of stream with int name #11908

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 7, 2019

Conversation

xrmx
Copy link
Contributor

@xrmx xrmx commented Feb 17, 2019

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'

https://bugs.python.org/issue36015

@nickwilliams-eventbrite

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!

@bedevere-bot
Copy link

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'
@xrmx xrmx force-pushed the handlestreamwithintname branch from 5b9ab8e to 5a8a67a Compare May 7, 2019 17:31
@xrmx
Copy link
Contributor Author

xrmx commented May 7, 2019

I have made the requested changes; please review again.

@bedevere-bot
Copy link

Thanks for making the requested changes!

@vsajip: please review the changes made to this pull request.

@xrmx
Copy link
Contributor Author

xrmx commented May 7, 2019

@vsajip thanks for merging, would it be possible to add the label to have this backported to 3.7 please?

@miss-islington
Copy link
Contributor

Thanks @xrmx for the PR, and @vsajip for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

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 <[email protected]>
@bedevere-bot
Copy link

GH-13183 is a backport of this pull request to the 3.7 branch.

vsajip pushed a commit that referenced this pull request May 15, 2019
…er name (GH-11908) (GH-13183)

(cherry picked from commit ca87eeb)

Co-authored-by: Riccardo Magliocchetti <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants