[Python-Dev] [Python-3000] Warning for 2.6 and greater

Anthony Baxter anthony at interlink.com.au
Thu Jan 11 02:44:39 CET 2007


On Thursday 11 January 2007 07:48, Thomas Wouters wrote:
> They serve a different purpose, and it isn't taking any time away
> from me (or Anthony, I can confidently guess) working on 2to3.

Correct. Note that checking for something like dict.has_key is going 
to be far far more reliable from inside the interpreter. Heck, one 
of the PEP-3xxx's actually calls for doing this.

> > I'm all for helping people to prepare for 3.0, since I don't
> > want to see it languish in Perl 6 country. At the same time I
> > agree with Raymond that migration to 3.0 can't be allowed to
> > place obstacles in the way of 2.X users. They shouldn't be
> > penalised for using 2.X, particularly if they are new to the
> > language, otherwise we will run the risk of adversely affecting
> > the Python adoption rate - which I hope no reader of this list
> > wants.
> >
> > So, why not a new warning category: MigrationWarning?
>
> I believe Anthony suggested Py3KDeprecationWarning or such. I
> don't think the name really matters.

Correct. In addition, please read what I posted - these warnings are 
off by default, and won't go through the warnings mechanism at all 
unless you specify the command line flag.

I've had a number of people say that this is something they would 
really, really like to see - the idea is both to let people migrate 
more easily, and provide reassurance that it won't be that bad to 
migrate!

-- 
Anthony Baxter     <anthony at interlink.com.au>
It's never too late to have a happy childhood.


More information about the Python-Dev mailing list