[Python-Dev] Providing support files to assist 3.x extension authors
"Martin v. Löwis"
martin at v.loewis.de
Sun Dec 20 09:49:13 CET 2009
> Several questions come to mind:
>
> 1) Is it reasonable to provide backward compatibility files (either as
> .h or .c) to provide support to new API calls to extension authors?
I'm skeptical. In my experience, each extension has different needs, and
will also use different strategies to provide compatibility. So
publishing one way as the "official" approach might be difficult. In one
case, the proposed approach for compatibility actually led to incorrect
code (by ignoring exceptions when extracting a long), so we would need
to be fairly careful what compatibility layers we can bless as official.
> 2) If yes, should they be included with the Python source or
> distributed as a separate entity? (2to3 and/or 3to2 projects, a Wiki
> page)
In the way you propose it (i.e. as forward compatibility files) I fail
to see the point of including them with Python 2.7. Extension authors
likely want to support versions of Python before that, which now cannot
be changed. So those authors would still have to include the file
on their own.
So a file distributed in Include of 2.7 actually hurts, as it would
conflict with the copy included in packages.
> 3) If not, and extension authors can create their own compatibility
> files, are there any specific attribution or copyright messages that
> must be included?
If you write a compatibility file from scratch, without copying existing
code, you don't need to worry at all. If you do copy parts of Python,
you must follow the license, in particular clause 2.
Regards,
Martin
More information about the Python-Dev
mailing list