guido at python
Jul 22, 2012, 3:38 PM
Post #3 of 3
On Sun, Jul 22, 2012 at 2:06 PM, Ezio Melotti <ezio.melotti [at] gmail> wrote:
> On Sun, Jul 22, 2012 at 12:18 PM, anatoly techtonik <techtonik [at] gmail> 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.
IIRC we decided not to add new deprecations to 2.7, since the
deprecation would only affect the Python 3 line anyway -- nothing that
exists in Python 2 is going away in Python 2...
--Guido van Rossum (python.org/~guido)
Python-Dev mailing list
Python-Dev [at] python