[Patches] [ python-Patches-703779 ] strange warnings messages in interpreter
SourceForge.net
noreply@sourceforge.net
Thu, 22 May 2003 14:29:53 -0700
Patches item #703779, was opened at 2003-03-14 13:52
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=703779&group_id=5470
>Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Michael Stone (mbrierst)
>Assigned to: Nobody/Anonymous (nobody)
Summary: strange warnings messages in interpreter
Initial Comment:
If the PYTHONSTARTUP environment
variable is used, warnings will look strange.
The warnings module uses __file__
to try to find the line causing the warning and print
it out. __file__ is never reset after being set
when processing the startup file.
The attached patch fixes this by changing
PyRun_SimpleFileExFlags to unset __file__
in the __main__ module dictionary entry after
running a file, when it had been set by the
routine in the first place.
----------------------------------------------------------------------
>Comment By: Neal Norwitz (nnorwitz)
Date: 2003-05-22 17:29
Message:
Logged In: YES
user_id=33168
Moving to patches
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=703779&group_id=5470