jellyfin / jellyfin-kodi

Jellyfin Plugin for Kodi
https://jellyfin.org
GNU General Public License v3.0
785 stars 105 forks source link

[PEP 632] Update utils.py to use 'packaging' instead of deprecated 'distutils' #864

Closed leonsbane closed 3 weeks ago

leonsbane commented 1 month ago

PEP 632 deprecates the distutils module.

The module was marked as deprecated in Python 3.10 and 3.11, and was eventually removed in Python 3.12.

The PEP advises to replace the usage of distutils.version with packaging.version, the LooseVersion functionality being provided via its parse method.

This replacement advice is detailed in the PEP under 'Migration Advice'

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

oddstr13 commented 1 month ago

This is dead code, only other mention of compare_version is it getting imported in the __init__.py file for re-export.

Please delete the function and the relevant imports instead :smiley:

(amend and force-push your commit, or create a new PR if that is easier for you)