py3k concerns. An example

"Martin v. Löwis" martin at v.loewis.de
Fri Apr 25 09:24:09 CEST 2008


> In my view using a conversion tool on an ongoing basis is
> not an option.  It just adds a dependancy.  What happens when
> the conversion tool is upgraded in a non-backwards-compatible
> way?  Or do we have assurance that it won't be ;)?

The latter: if you include a copy of the converter with your
package, it won't change unless you change it. If you rely
on the copy of the converter that ships with Python 3.0, you
have the assurance that it won't change in a
non-backwards-compatible manner in all of 3.0.y.

Of course, the copies include in later 3.x releases may change, but
you'll have to test for the later 3.x releases, anyway, as
they may show incompatible changes themselves.

> Will changes to the converter
> mean that the users of my
> converted libraries have to start
> using my tools in a different way?

No. If the 2to3 converter is changed to support additional
source patterns to convert, it either won't affect your
code (if you don't use the pattern), or it may convert some
of your code that it didn't previously - then that conversion
may or may not be correct. So as a consequence, your library
may stop working; then you'll have to adjust either your
library, or go back to an older version of the converter.

In no case, however, will the users of the library need to
adjust their code to changing 2to3 output. 2to3 won't change
the library API.

> I have no interest in adding additional dependancies,
> with an additional degree of freedom to break.

Then remove the freedom by fixing a specific 2to3 version
(e.g. by including it).

> So if I want to support both I have to do everything
> twice in the expected case and in the best case test
> everything twice, at the same time, if I want to
> support both versions and keep features in sync.

This I don't understand. Why do you think you have to
do everything twice?

> I still think it's a shame
[...]
> pps: I have to note that it would be nice if the
>   ad-hominem (sp?) invective would drop out of
>   these threads -- it doesn't add a lot, I think.

shame
1 a. a painful emotion caused by consciousness of guilt,
     shortcoming, or impropriety
2 a condition of humiliating disgrace or disrepute

So who do you think should feel guilt? Or should
be disgraced or disreputed?

Regards,
Martin



More information about the Python-list mailing list