From 25f13ea57a53b04866f1c3a0a961c951812bdb43 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 15 Aug 2013 19:58:54 -0400 Subject: Set stacklevel on DeprecationWarning for more relevant locality. --- setuptools/dist.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'setuptools/dist.py') diff --git a/setuptools/dist.py b/setuptools/dist.py index 9dbf04ba..5c84b8d4 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -808,9 +808,12 @@ class Feature: @staticmethod def warn_deprecated(): - warnings.warn("Features are deprecated and will be removed in " - "a future version. See http://bitbucket.org/pypa/setuptools/65.", - DeprecationWarning) + warnings.warn( + "Features are deprecated and will be removed in a future " + "version. See http://bitbucket.org/pypa/setuptools/65.", + DeprecationWarning, + stacklevel=3, + ) def __init__(self, description, standard=False, available=True, optional=True, require_features=(), remove=(), **extras -- cgit v1.2.1