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

fix(linux): Replace deprecated pkg_resources module with packaging.version #10860

Merged
merged 4 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions linux/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Build-Depends:
python3-lxml,
python3-magic,
python3-numpy,
python3-packaging,
python3-pil,
python3-pip,
python3-qrcode,
Expand Down
4 changes: 2 additions & 2 deletions linux/keyman-config/keyman_config/install_kmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import json
import logging
import os
import packaging.version
import zipfile
from pkg_resources import parse_version
from enum import Enum
from shutil import rmtree

Expand Down Expand Up @@ -149,7 +149,7 @@ def _check_version(self, inputfile, system):
fileVersion = secure_lookup(system, 'fileVersion')
if not fileVersion:
fileVersion = '7.0'
if parse_version(fileVersion) > parse_version(__version__):
if packaging.version.parse(fileVersion) > packaging.version.parse(__version__):
logging.error("install_kmp.py: error: %s requires a newer version of Keyman (%s)",
inputfile, fileVersion)
rmtree(self.packageDir)
Expand Down
Loading