Skip to content

Commit 265c70d

Browse files
committed
Fix Version deprecation warning (python 3.10)
1 parent 4913143 commit 265c70d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tmuxp/plugin.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from distutils.version import LooseVersion
1+
from packaging.version import Version
22

33
import libtmux
44
from libtmux.common import get_version
@@ -84,7 +84,7 @@ def __init__(
8484
# Dependency versions
8585
self.tmux_version = get_version()
8686
self.libtmux_version = libtmux.__version__
87-
self.tmuxp_version = LooseVersion(__version__)
87+
self.tmuxp_version = Version(__version__)
8888

8989
self.version_constraints = {
9090
'tmux': {
@@ -135,9 +135,9 @@ def _pass_version_check(self, version, vmin, vmax, incompatible):
135135
"""
136136
Provide affirmative if version compatibility is correct.
137137
"""
138-
if vmin and version < LooseVersion(vmin):
138+
if vmin and version < Version(vmin):
139139
return False
140-
if vmax and version > LooseVersion(vmax):
140+
if vmax and version > Version(vmax):
141141
return False
142142
if version in incompatible:
143143
return False

0 commit comments

Comments
 (0)