Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add python3.9 and above to uncompyle6 #331

Open
GUANCAIBAN opened this issue Oct 10, 2020 · 21 comments
Open

Please add python3.9 and above to uncompyle6 #331

GUANCAIBAN opened this issue Oct 10, 2020 · 21 comments
Labels
Python 3.9+ Python 3.9, 3.10, 3.11, 3.12, 3.13 Volunteer wanted Volunteer wanted to fix if a bug or to implement if a new feature.

Comments

@GUANCAIBAN
Copy link

GUANCAIBAN commented Oct 10, 2020

Note by maintainer: [I removed the unfilled template which was appearing here. That contained instructions as comments that were supposed to be filled out. Pro tip: if you are seeking help, it is either a good idea to follow instructions or explain why you are not. If you just didn't notice, were too lazy to do, or don't really care, that too does encourage response or assistance.]

@rocky rocky added the Volunteer wanted Volunteer wanted to fix if a bug or to implement if a new feature. label Oct 10, 2020
@rocky
Copy link
Owner

rocky commented Oct 10, 2020

Not something I am interested in for a while. There is decompyle3 and even there 3.9 will be a bit be the weakest.

A reworking on how control flow is handled has long been overdue. 3.9 was my thought on where to draw the line for this.

@GUANCAIBAN
Copy link
Author

GUANCAIBAN commented Oct 10, 2020 via email

jonringer added a commit to NixOS/nixpkgs that referenced this issue Nov 29, 2020
FRidh pushed a commit to NixOS/nixpkgs that referenced this issue Dec 1, 2020
@Gowixx
Copy link

Gowixx commented Mar 9, 2021

I beg a volunteer lol, I really need a 3.9 decompiler

@rocky
Copy link
Owner

rocky commented Mar 9, 2021

Does begging imply that you'd pay money for this? (The conventional definition of beg though is not.)

@Gowixx
Copy link

Gowixx commented Mar 9, 2021

I could pay for it depending on how long it takes.

@rocky
Copy link
Owner

rocky commented Mar 10, 2021

Right now I have a full-time job which keeps me very busy.

I'd have to do this on the weekends. Getting a rudimentary 3.9 that works almost as well as 3.8 might be 3 or 4 weekends and would be in the decompyle3 project.

To do a proper job would require a reworking of control flow using https://github.com/rocky/python-control-flow . If that were that done, we'd see a general improvement, and probably would be able to handle future Python bytecode and also use this approach in other decompilers. But even after I start, it will to take a long time.

So, what I propose for now is support me in this project for whatever amount seems right to you. When there are enough people interested and about is collected1, I'll spend the time to do it.

See also that link for how to lower the barrier fee listed above.

Footnotes

  1. over time the dollar amount may go up, especially at times when I get duplicate requests of this issue such as in https://github.com/rocky/python-uncompyle6/issues/347. Even as the figure stands now, it is a bit low for the amount of effort to do a decent job. See the bottom of https://github.com/rocky/python-decompile3/issues/45 where the tally stands.

@rocky rocky changed the title please add python3.9 to umcompyle6 please add python3.9 to uncompyle6 Mar 14, 2021
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this issue May 3, 2021
@rocky rocky mentioned this issue Jun 21, 2021
@paowongsakorn
Copy link

i just sponsor you please give me solution pyc to py 3.9 thanks.

@rocky
Copy link
Owner

rocky commented Jul 19, 2021

Thanks!

Right now though, I am not seeing you listed. I see 3 other people, and my thanks to them as well!

As stated in above, when about $5K1 accumulates, I will start working on it or make what is experimental more publically available. At the current level of subscription that would be in about 4 years if monthly subscribers hold out for that long.

I looked at 3.10 and that's doable, but it looks like the simplest and logical thing to do is first do 3.9 and then 3.10. Since 3.10 and 3.11 is additional work that means $5K for each version.

Footnotes

  1. The exact amount will be listed at the end of https://github.com/rocky/python-decompile3/issues/45

@paowongsakorn
Copy link

i sponsor as private, now accumulate how much?

@rocky
Copy link
Owner

rocky commented Jul 20, 2021

i sponsor as private, now accumulate how much?

There have been no private sponsors joined within in the last 3 months. And by the way, one of them is for a project that is totally unrelated to this.

I am guessing that it may take a while for the transaction to kick in. When it does though, I'll let everyone know.

@rocky rocky changed the title please add python3.9 to uncompyle6 Please add python3.9 and above to uncompyle6 Dec 14, 2021
@rocky rocky added the Python 3.9+ Python 3.9, 3.10, 3.11, 3.12, 3.13 label Feb 6, 2022
@rocky
Copy link
Owner

rocky commented Feb 14, 2022

I could pay for it depending on how long it takes.

How long it takes depends on how many people are interested in paying and to what level :-)

@jhhcs
Copy link

jhhcs commented Mar 5, 2022

Is there some place where the community can see the amount of money that is currently being generated through sponsors for this?

@rocky
Copy link
Owner

rocky commented Mar 5, 2022

Not that I am aware of and it fluctuates. Right now it is at $40 a month and it has been about that for a while.

Let's see, at about $60/hr that would be 40 minutes a month. $60/hr is much less than what I get paid at work.

Also, I don't really have a handle on what sponsors are interested in. Some have only starred projects that are not any decompiler.

If someone knows of a setting or way to have answer this happen automatically, let me know.

This seems more of a question though for github since I am using their mechanism.

@Zunea
Copy link

Zunea commented Aug 23, 2022

Hi! ! I can pay 200$ in advance, how can I pay

@rocky
Copy link
Owner

rocky commented Aug 23, 2022

Hi! ! I can pay 200$ in advance, how can I pay

Follow instructions in https://docs.github.com/en/sponsors/sponsoring-open-source-contributors/sponsoring-an-open-source-contributor

@Zunea
Copy link

Zunea commented Aug 23, 2022

sry, sponsorship can only be selected up to 120$

@rocky
Copy link
Owner

rocky commented Aug 23, 2022

No problem and thanks! I'll wait a month and you can reduce the next month to $80.

@FantasqueX
Copy link

Hi! First of all, I really value work you have done. it's exciting to know a decompiler which supports print(*[1, 2]). As I have some decompile experience on ELF, maybe I can help with coding. I wonder if there are some TODO before supporting 3.9. Maybe the first step is to finish uncompyle6.scanners.scanner39.py?

@rocky
Copy link
Owner

rocky commented Aug 26, 2022

Hi - for 3.9 and above, the code will be based more along the lines of the code in https://github.com/rocky/python-decompile3 not here. That code uses more modern Python and has been reorganized a little bit as well. #307 asks for someone to make the two code bases more alike. This would be a good place to start understanding the kinds of things that happen when a new Python version is added.

Also, as I recall the little change that you did here needs to also be applied there. So that's another small step thing to do.

And the weakest areas is in control flow, so that needs better technology. For that I started https://github.com/rocky/python-control-flow. I'll suggest the next step there though after I see more work in either of these two simpler areas.

Maybe the first step is to finish uncompyle6.scanners.scanner39.py?

Not really, I think I have versions of this stuff around somewhere for 3.9 and 3.10. This kind of thing is pretty trivial. I don't need and am not interested in the trivial stuff, If you are interested in working on a superficial decompiler that purports to work for a later version of Python see pycdc or unpy7-3.20.

@FantasqueX
Copy link

Hi - for 3.9 and above, the code will be based more along the lines of the code in https://github.com/rocky/python-decompile3 not here. That code uses more modern Python and has been reorganized a little bit as well. #307 asks for someone to make the two code bases more alike. This would be a good place to start understanding the kinds of things that happen when a new Python version is added.

Also, as I recall the little change that you did here needs to also be applied there. So that's another small step thing to do.

And the weakest areas is in control flow, so that needs better technology. For that I started https://github.com/rocky/python-control-flow. I'll suggest the next step there though after I see more work in either of these two simpler areas.

Thanks for your reply. I'll take a look at those places you mentioned.

Not really, I think I have versions of this stuff around somewhere for 3.9 and 3.10. This kind of thing is pretty trivial. I don't need and am not interested in the trivial stuff, If you are interested in working on a superficial decompiler that purports to work for a later version of Python see pycdc or unpy7-3.20.

That question is just naive. I quickly looked through the code and made some small modifications to bypass version checks. I have taken a look at pycdc code, want to add support of LIST_TO_TUPLE. Finally, I realize the real problem is that pycdc doesn't support CALL_FUNCTION_EX. So, I think porting uncompycle6 to python3.9 may be easier. As you said, porting uncompyle6 to more recent version of Python is trivial work, I'll try to do it. Maybe I need some review suggestions. Not moving forward is not a good thing.

@Zunea
Copy link

Zunea commented Sep 28, 2022

Hi rocky. I have currently sponsored 240$, I very much hope to decompile python3.9, I hope to communicate with you further, I can pay the fee separately

@rocky
Copy link
Owner

rocky commented Sep 29, 2022

Hi Zunea - thanks for the sponsorship! During the week, things are busy for me.

This weekend though, I will write up thoughts about rolling in python 3.9.

For the record, $120 has been received and Oct 22 is when the next $120 (for a total of $240) will arrive.

@rocky
Copy link
Owner

rocky commented Oct 2, 2022

@Zunea #412 contains the writeup I said I'd do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Python 3.9+ Python 3.9, 3.10, 3.11, 3.12, 3.13 Volunteer wanted Volunteer wanted to fix if a bug or to implement if a new feature.
Projects
None yet
Development

No branches or pull requests

7 participants