This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mhammond
Recipients
Date 2002-09-11.06:17:40
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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.
History
Date User Action Args
2007-08-23 14:05:42adminlinkissue607668 messages
2007-08-23 14:05:42admincreate