Issue 7694: DeprecationWarnings in distutils are pointless (original) (raw)

Created on 2010-01-13 16:48 by tseaver, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
python-2.7-distutils_warning.patch tseaver,2010-01-13 16:48
Messages (5)
msg97725 - (view) Author: Tres Seaver (tseaver) * Date: 2010-01-13 16:48
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.
msg114470 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-08-21 00:15
This change has been reverted in 2.7 and 3.x, I’ll check distutils2. Thank you. We should test that warnings stacklevels make sense; it’s on my todo list.
msg124084 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-12-15 22:51
I checked again and found those files to be fixed in 3.2: (in Lib/distutils) command/register.py command/sdist.py dist.py extension.py. Instances of self.warn or file.warn are false positives, they are logging calls. The situation is different in distutils2: Deprecated code is ripped off, and remaining warnings should probably be made logging warnings.
msg153619 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-02-18 01:18
Due to the feature freeze of distutils and official upgrade path to distutils2, I think the DeprecationWarnings in distutils should just be removed, as they serve no useful purpose.
msg263587 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-04-16 20:24
> [...] I think the DeprecationWarnings in distutils should just be removed, as they serve no useful purpose. There are no DeprecationWarning warnings (only four PendingDeprecationWarning warnings -- two of them are for 'check_metadata') in distutils codebase in both 2.7 and 3.x anymore. Closing this as out of date.
History
Date User Action Args
2022-04-11 14:56:56 admin set github: 51943
2016-04-16 20:24:00 berker.peksag set status: open -> closednosy: + berker.peksagmessages: + resolution: out of datestage: needs patch -> resolved
2012-02-18 01🔞36 eric.araujo set keywords: - patch, easytitle: DeprecationWarning from build_ext needs stacklevel -> DeprecationWarnings in distutils are pointlessmessages: + versions: + Python 3.3, - Python 3.1
2010-12-15 22:51:31 eric.araujo set versions: + Python 3.1, Python 2.7, Python 3.2, - 3rd partynosy:tseaver, tarek, eric.araujomessages: + components: + Distutils, - Distutils2stage: needs patch
2010-12-15 22:44:45 eric.araujo set nosy:tseaver, tarek, eric.araujomessages: -
2010-09-30 00:30:54 eric.araujo set keywords: + easyversions: + 3rd party
2010-08-21 03:12:08 terry.reedy set nosy: - terry.reedy
2010-08-21 00:15:41 eric.araujo set assignee: tarek -> eric.araujotype: behaviorcomponents: + Distutils2, - Distutilstitle: DeprecationWarning from distuils.commands.build_ext needs stacklevel -> DeprecationWarning from build_ext needs stacklevelnosy: + eric.araujoversions: - Python 2.7messages: +
2010-08-05 19:11:51 terry.reedy set nosy: + terry.reedymessages: +
2010-01-13 16:48:37 tseaver create