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.

classification
Title: warnings module prints garbage
Type: behavior Stage:
Components: Library (Lib) Versions: Python 2.6, Python 2.5
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: brett.cannon Nosy List: brett.cannon, schmir
Priority: normal Keywords:

Created on 2008-06-30 05:56 by schmir, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg68992 - (view) Author: Ralf Schmitt (schmir) Date: 2008-06-30 05:56
The warnings module prints garbage when the __file__ points to a binary.
This happens e.g. when freezing applications with bbfreeze/py2exe.

It's easy to reproduce even without freezing:

~/ python                                                          
ralf@red ok
Python 2.6b1+ (trunk, Jun 30 2008, 07:26:07) 
[GCC 4.3.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> __file__=sys.executable
>>> import md5
/home/ralf/py26/bin/python:1: DeprecationWarning: the md5 module is
deprecated; use hashlib instead
 
ELF>@SA@85Q@@'$@@@@@��@@@@T�T� ��t�t$z�] (�(�t(�t��@@
 P�td�N�NS�NSDUDUQ�td/lib64/ld-linux-x86-64.so.2GNUH
                                                                         �Y���U?��=��WG.@V�����Z3�!$�5�RT&��j�>D�=i�w�RJ�0���'�f���X����5�#�U!������`q�L@�~���:���
     #  $    _
msg68995 - (view) Author: Ralf Schmitt (schmir) Date: 2008-06-30 06:43
I just noticed that this also happens with 2.5.
I first thought it was a regression, since I've never seen frozen
programs print such garbage, it's apparently caused by bbfreeze choosing
a dubious __file__ and by 2.6 having much more warnings statements.

feel free to close as wontfix.
History
Date User Action Args
2022-04-11 14:56:36adminsetgithub: 47491
2008-06-30 07:02:37brett.cannonsetstatus: open -> closed
assignee: brett.cannon
resolution: wont fix
nosy: + brett.cannon
2008-06-30 06:43:46schmirsetmessages: + msg68995
versions: + Python 2.5
2008-06-30 05:56:39schmircreate