[issue36015] streamhandler canont represent streams with an integer as name

2019-02-18 Thread Vinay Sajip
Vinay Sajip added the comment: > That is, when opening a file descriptor the name is set to the value of that > file descriptor as an integer. I see. But I wonder if there is anything that relies on the name being an integer? It seems pretty counter-intuitive for a 'name' attribute to be set

[issue36015] streamhandler canont represent streams with an integer as name

2019-02-18 Thread Ronald Oussoren
Ronald Oussoren added the comment: In Python 3.7.2: >>> open(2, 'a') <_io.TextIOWrapper name=2 mode='a' encoding='UTF-8'> >>> m = _ >>> m.name 2 >>> type(_) That is, when opening a file descriptor the name is set to the value of that file descriptor as an integer. BTW. The implementation o

[issue36015] streamhandler canont represent streams with an integer as name

2019-02-18 Thread Riccardo Magliocchetti
Riccardo Magliocchetti added the comment: Yeah, I'm not sure the pr is just papering over the real issue :) Need to check what io.open sets on name. IF it setting the fd as name instead of creating a string that would be still be a bug in Python to me. Could you please wait a bit for me to c

[issue36015] streamhandler canont represent streams with an integer as name

2019-02-18 Thread Vinay Sajip
Vinay Sajip added the comment: I'm not sure this is a problem with logging. The code immediately preceding the failure is: name = getattr(self.stream, 'name', '') if name: name += ' ' So, the failure occurs because the stream has a name attribute which is not a string. Even

[issue36015] streamhandler canont represent streams with an integer as name

2019-02-18 Thread SilentGhost
Change by SilentGhost : -- nosy: +vinay.sajip type: crash -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue36015] streamhandler canont represent streams with an integer as name

2019-02-17 Thread Riccardo Magliocchetti
Change by Riccardo Magliocchetti : -- keywords: +patch pull_requests: +11933 stage: -> patch review ___ Python tracker ___ ___ Pyth

[issue36015] streamhandler canont represent streams with an integer as name

2019-02-17 Thread Riccardo Magliocchetti
New submission from Riccardo Magliocchetti : When debugging uwsgi logging issues with python3.7 i got this on python 3.7.2: 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/