Backwards Compatibility of Python versions

Justin Sheehy justin at iago.org
Mon Feb 4 16:21:30 CET 2002


Paul Rubin <phr-n2002a at nightsong.com> writes:

>> Not so:  introducing "//" was 100% backward-compatible, so isn't controlled
>> by __future__.  "//" works out of the box in 2.2, no __future__ required.
>
> If I type "3//4" into 1.5.2 or 2.1, I get a SyntaxError exception, so
> it isn't backwards compatible.

You don't seem to understand what "backward-compatible" means.  What
you are talking about is more related to forward compatibility, and is
generally far less important than backward compatibility.

Backward compatibility is broken when code that does work in an older
version does not work in a newer version.

What concrete example do you have of your own working code that was
correct and working, but broke in 2.2?

(Note that the "correct" bit there rules out socket-argument problems,
since the code that broke in those cases was not really conforming to
the admittedly misleading docs.)

I believe that there are some minor and unfortunate cases, but I'd
like to know what you were actually bitten by.  If you don't have an
answer, you might be better off programming than ranting.

> If the official Python maintainers think they might release a 1.5.3
> someday, then it's fair to say that the 1.5 series is still current.

No, it isn't.

2.2 is the only current series, exactly because the Python dev team
says so.  Older versions may receive bugfix releases, but that does
not make them current.

> More importantly, in the real world, a lot of people are still using
> 2.1 and 1.5, and few are using 2.2.  So coding anything in a way that
> requires 2.2 inconveniences a lot of users. 

So, if you don't want to inconvenience those users, don't make your
code require 2.2.  This seems fairly obvious and easy.

> That might be worth it for serious features like metaclasses or
> generators, but is silly to do over this division nonsense

What division nonsense?

Show me the division-using code that works pre-2.2 but breaks in 2.2.

I don't believe that there is any.

-Justin

 





More information about the Python-list mailing list