grumpyhome / grumpy

Grumpy is a Python to Go source code transcompiler and runtime.
Apache License 2.0
420 stars 18 forks source link

Python 3 support #135

Open alanjds opened 5 years ago

alanjds commented 5 years ago

As Python 2.7 EOL is due in less than 10 months, Grumpy needs to be ported from Python 2.7 to 3.X

History:

As far as I can say, Grumpy born on Youtube as a way to not translate a huge Python 2 codebase to Golang by hand.

However, the starting authors seems to have stopped pursuing this effort and had not contributed to Grumpy for some years.

In my experience on this project:

  1. is hard to get people interested in a transpiler targeting Python 2
  2. is even harder to get people willing to install Python 2 just to contribute to this project.
scottbecker commented 4 years ago

Could you provide an update on this effort?

ns-cweber commented 4 years ago

Is there a roadmap for this work? I'm interested in helping out here if it's a serious initiative. How can we get involved?

alanjds commented 4 years ago

Thanks @ns-cweber for the interest.

The head of the branch https://github.com/alanjds/grumpy/compare/master...grumpyhome:py37?expand=1 can run on a Python 3.7 host but cannot receive Py3+ code, only 2.7

To be honest with you (and the whole community), I am providing only code review and guidance from a while. Right now, I do not believe anymore on Golang being the future (or the present). This flushed my willingness to work on Grumpy features.

That said, the actual code state of Grumpy is kinda solid. Major drawtback being the Py2.7 target. The CI have a test for Python 3 albeit failing.

One big issue to have more contributors is exactly the lack of Python 3 support both host and target. I was trying to fix host support when lost faith in Golang.

This does not mean that you should not contribute or even build a community around this. Just that will not be a "just code it!" quest.

nagayev commented 3 years ago

@alanjds I've already started working on it.

jkugler commented 3 years ago

@alanjds

Right now, I do not believe anymore on Golang being the future (or the present). This flushed my willingness to work on Grumpy features.

Can you expound on that? Do you have a blog post somewhere (as to not pollute this ticket). :)

alanjds commented 3 years ago

Can you expound on that? Do you have a blog post somewhere (as to not pollute this ticket). :)

I really need to white such blog post :/, but there is already the "Go is Google's language, not ours" from Chris Siebenmann:

In general, it's extremely clear that the community's voice doesn't matter very much for Go's development, and those of us working with Go outside Google's walls just have to live with that. If we're very lucky, our priorities match up with Google's;

:point_up: Right now, Google's priorities are clearly far from my priorities. Or the whole Python community priorities imho, if I can stretch on this.

For example lets take Grumpy original code: after digging fixing and improving Grumpy, it is clearly made originally by and for Go lovers, not Python lovers (like me). And the original owners are not being helpful after abandoning the project. Are they mad of who sponsored the development? Or see it as a blunder? Or are not willing to code OSS? Am just speculating here, there is no way to know from their void.

Although possible, I do not see a Gopher coming here to help on the parts that we (I ?) Pythonista can take 10x more effort to develop or fix. There are good people everywhere for sure. Yet I could not find Gopher ones willing to push Grumpy to be "A Better CPython 3" instead of "A Bridge to Goland out of Python 2".

In meantime, I found Rust community waaay more aligned with my personal beliefs as how to govern a community & where and how a low-level language should run, then I shifted my limited effort into RustPython for now.

Again, not saying that y'all should abandon Golang and follow my bandwagon. Just that for me is time to thank what Grumpy and the last "founder" developer gave me, and move on.

jkugler commented 3 years ago

@alanjds Thank you for taking time to respond! That all makes a lot of sense.