Skip to content

Commit

Permalink
switch to packagin.version
Browse files Browse the repository at this point in the history
  • Loading branch information
SK1Y101 committed Aug 15, 2023
1 parent fd95219 commit d6604d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions maas/client/viscera/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

__all__ = ["Version"]

from distutils.version import StrictVersion
from packaging.version import Version as PackagingVersion

from . import Object, ObjectField, ObjectType


def parse_version(version):
return StrictVersion(version).version
return PackagingVersion(version).release


class VersionType(ObjectType):
Expand Down
2 changes: 1 addition & 1 deletion scripts/check-imports
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ python_standard_libs = [
'difflib',
'dircache',
'dis',
'distutils',
'dl',
'doctest',
'DocXMLRPCServer',
Expand Down Expand Up @@ -203,6 +202,7 @@ python_standard_libs = [
'optparse',
'os',
'ossaudiodev',
'packaging',
'parser',
'pathlib',
'pdb',
Expand Down

0 comments on commit d6604d5

Please sign in to comment.