Re: Python and greenlets

  • From: Antti Kantee <pooka@xxxxxx>
  • To: rumpkernel-users@xxxxxxxxxxxxx
  • Date: Wed, 7 Sep 2016 12:29:17 +0000

On 05/09/16 19:53, Ryan Day wrote:

I wanted to continue a discussion I was having with Tim Beyer on the users
list just in case anyone else is interested in Python progress:

I hope that *the* users list is not this users list, or I'm missing mails ...

Greenlets is a Python package that allows concurrent programming in a
manner similar to co-routines: https://greenlet.readthedocs.io/en/latest/

Sounds cool, and thanks for remembering to include a one-line summary, very helpful!

Greenlets is an interesting case study for the Rumpkernel
Python3 package because greenlets requires a C python module to be built
(and available statically). This means you must know that you want to use
greenlets when you first build the Python3 package. It can't be simply
"import"ed later on.

Not everyone wants to have greenlets in their Python build. So adding it to
the official Python3 package isn't necessarily correct. This leaves us with
a need to figure out how to have a modular Python3 package, or some
standard way of including C python packages a la carte.

Why does not everyone want it? Does it cause incorrect operation, or just unwieldly amounts of bloat? I can understand someone not wanting it, but they're probably not happy with the other hardcoded things either.

If there's no big problem with always including it, I'd just always include it. If there is some sort of "people might often want to configure this", I'd just add a variable to rumprun-packages/Makefile.inc, default on.

Once the build is complete, greenlets is available as a builtin. The
example in examples/ almost works. I think the final "78" line is not being
printed even though it should be. This brings us to the discussion part,
and why I moved to the list :)

Is "discussion" some sort of euphemism for "invitation to debug" ?-)

thanks

Other related posts: