rocky / rocky/python-decompile3

Python 3.9 .. 3.12...

Open
#45 22 comments 45 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Python 3.9+ volunteer wanted to fix
Dominant language
Python
Stars
1.3k
Forks
167
PR merge metrics
No merged PRs in 30d

Description

3.9 and 3.10, 3.11, 3.12 are out; 3.13 will be out at some point.

Personally, if I get interested in this it would be using a new project that does redoes control flow analysis in a more basic and reliable way. This would require a more full-time dedication to this effort rather than as a unpaid hobby as all of my work has been so far. If I see more than $2K $5K[^1] in sponsorship (see https://github.com/rocky/python-uncompyle6/issues/331 for the exact details), I'll start working on this in another project. $5K while it may seem large, is less than 3% of my paid job per year, and it is less than $2.00 per uncompyle6 "like".

[^1]: This changes for each duplicate issue by $25, so see the bottom of the thread for the exact amount.

That said, this issue is in case someone else wants to adapt this code for 3.9 .. 3.12.

Sadly, for me and these projects, open-source and free software seems to have become others expressing what they want, but not contributing to, other than describing what they want, possibly with pleas and urgency.

Edit in 2022: Happy New Year.

The base prices has gone up to reflect the amount of work needed and lack of serious public involvement by anyone in any of the projects other than myself. Don't get me wrong - I don't mind working on this on my own and at my own whim. It is just that if I set a figure on committing to get this done by me, it needs to be more commensurate with that amount time and effort I'd need to spend.

The good news is that it does look like an evolution of these projects along the way described will work. I haven't looked at Python 3.9 in detail from the side of decompilation, but I have for 3.10. As best as I can tell its code generation has gotten better. It now seems to move/hoist code and can leaving dead code. Nothing insurmountable, just more work.

It also looks like the simplest update path is to first to revise 3.8 which I have started and that is going well. Then 3.9, then 3.10, and so on. Since for me this is all additional work per version that $5K is for 3.9, and then something like the same for 3.10, and the same for 3.11. (I realize this is may all be kind of moot since it's likely there will be no takers for any of this. But I do need to cover myself in the unlikely event that there is someone interested.)

The other good news is that public facing code and docs will be getting better over time in case others would like to do this publically.

Valentine's Day 2022 Edit:

As I've said, one thing that has been demoralizing has been the ratio of beggars[^1] verus providers of help. So for every issue raised here with a "volunteer wanted to fix" tag and a different person helping and solving the other person's problem, I'll lower the barrier for me to start providing 3.9 or 3.10 decomplation by $50 per solved problem.

Late 2023 Edit:

While I now have, some Python 3.8 .. 3.10 bytecode decompiling for code fragments like comprehensions, lambdas, and simple statements, work still progresses a bit slowly. Public funding has virtually dropped off and never was that significant. This code will probably stay private for a while longer. If you need something urgently and are willing to pay a significant amount for hand decompilation (on the order of $500-1K), you can contact me.

[^1]: A beggar is someone who posts first with a problem without making an effort to solve their problem or read instructions beforehand, if ever. As with many beggars you might get a hard luck story about how programming is so difficult, or that begging is okay because, hey, they are a newcomer and that that they might help if only someone would teach them how to program or read instructions, inform them about what can be google'd or is already known or spoon feed them what's been described already. Occasionally, you'll get the attitude that just the act of communicating the beggar's desire it is such a great service to everyone that this should be sufficient public service, and that the beggar's time is so valuable that it is not worth their time and effort to do more in the way of helping.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing Python 3.7–3.8 decompilation support in this repository and compare it with Python 3.9–3.12 bytecode behavior. The issue does not name files or tests, so locating version-specific handling and defining coverage for each target version will require substantial project research. Done means the decompiler reliably handles the agreed Python versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
compilers, reverse-engineering
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.