Re: python 2.2 to python 2.3 transition
On Sun, 2003-08-10 at 17:55, Matthias Klose wrote:
> This seems to be a common misunderstanding. Therefore the CC to
> debian-python that I have something as a reference.
> > As far as I know, it already works with Python 2.3. And 2.2. And 2.1. I
> > like the fact that the same package works fine both on woody and in
> > unstable. :)
> No. The package ships compiled python modules. These are maybe
> compiled with 2.1 or 2.2. If a user other than root uses these
> modules, python2.3 detects them as invalid and compiles them on the
> fly each time the module is used.
> So you have to rebuild the .pyc files with python2.3, either by the
> postinst/prerm scripts (dh_python), or by shipping the .pyc files. The
> former one is the preferred way described in the python policy. See
Please don't ship with .pyc's ... it is unnecessary bloat to the
There are probably some packages that have "Depends: python" that work
with a whole variety of versions of python. Provided they compile their
modules with "/usr/bin/python" in their postinst, and remove the pyc's
and pyo's in their postrm, they should not need updating.
However, people who have these packages installed before the 2.2 -> 2.3
transition will have pyc's compiled for 2.2 when the default python is
2.3, unless the new python (2.3) package is going to do something about
it to re-compile them all.
Is there any magic planned :-)
Does anyone want me to contibute some code to try and do this? I think
the "python-central" stuff has most of the code to handle this, it just
needs a little bit of tweaking.
Donovan Baarda <firstname.lastname@example.org>