New submission from Dave Malcolm <dmalc...@redhat.com>: 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. ---------- components: Interpreter Core messages: 95455 nosy: dmalcolm severity: normal status: open title: Why was Include/intobject.h removed in 3.1? versions: Python 3.1 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7353> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com