Bug 620211 - python-psyco needs porting to python 2.7 in F14 and devel
Summary: python-psyco needs porting to python 2.7 in F14 and devel
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: python-psyco
Version: 14
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Conrad Meyer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: Python27Rebuild
TreeView+ depends on / blocked
 
Reported: 2010-08-01 14:54 UTC by Thomas Spura
Modified: 2011-09-02 17:51 UTC (History)
9 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2011-09-02 17:51:05 UTC


Attachments (Terms of Use)
Patch that lets psyco build with Python 2.7 (1.68 KB, patch)
2010-08-05 15:27 UTC, Radek Novacek
no flags Details | Diff

Description Thomas Spura 2010-08-01 14:54:56 UTC
The package needs to be rebuilt against python 2.7 in both F14 and devel.

This is not an easy rebuild, because this requires porting to python 2.7 because of:
In file included from c/initialize.h:55:0,
                 from c/psyco.c:14:
c/mergepoints.c:242:3: error: 'JUMP_IF_FALSE' undeclared here (not in a function)
c/mergepoints.c:242:3: error: 'JUMP_IF_TRUE' undeclared here (not in a function)

Upstream already has a unfinished branch for this:
http://codespeak.net/svn/psyco/branch/py27/

Information on the new "dist-git" system can be seen here:
  http://fedoraproject.org/wiki/Using_Fedora_GIT

Information on common difficulties with Python 2.7 rebuilds can be seen here:
  https://fedoraproject.org/wiki/Features/Python_2.7

Once it's been successfully rebuilt for F14, an update needs to be filed to get the rebuild into F14:
  https://admin.fedoraproject.org/updates/new/

Please add this bug to the update, to make it easy to track what's been done, and what's left to do.

Thanks!

Comment 1 Thomas Spura 2010-08-01 14:56:35 UTC
CC'ing David Malcolm, because he works on python-peak-rules which is similar to this failure (see bug #620023)

Comment 2 Dave Malcolm 2010-08-01 20:52:17 UTC
(In reply to comment #0)
> This is not an easy rebuild, because this requires porting to python 2.7

Agreed; this one looks difficult, more difficult than python-peak-utils-assembler.

Does anything within the distribution depend on python-psycho?  i.e. how urgently do we need to port this?

Comment 3 Radek Novacek 2010-08-05 15:27:31 UTC
Created attachment 436883 [details]
Patch that lets psyco build with Python 2.7

It looks that some undocumented change happened in Python 2.7. Name of some #defines changed in the file opcode.h. At least two of them changed: 
JUMP_IF_TRUE -> JUMP_IF_TRUE_OR_POP
JUMP_IF_FALSE -> JUMP_IF_FALSE_OR_POP.

Both defines has same values with new version, so I think it only needs to be renamed in the source. So I create a patch that seems to make this package compile with Python 2.7, but then it fails with older Python versions.

Comment 4 Dave Malcolm 2010-08-05 15:45:38 UTC
(In reply to comment #3)
(snip)

> It looks that some undocumented change happened in Python 2.7. Name of some

These aren't undocumented, in that changes to bytecodes are alluded to in the release notes.  

See:
http://bugs.python.org/issue4715
and
http://svn.python.org/view/python/trunk/Doc/library/dis.rst?r1=70071&r2=70070&pathrev=70071

> #defines changed in the file opcode.h. At least two of them changed: 
> JUMP_IF_TRUE -> JUMP_IF_TRUE_OR_POP
> JUMP_IF_FALSE -> JUMP_IF_FALSE_OR_POP.
> 
> Both defines has same values with new version, so I think it only needs to be
> renamed in the source. So I create a patch that seems to make this package
> compile with Python 2.7, but then it fails with older Python versions.    

I don't think this will work as-is: they have different semantics.  

The Python 2.6 JUMP_IF_{TRUE|FALSE} peek the value at the top of the stack and conditionally branch based on it.

The Python 2.7 JUMP_IF_{TRUE|FALSE}_OR_POP peek the value at the top of the stack and then either branch or pop the value.

So the code needs to take into account the stack effects of these bytecodes.

See the svn link above.

Comment 5 Radek Novacek 2010-08-06 06:19:28 UTC
Oh, I haven't been enough thorough finding documentation of this change. The porting of this code will definitely need more python-core-hacking-fu than I have...

Comment 6 Adam Williamson 2010-08-06 17:45:46 UTC
So, from a blocker POV, this is a blocker because python-psyco winds up on the DVD compose. It does that because eclipse-pydev requires it for i686 only (psyco is 32-bit only). This is documented in the changelog:

Thu Dec 11 2008 Alexander Kurtakov <akurtako@redhat.com> 1:1.3.24-3 - Require python-psyco to speed up debuging.

it reads like it's not actually *required*, and eclipse will work without it, just it'll be slower to do python debugging. Given that, I think a reasonable solution for F14 Alpha is to drop the dependency from eclipse-pydev until psyco is ported.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 7 Adam Williamson 2010-08-06 18:32:35 UTC
I have pushed an eclipse-pydev update which disables the dependency on python-psyco for now; this doesn't fix psyco, obviously, but at least solves the dependency issues.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 8 James Laska 2010-08-09 20:28:29 UTC
Removing dependency on 620623.  That issue has been worked around temporarily by dropping the eclipse-pydev requirement on python-psyco

Comment 9 Conrad Meyer 2010-09-29 03:26:52 UTC
I've dropped python-psyco from rawhide for now. If someone wants to take this upstream and debug and test that's all well and good, but until then it doesn't work with the python we have in f-14.

Comment 10 Mads Kiilerich 2010-09-29 09:31:58 UTC
I understand that this is all we can do and that there is no good solution to this.

FWIW it has the consequence that a yum upgrade from f13 (with python-psyco) to f14 fails badly. I guess it should be mentioned in the release/update notes that it no longer works and that the package should be removed. Perhaps it would be better to orphan it properly so it (automatically, I assume) gets in the list of orphaned packages?

Alternatively, could we push a "I know I am broken" package without any dependencies to f14?

Comment 11 Toshio Ernie Kuratomi 2011-09-02 16:22:21 UTC
Conradm, since upstream for psyco isn't really alive (the project's leader and ideas have been migrated into pypy) and this is retired on F15/rawhide, do we want to close bug?

Comment 12 Conrad Meyer 2011-09-02 17:51:05 UTC
@Toshio, sounds good to me.


Note You need to log in before you can comment on or make changes to this bug.