[New-bugs-announce] [issue7694] DeprecationWarning from distuils.commands.build_ext needs stacklevel

Tres Seaver report at bugs.python.org
Wed Jan 13 17:48:39 CET 2010

New submission from Tres Seaver <tseaver at agendaless.com>:

2.7 has a new DeprecationWarning inside the build_ext command for code
which sets the 'compiler' to anything other than a string or None.
Because the warning occurs within property getter / setters, it needs
to boost the stacklevel for the warning above the default value of 1.
In addition, the setter is called from within '__setattr__', which means
that it needs to be incremented again in that case.

The attached patch does both of these things.

assignee: tarek
components: Distutils
files: python-2.7-distutils_warning.patch
keywords: patch
messages: 97725
nosy: tarek, tseaver
severity: normal
status: open
title: DeprecationWarning from distuils.commands.build_ext needs stacklevel
versions: Python 2.7
Added file: http://bugs.python.org/file15857/python-2.7-distutils_warning.patch

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list