[Python-Dev] Enabling depreciation warnings feature code cutoff
Neil Schemenauer
nas-python at arctrix.com
Mon Nov 6 13:51:45 EST 2017
On 2017-11-06, Nick Coghlan wrote:
> Gah, seven years on from Python 2.7's release, I still get caught by
> that. I'm tempted to propose we reverse that decision and go back to
> enabling them by default :P
Either enable them by default or make them really easy to enable for
development evironments. I think some setting of the PYTHONWARNINGS
evironment variable should do it. It is not obvious to me how to do
it though. Maybe there should be an environment variable that does
it more directly. E.g.
PYTHONWARNDEPRECATED=1
Another idea is to have venv to turn them on by default or, based on
a command-line option, do it. Or, maybe the unit testing frameworks
should turn on the warnings when they run.
The current "disabled by default" behavior is obviously not working
very well. I had them turned on for a while and found quite a
number of warnings in what are otherwise high-quality Python
packages. Obviously the vast majority of developers don't have them
turned on.
Regards,
Neil
More information about the Python-Dev
mailing list