info-beamer

Upgrade to python3

I ran into the need for some libraries only available for python3. It would also be nice to define some pip packages in the package.json, that the system automatically installs. Another thing would be cython support, because many libraries use it. I want to use multithreading/asyncio, but python2.7 is not very userfriendly in this area.

Do you have this on your roadmap?

Eventually, but I don’t consider that urgent at the moment as I feel there’s little to gain for a massive amount of work. For concurrent execution without threads you can use gevent. Multithreading itself should be mostly identical across versions (AFAIK) and the core python process relies heavily on it.

Explicit pip support won’t get added. The reason is that installation of a package should result in a defined state. pip would introduce an external (network) dependencies and the state you end up on a device suddenly depends on an outside source. Additionally there’s then no way for the system to verify the integrity of the local installation. Compared to the way it works right now: Every file within /space/root can and is verified and repaired automatically should there be anything wrong due to power loss or other issues. That’s an important property if you want a reliable and reproduceable system.

There’s an undocumented (I’ll change that) but fully supported feature that can help you with your request though: If you include a file named overlay.squashfs (a squashfs filesystem) within your package, it will be mounted as an overlay on top of the normal operating system files when running your package service. If you create a self-contained Python3 installation with all required dependencies within overlay.squashfs, you can use Python3 within your package service. For debugging in case of an error, you can enter your service’s environment by running /service/service.root/run shell. You’ll end up in a shell with the normal package sandboxing and the overlay active and you can run ./service manually.

Thanks for the detailed answer. I will look at the gevent API first. The squashfs feature sounds really interesting and I see that this can fullfill pretty much every need for extending the environment.

info-beamer - Digital Signage for the Raspberry Pi community forum - Imprint