Notes on 2.2's changes

Christian Tanzer tanzer at swing.co.at
Sun Apr 14 05:26:43 EDT 2002


akuchlin at mems-exchange.org wrote:

> I'd like to provide a point of view on how many changes 2.2 required
> in a sizable amount of code.
>
> The MEMS Exchange codebase I work with is, as of today, 171,437 lines
> of Python code.  Looking through the CVS logs, I find the following
> messages relating to Python 2.2:
(details snipped)
> This means that from my point of view Python *has* been managed for
> stability, and the job has been done reasonably well.

I'd like to reinforce that but I would use `very well` instead of
`reasonably well`.

I'd also like to say a loud and clear **Thank You** to Guido and
everybody helping him. You're doing a terrific job. IMHO, each new
Python version I used (I started in earnest with 1.5) was a definite
improvement over an already excellent language.

I'd like to share my experiences with change in Python. In the
following I'll talk about three applications comprising 391 Python
modules with 83,305 non-blank, non-comment lines (114,612 total
lines). Our development started in 1998 with a team of 2 programmers.
Since then, about 10 different people of very different qualifications
were involved in the development.

Due to various reasons, we often are forced to use an old Python
version. For instance, we shipped our tools with 1.5.2 until last fall
when we finally managed to switch to 2.1 (unfortunately, new Python
versions often appear just around the time when we ship major
upgrades -- must be bad timing on our part :-).

I don't remember any problems in changing from 1.5.2 to 2.1.

I just tried the three applications under 2.2.1. Two of them ran
without any change, for the third I had to fix two bugs (in two places,
the code called a method of a class it didn't inherit from). To be
honest, last summer I had to make a similar change to one of the other
applications to make it run with one of the early alpha versions of
2.2.

Apart from these necessary changes, Python 2.2 also gave 4 warnings
about `from ... import *` inside functions. Looking at those functions
it seems like I'll have to write a bug report -- the functions
shouldn't be part of the module where they live now. After refactoring
the function-level import won't be needed anymore.

Conclusion: Python 2.2 told me about a few errors in my application
some of which had been lurking for a long time.

-- 
Christian Tanzer                                         tanzer at swing.co.at
Glasauergasse 32                                       Tel: +43 1 876 62 36
A-1130 Vienna, Austria                                 Fax: +43 1 877 66 92






More information about the Python-list mailing list