[Python-Dev] PEP 291 versus Python 3

Éric Araujo merwok at netwok.org
Tue Nov 30 07:33:51 CET 2010


Good morning python-dev,
PEP 291 (Backward Compatibility for Standard Library) does not seem to
take Python 3 into account. Is this PEP only relevant for the 2.7
branch?* If it’s supposed to apply to 3.x too, despite the view that
3.0 was a clean break, what does it mean to have a module that is
developed in the py3k branch and should retain compatibility with 2.3 or
1.5.2?
* Tarek’s interpretation: “The 2.x needs to stay 2.3 compatible
 so we should keep the 3.x as similar as possible for bugfixes.”
In the particular case of distutils (should be compatible with 2.3), we
(including I) have been lax. Our tests for example use modern unittest
features like skips, which makes them not runnable on old Pythons. I am
very uncomfortable with code that seems to run fine but which tests
(however few) cannot be run, so I think I’ll have to trade the skips for
old-style “return” statements. The other way of solving that is to
change the compat policy. If I remember correctly, the rationale for
code compat in distutils is that people may copy distutils from Python
x.y to their install of x.y-n; I don’t know if this is still an active
practice, and if it is, I don’t know if it should be supported,
considering that distutils2 (compatible with 2.4+ and available from
PyPI) is coming.
Regards


More information about the Python-Dev mailing list

AltStyle によって変換されたページ (->オリジナル) /