Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addon fails with Python 3.12 due to the use of the removed distutils package #98

Closed
Chroxvi opened this issue Aug 12, 2024 · 4 comments
Closed

Comments

@Chroxvi
Copy link

Chroxvi commented Aug 12, 2024

The Python distutils package is used in this addon:

from distutils.version import StrictVersion

Unfortunately, the distutils package has been deprecated in Python 3.10 and removed in Python 3.12 making this addon fail when used with Python >=3.12.

A workaround is to install setuptools >= 60.0.0 which includes a copy of distutils. However, the use of distutils from setuptools is discouraged in favor of transitioning to more modern alternatives. Specifically, for the distutils.version, it is recommended to transition to packaging.version.

I am not familar enough with the Kodi addon system to know if it is easy to include packaging as a third party dependency in the addon or if it is easier to replace the use of distutils.version.StrictVersion in this addon with some custom code.

@TermeHansen
Copy link
Member

Thks @Chroxvi I'll look into a better solution for this one of the coming days...

@TermeHansen
Copy link
Member

#99 solves the issue, my kodi 21.1 is still on 3.11, can you confirm this solves your issue @Chroxvi ?

@Chroxvi
Copy link
Author

Chroxvi commented Aug 21, 2024

Yes, I can confirm that the "remove_strictversion" branch (67808fc) works on my box with Python 3.12.4 and setuptools uninstalled.

Thanks for resolving this issue!

@TermeHansen
Copy link
Member

thks @Chroxvi it is being released now

xbmc/repo-plugins#4559

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants