Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Dev

Print policy for deprecated modules

 

 

Python dev RSS feed   Index | Next | Previous | View Threaded


techtonik at gmail

Jul 22, 2012, 3:18 AM

Post #1 of 3 (241 views)
Permalink
Print policy for deprecated modules

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"
--
anatoly t.
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


ezio.melotti at gmail

Jul 22, 2012, 2:06 PM

Post #2 of 3 (232 views)
Permalink
Re: Print policy for deprecated modules [In reply to]

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.
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


guido at python

Jul 22, 2012, 3:38 PM

Post #3 of 3 (234 views)
Permalink
Re: Print policy for deprecated modules [In reply to]

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
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com

Python dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.