[New-bugs-announce] [issue17143] trace.py uses _warn without importing it

Dmitry Jemerov report at bugs.python.org
Wed Feb 6 16:14:41 CET 2013

New submission from Dmitry Jemerov:

trace.py in Python 3.3 standard library uses the _warn function without importing it. As a result, an attempt to use a now-deprecated function fails with a NameError:

> python3
Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 01:25:11) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import trace
>>> trace.modname('')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/trace.py", line 827, in modname
    _warn("The trace.modname() function is deprecated",
NameError: global name '_warn' is not defined

components: Library (Lib)
messages: 181531
nosy: Dmitry.Jemerov
priority: normal
severity: normal
status: open
title: trace.py uses _warn without importing it
versions: Python 3.3

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list