You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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�NSDUDU�Q�td/lib64/ld-linux-x86-64.so.2���GNU��H
��Y������U�?����=����W�G.�@�����V������������Z3��!�$������5��R��T���&�����j��>�D�����=�i���w���R�J���0������'���f�������X�������5����#���U�!�������������`�q��L�@��~�������:������
#� $� _�
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.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: