Python 2.7 support ended 01-01-2020

Python and python framework

Moderator: leecollings

Post Reply
User avatar
McMelloW
Posts: 434
Joined: Monday 20 November 2017 17:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.1
Location: Harderwijk, NL
Contact:

Python 2.7 support ended 01-01-2020

Post by McMelloW »

Python 2.7 support ended 01-01-2020

See this link https://www.python.org/doc/sunset-python-2/

What does this mean for the use of domoticz? Do I have to upgrade to Python 3.x?
Greetings McMelloW
User avatar
FireWizard
Posts: 1975
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Python 2.7 support ended 01-01-2020

Post by FireWizard »

Hello McMelloW,

I think you have already upgraded to version 3.7.3., as you had a post last week with a question regarding buster and version 4.11696. But see: Setup > About.

Regards
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Python 2.7 support ended 01-01-2020

Post by waaren »

McMelloW wrote: Sunday 23 February 2020 21:31 [Python 2.7 support ended 01-01-2020
What does this mean for the use of domoticz? Do I have to upgrade to Python 3.x?
The domoticz application by itself does not have a dependency on an installed python. The python libraries it require are linked static at build time.
When you are using plugins the story changes but most linux distributions come with both Python versions anyway.
Just type python2 and python3 from your command line and you will probably see something like

Code: Select all

#python2
Python 2.7.16 (default, Oct 10 2019, 22:02:15)
[GCC 8.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

#python3
Python 3.7.3 (default, Dec 20 2019, 18:57:59)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
McMelloW
Posts: 434
Joined: Monday 20 November 2017 17:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.1
Location: Harderwijk, NL
Contact:

Re: Python 2.7 support ended 01-01-2020

Post by McMelloW »

waaren wrote: Sunday 23 February 2020 22:35 The domoticz application by itself does not have a dependency on an installed python. The python libraries it require are linked static at build time.
When you are using plugins the story changes but most linux distributions come with both Python versions anyway.
Just type python2 and python3 from your command line and you will probably see something like

Code: Select all

#python2
Python 2.7.16 (default, Oct 10 2019, 22:02:15)
[GCC 8.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

#python3
Python 3.7.3 (default, Dec 20 2019, 18:57:59)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
Thanks waaren, I have exact the same output. I understand, nothing to worry about and nothing to do?
Greetings McMelloW
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Python 2.7 support ended 01-01-2020

Post by waaren »

McMelloW wrote: Sunday 23 February 2020 23:06 Thanks waaren, I have exact the same output. I understand, nothing to worry about and nothing to do?
From pure domoticz point of view. Yes; nothing to worry about and nothing to do.

If you use python scripts or applications that do stil use Python 2.7, I would start planning the migration of those. They will continue to run for the foreseeable future but as stated. No patches will be created to solve issues after april/may 2020. Not even security related ones.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
McMelloW
Posts: 434
Joined: Monday 20 November 2017 17:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.1
Location: Harderwijk, NL
Contact:

Re: Python 2.7 support ended 01-01-2020

Post by McMelloW »

waaren wrote: Monday 24 February 2020 0:28 From pure domoticz point of view. Yes; nothing to worry about and nothing to do.

If you use python scripts or applications that do stil use Python 2.7, I would start planning the migration of those. They will continue to run for the foreseeable future but as stated. No patches will be created to solve issues after april/may 2020. Not even security related ones.
Just for my understanding. This is the text in Domoticz About

Code: Select all

Version: 4.11724
Build Hash: 867979abf
Compile Date: 2020-02-23 11:10:00
dzVents Version: 3.0.0
Python Version: 3.7.3 (default, Dec 20 2019, 18:57:59) [GCC 8.3.0]
Does this mean every python program triggered by Domoticz runs with Python 3.7?
Greetings McMelloW
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Python 2.7 support ended 01-01-2020

Post by waaren »

McMelloW wrote: Monday 24 February 2020 15:22

Code: Select all

Python Version: 3.7.3 (default, Dec 20 2019, 18:57:59) [GCC 8.3.0]
Does this mean every python program triggered by Domoticz runs with Python 3.7?
No it means that the domoticz binary is compiled with GCC 8.3.0 and linked with Python 3.7.3 libraries.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Post Reply