mirror of
https://github.com/keymanapp/keyman.git
synced 2026-10-28 00:37:53 +00:00
chore(linux): replace deprecated parse_version 🍒
`pkg_resources` which contains `parse_version` is deprecated. Latest versions output a warning. This change uses the suggested replacement, `package.version.parse` which is available in all supported Ubuntu versions. Cherry-pick: #14973 Fixes: #14957 Bug-Debian: https://bugs.debian.org/1149425 Test-bot: skip
This commit is contained in:
parent
abd92ce45b
commit
f5eaffb86b
1 changed files with 2 additions and 2 deletions
|
|
@ -12,7 +12,7 @@ import gi
|
|||
|
||||
gi.require_version('IBus', '1.0')
|
||||
from gi.repository import IBus
|
||||
from pkg_resources import parse_version
|
||||
from packaging import version
|
||||
|
||||
from keyman_config.gnome_keyboards_util import is_gnome_desktop
|
||||
from keyman_config.gsettings import GSettings
|
||||
|
|
@ -156,7 +156,7 @@ def _get_ibus_version():
|
|||
|
||||
def _start_ibus_daemon(realuser):
|
||||
try:
|
||||
if parse_version(_get_ibus_version()) >= parse_version('1.5.28'):
|
||||
if version.parse(_get_ibus_version()) >= version.parse('1.5.28'):
|
||||
# IBus ~1.5.28 added the `start` command, so we use that if possible
|
||||
# and let IBus deal with the necessary parameters
|
||||
args = ['ibus', 'start', '-d']
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue