Skip to content

Commit

Permalink
Use packaging in Git.version_suitable.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Oct 3, 2021
1 parent 4307e07 commit 3860208
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hgtools/managers/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import itertools
import collections

import pkg_resources
import packaging


TaggedRevision = collections.namedtuple('TaggedRevision', 'tag revision')
Expand Down Expand Up @@ -152,8 +152,8 @@ def is_valid(self):
return super(Git, self).is_valid() and self.version_suitable()

def version_suitable(self):
req_ver = pkg_resources.parse_version('1.7.10')
act_ver = pkg_resources.parse_version(self.version())
req_ver = packaging.version.Version('1.7.10')
act_ver = packaging.version.Version(self.version())
return act_ver >= req_ver

def find_root(self):
Expand Down

0 comments on commit 3860208

Please sign in to comment.