Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warnings module prints garbage #47491

Closed
schmir mannequin opened this issue Jun 30, 2008 · 2 comments
Closed

warnings module prints garbage #47491

schmir mannequin opened this issue Jun 30, 2008 · 2 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@schmir
Copy link
Mannequin

schmir mannequin commented Jun 30, 2008

BPO 3241
Nosy @brettcannon

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:

assignee = 'https://github.com/brettcannon'
closed_at = <Date 2008-06-30.07:02:37.274>
created_at = <Date 2008-06-30.05:56:39.222>
labels = ['type-bug', 'library']
title = 'warnings module prints garbage'
updated_at = <Date 2008-06-30.07:02:37.259>
user = 'https://bugs.python.org/schmir'

bugs.python.org fields:

activity = <Date 2008-06-30.07:02:37.259>
actor = 'brett.cannon'
assignee = 'brett.cannon'
closed = True
closed_date = <Date 2008-06-30.07:02:37.274>
closer = 'brett.cannon'
components = ['Library (Lib)']
creation = <Date 2008-06-30.05:56:39.222>
creator = 'schmir'
dependencies = []
files = []
hgrepos = []
issue_num = 3241
keywords = []
message_count = 2.0
messages = ['68992', '68995']
nosy_count = 2.0
nosy_names = ['brett.cannon', 'schmir']
pr_nums = []
priority = 'normal'
resolution = 'wont fix'
stage = None
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue3241'
versions = ['Python 2.6', 'Python 2.5']

@schmir
Copy link
Mannequin Author

schmir mannequin commented Jun 30, 2008

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�@��~�������:������
     #�  $�    _�

@schmir schmir mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Jun 30, 2008
@schmir
Copy link
Mannequin Author

schmir mannequin commented Jun 30, 2008

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.

@brettcannon brettcannon self-assigned this Jun 30, 2008
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant