Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue7353] Why was Include/intobject.h removed in 3.1?

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

Nov 18, 2009, 1:05 PM

Post #1 of 4 (259 views)
Permalink
[issue7353] Why was Include/intobject.h removed in 3.1?

New submission from Dave Malcolm <dmalcolm [at] redhat>:

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 <report [at] bugs>
<http://bugs.python.org/issue7353>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Nov 18, 2009, 2:16 PM

Post #2 of 4 (255 views)
Permalink
[issue7353] Why was Include/intobject.h removed in 3.1? [In reply to]

Changes by Skip Montanaro <skip [at] pobox>:


----------
nosy: +skip.montanaro

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7353>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Nov 19, 2009, 6:07 AM

Post #3 of 4 (240 views)
Permalink
[issue7353] Why was Include/intobject.h removed in 3.1? [In reply to]

Mark Dickinson <dickinsm [at] gmail> added the comment:

> However, that header file was removed in this commit:
> http://svn.python.org/view?view=rev&revision=71697

Hmm. That was me.

> with this message:
> Issue #4910: PyNumber_Int is deprecated in 3.0.1; will be removed in
> 3.1.

That's the message for r69517, I think, which just added an entry to
Include/intobject.h. The message for r71697 was:

"The comments at the top of intobject.h say that it will be removed in
3.1. Make it so."

I'm not too sure of the history here, but I suspect that
Include/intobject.h was at least partly an aid to porting the Python
extension modules from 2.x to 3.0, rather than third-party modules.

Christian, Benjamin: any comments?

I'm -1 on resurrecting Include/intobject.h in its old location. I don't
much like the idea of having a random include file that's no longer used
by Python itself in the main Include directory; it'll likely succumb to
bitrot before long. But maybe there's a place for 2-to-3 porting aids
in the Tools directory, where there's less expectation that files are
well-maintained?

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

I can't see any problem with this.

I agree the porting documentation needs to be updated, whatever happens.

----------
assignee: -> georg.brandl
components: +Documentation
nosy: +benjamin.peterson, christian.heimes, georg.brandl, mark.dickinson

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7353>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Nov 19, 2009, 6:09 AM

Post #4 of 4 (241 views)
Permalink
[issue7353] Why was Include/intobject.h removed in 3.1? [In reply to]

Mark Dickinson <dickinsm [at] gmail> added the comment:

I didn't mean to assign this to Georg. Apologies.

----------
assignee: georg.brandl ->

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7353>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.