[Python-Dev] PEP 291 versus Python 3

Michael Foord fuzzyman at voidspace.org.uk
Tue Nov 30 14:09:16 CET 2010


On 30/11/2010 06:33, Éric Araujo wrote:
> 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?

PEP 291 is very old and should probably be retired. I don't think anyone 
is maintaining standard libraries in py3k that are also compatible with 
Python 2.anything. (At least not in a single codebase.)

For Python 2.7 that may not be true, but for Python 3 I think we can 
start with a clean slate on compatibility.

> * 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.
They can be run on old Pythons with unittest2. This is what distutils2 
is doing.

>   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.

This is only an issue for distutils in Python 2.7 right? Maintaining the 
compat policy for that will be a short-lived pain, and distutils itself 
is getting only infrequent bugfixes *anyway*, right? I defer to Tarek on 
that particular decision.

All the best,

Michael
> 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
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk


-- 

http://www.voidspace.org.uk/

READ CAREFULLY. By accepting and reading this email you agree,
on behalf of your employer, to release me from all obligations
and waivers arising from any and all NON-NEGOTIATED agreements,
licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap,
confidentiality, non-disclosure, non-compete and acceptable use
policies (”BOGUS AGREEMENTS”) that I have entered into with your
employer, its partners, licensors, agents and assigns, in
perpetuity, without prejudice to my ongoing rights and privileges.
You further represent that you have the authority to release me
from any BOGUS AGREEMENTS on behalf of your employer.



More information about the Python-Dev mailing list