This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dmalcolm
Recipients dmalcolm
Date 2009-11-18.21:05:39
SpamBayes Score 7.1564976e-13
Marked as misclassified No
Message-id <1258578341.2.0.19051074218.issue7353@psf.upfronthosting.co.za>
In-reply-to
Content
I'm attempting to package Python 3 for a Linux distribution, together with a stack of python extension 
modules; I'm currently using Python-3.1.1.   (see https://fedoraproject.org/wiki/Features/Python3F13 )

Many of these extension modules are close to compiling under both python 2 and python 3.

The page "http://wiki.python.org/moin/PortingExtensionModulesToPy3k" refers to using the macros in 
intobject.h, so that all PyInt_* calls in the python 3 build are aliased to PyLong_ API hooks.

Similarly, the page: http://docs.python.org/howto/cporting.html recommends using this file.

However, that header file was removed in this commit:
  http://svn.python.org/view?view=rev&revision=71697
with this message:
  Issue #4910:  PyNumber_Int is deprecated in 3.0.1; will be removed in 3.1.
(which links to this issue: http://bugs.python.org/issue4910 ; that issue refers to removal of the 
nb_long slot).

This seems to make it harder to port modules.

Is is acceptable if I ship that header file in my distribution packages of python-3.1.1 ?  (possibly 
with a reworded deprecation warning?)

Alternatively, is the fix to migrate all usage of the PyInt_ API to the PyLong_ equivalents ?  That 
would cause a change of behavior for the python 2 builds, assuming a shared source tree.

(I'd much prefer to ship the latest in the py3k branch than to stay with 3.0.1 for this)


In any case, it seems like the porting documentation isn't in sync with the code.

Hope this is helpful.
History
Date User Action Args
2009-11-18 21:05:41dmalcolmsetrecipients: + dmalcolm
2009-11-18 21:05:41dmalcolmsetmessageid: <1258578341.2.0.19051074218.issue7353@psf.upfronthosting.co.za>
2009-11-18 21:05:40dmalcolmlinkissue7353 messages
2009-11-18 21:05:39dmalcolmcreate