-
AuthorPosts
-
Seigfriedm93
Participant2025-03-29 at 15:49Post count: 3Habe jetzt herausgefunden, dass traceroute auf einen externen Server nicht funktioniert. Ist das so gewollt?
Roeller
Keymaster2025-05-27 at 18:33Post count: 53Since the Homeserver is still running Python 2.7, I think we should take the lead here and help (Gira) to move on to Python 3.x. (Yes,. you read it well.. :) )
The problem with the Homeserver is that it’s running Python 2.7 (which is 15 years old) and Python 3.x came already around 2008 (17 years ago). Just replacing Python 2.7 by Python 3.x is impossible. All logic, building blocks,..etc. needs to be rewritten. You would need to re-import all those logic in your project… it would be a disaster.
But what about having Python 3.x besided Python 2.7?
Having it statically compilled (or ar least available) on the system and developers can call it explicitly from their Logic/Baustein. E.g.import base64, subprocess code = base64.b64decode('<my_python3 code>') p = subprocess.Popen(['/flash/python3/bin/python3','-'], stdin=subprocess.PIPE) p.communicate(code)
And hopefully, Gira will adapt this change and will make it even easier for developers then they just have to write something like #python3 on top of their scripts.
The advantage of Python itself is that you can have multiple versions running next to each other, however, Python 2.7 is tightly integrated in the hs_main.
Since Sinnr is having a VM (built on Debian Bullseye (11) ?). It would be possible to have Python 3.x in this one (and also have the Python 2.7 in it). Then we can focus on how to call this from our Logic Nodes/Baustein.
When GIRA will see it can be done.. I hope they will incorporate such a change. The same as they did with a Homeserver VM for testing/developing.Imagine what can all be done with Python 3.x ! Almost all Home Assistant Plugins and other Github repositories can easily be ported to the Homeserver 4.
Are you willing to (try) to incorporate Python 3.x in the VM ? And be a world changer;)
-
This reply was modified 2 weeks, 4 days ago by
Roeller.
Roeller
Keymaster2025-06-05 at 11:05Post count: 53According to latest ‘rumours’, Python 3.x will be in Homeserver 4.13, while all existing (Python 2.x blocks will still run). So no need for this fix/idea.
Now, let’s wait for 4.13 :)
-
This reply was modified 2 weeks, 4 days ago by
-
AuthorPosts
- You must be logged in to reply to this topic.