Message12345
If an application embeds Python while stderr is not
valid, warnings can cause unexpected exceptions in the
application. This is particularly a problem when it
happens *while* the application is attempting to create
a valid stderr :)
Pythonwin recently started failing to start with the
following traceback:
File "f:\src\python-cvs\lib\regsub.py", line 15, in ?
DeprecationWarning)
File "f:\src\python-cvs\lib\warnings.py", line 45, in
warn
warn_explicit(message, category, filename, lineno,
module, registry)
File "f:\src\python-cvs\lib\warnings.py", line 104,
in warn_explicit
showwarning(message, category, filename, lineno)
File "f:\src\python-cvs\lib\warnings.py", line 110,
in showwarning
file.write(formatwarning(message, category,
filename, lineno))
exceptions.IOError: (9, 'Bad file descriptor')
I propose that the warnings module ignore IOError
exceptions when writing the warning. Attaching
proposed fix.
Assigning to Martin for feedback - assign back for me
to check in.
|
|
Date |
User |
Action |
Args |
2007-08-23 14:05:42 | admin | link | issue607668 messages |
2007-08-23 14:05:42 | admin | create | |
|