decompyle does not work for python 1.5-2.1 pyc's

Bug #330374 reported by issaqua
4
Affects Status Importance Assigned to Milestone
decompyle (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: decompyle

Description: Ubuntu 8.10
Release: 8.10

apt-cache policy decompyle
decompyle:
  Installed: 2.3.2-4.1
  Candidate: 2.3.2-4.1
  Version table:
 *** 2.3.2-4.1 0
        500 http://mirror.internode.on.net intrepid/universe Packages
        100 /var/lib/dpkg/status

When I try to run the decompyle on older code it errors out (tried it on version 1.5 and 2.1 pyc's)

I think /usr/share/pyshared/decompyle/Scanner.py should have the following code

        try: FOR_ITER = self.dis.opmap['FOR_ITER']
        except: FOR_ITER = None
        try: GET_ITER = self.dis.opmap['GET_ITER']
        except: GET_ITER = None
        try: FOR_LOOP = self.dis.opmap['FOR_LOOP'] # Added for older python versions.
        except: FOR_LOOP = None

and

            if ord(code[i]) in (FOR_ITER, GET_ITER, FOR_LOOP): # Added FOR_LOOP for older versions.

As the older versions of python seem to use FOR_LOOP instead of FOR_ITER or GET_ITER.

When I made these changes it could decompile the older version code - not sure if I broke anything else - I'm not a python guru by any means.

Revision history for this message
Savvas Radevic (medigeek) wrote :

Hi, decompyle has been removed from the repositories as it does not support python 2.5/2.6 decompilation, although it works python 2.6:
https://bugs.launchpad.net/ubuntu/+source/decompyle/+bug/336859

Try sending your patch upstream at debian, but be aware that there is also a request to be removed:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=517588

Changed in decompyle:
status: New → Incomplete
Revision history for this message
Savvas Radevic (medigeek) wrote :

> has been removed from the repositories
I mean from ubuntu jaunty 9.04 repositories

Revision history for this message
JC Hulce (soaringsky) wrote :

This software has been removed from the Ubuntu repositories, and is not supported.

Changed in decompyle (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.