[Python-3000] how to transition 2.X code to 3.0 code
Steven Bethard
steven.bethard at gmail.com
Fri Mar 24 23:11:45 CET 2006
Guido van Rossum wrote:
> Python 3000 *will* be backwards incompatible, and sometimes it will be
> awkward to convert code. The question I lay in front of the community
> is, how much incompatibility can we handle? And what will the
> transition strategy be? Someone needs to own this discussion topic,
> start collecting ideas and feedback, and draft a PEP that will guide
> the Python 3000 feature specification process.
>
> One possibility is that every feature PEP is required to contain a
> section on compatibility issues and how the transition is handled.
+1. I definitely think this should be a requirement. Every PEP
should explain how things change, and preferably give some code to
identify the changes. I guess the question is, what are acceptable
false-positive and false-negative rates?
If some false-positives and false-negatives are okay, PEP's could just
provide some regular expressions or AST-tree searches to identify
possible code problems and either log or correct them.
But if we need zero false-positives or zero false-negatives, I don't
see any way to do that but to branch the Python 3000 trunk and insert
a bunch of warnings in the code wherever it differs from Python 2.X.
What are people happy with here?
FWIW, I'm okay with imperfect change-finding because I think keeping a
branch with all the appropriate warnings is going to take a fair bit
of effort, and I suspect that effort would be better directed at other
issues.
Guido van Rossum wrote:
> Clearly we need to think about this more. Perhaps
> you would like to (co-)own the transition strategy topic?
Sure. I'll wait for some feedback in this thread, and then try to
turn it into a transition-strategy PEP.
STeVe
--
Grammar am for people who can't think for myself.
--- Bucky Katt, Get Fuzzy
More information about the Python-3000
mailing list