Skip to content

Commit 1ff28d5

Browse files
authored
switch to packaging.version (#290)
* switch to packagin.version * add packaging to setuptools * update version
1 parent fd95219 commit 1ff28d5

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

maas/client/viscera/version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
__all__ = ["Version"]
44

5-
from distutils.version import StrictVersion
5+
from packaging.version import Version as PackagingVersion
66

77
from . import Object, ObjectField, ObjectType
88

99

1010
def parse_version(version):
11-
return StrictVersion(version).version
11+
return PackagingVersion(version).release
1212

1313

1414
class VersionType(ObjectType):

scripts/check-imports

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ python_standard_libs = [
9696
'difflib',
9797
'dircache',
9898
'dis',
99-
'distutils',
10099
'dl',
101100
'doctest',
102101
'DocXMLRPCServer',
@@ -203,6 +202,7 @@ python_standard_libs = [
203202
'optparse',
204203
'os',
205204
'ossaudiodev',
205+
'packaging',
206206
'parser',
207207
'pathlib',
208208
'pdb',

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ def read(filename):
5454
"colorclass >= 1.2.0",
5555
"macaroonbakery >= 1.1.3",
5656
"oauthlib >= 1.0.3",
57+
"packaging >= 21.3",
5758
"pymongo >= 3.5.1", # for bson
5859
"pytz >= 2014.10",
5960
"PyYAML >= 3.11",

0 commit comments

Comments
 (0)