IsAlive vs is_alive
#1
I was wondering if anyone can anyone offer a general solution for the change in python in threads.py to use is_alive() instead of IsAlive()  Earlier it was reported here as a Plex issue https://forum.kodi.tv/showthread.php?tid...pid3083720 but Kodi Nexus builds now use python 3.9 too.

Currently I am using

if sys.version_info.major >= 3 and sys.version_info.minor >= 9:
...

but maybe there is a better way.

Martin
Reply
#2
Not every platform (esp. Linux) features a built-in Python environment. Such platforms might ship 3.6 in the worst case, but >=3.8 is usually the norm. Some might even ship 3.10. It is up to the add-on devs to produce code covering them all.

I think your solution is unavoidable.
Reply
#3
Ok thanks, I know it doesn't properly deal with python 4 (which I figure will have bigger issues) but it least deals with 2 & 3 so I can have some common code for Leia.

Martin
Reply
#4
FYI is_alive() was added to python in v.3.5 and isAlive() was removed from v.3.9+
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#5
Ok thanks I'm wondering now it looks like is_alive() might even go back further to v2.6 so maybe I don't have to worry about IsAlive at all.

Martin
Reply

Logout Mark Read Team Forum Stats Members Help
IsAlive vs is_alive0