Skip to content

warnings module prints garbage #47491

Closed
Closed

Description

@schmir
mannequin
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']

Activity

  1. schmir commented on Jun 30, 2008

    schmirmannequin
    MannequinAuthor

    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�@��~�������:������
         #�  $�    _�
  2. added
    stdlib
    type-bug
    on Jun 30, 2008
  3. schmir commented on Jun 30, 2008

    schmirmannequin
    MannequinAuthor

    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.

  4. self-assigned this
    on Jun 30, 2008
  5. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

stdlibtype-bug

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions