[Python-Dev] Print policy for deprecated modules
ezio.melotti at gmail.com
Sun Jul 22 23:06:42 CEST 2012
On Sun, Jul 22, 2012 at 12:18 PM, anatoly techtonik <techtonik at gmail.com> wrote:
> What is a print policy for deprecated modules? "new" module is
> deprecated in 2.6, but 2.7.3 doesn't print any warnings. Is it a bug?
> python -Wd -c "import new"
In theory this should show a warning, but for some reason it doesn't.
Reading the messages on http://bugs.python.org/issue1247765 it seems
that there wasn't a clear consensus about the deprecation schedule, so
that might be the reason.
If the warning is missing just because no one remembered to add it, I
guess it can still be fixed on 2.7, but for 2.6 is too late now.
FWIW you get a warning if you use the -3 flag:
$ python -Wd -3 -c "import new"
-c:1: DeprecationWarning: The 'new' module has been removed in
Python 3.0; use the 'types' module instead.
More information about the Python-Dev