Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
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
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def read(filename):
"colorclass >= 1.2.0",
"macaroonbakery >= 1.1.3",
"oauthlib >= 1.0.3",
"packaging >= 21.3",
"pymongo >= 3.5.1", # for bson
"pytz >= 2014.10",
"PyYAML >= 3.11",
Expand Down