Merge "Replace use of distutils.version"

This commit is contained in:
Zuul
2025-10-21 04:41:42 +00:00
committed by Gerrit Code Review
2 changed files with 3 additions and 3 deletions

View File

@@ -132,7 +132,7 @@ PyMySQL # MIT License
pyOpenSSL # Apache-2.0
pyparsing # MIT
pyroute2!=0.5.4,!=0.5.5,!=0.7.1,!=0.9.1,!=0.9.2,!=0.9.3,!=0.9.4;sys_platform!='win32' # Apache-2.0 (+ dual licensed GPL2)
pysaml2!=4.0.3,!=4.0.4,!=4.0.5,!=4.0.5rc1,!=4.1.0,!=4.2.0,!=4.3.0,!=4.4.0,!=4.6.0 # Apache-2.0
pysaml2!=4.0.3,!=4.0.4,!=4.0.5rc1,!=4.0.5,!=4.1.0,!=4.2.0,!=4.3.0,!=4.4.0,!=4.6.0 # Apache-2.0
pysnmp-lextudio # BSD
pystache # MIT
# Only required for sasl/binary protocol

View File

@@ -15,8 +15,8 @@
# This module has no IO at all, and none should be added.
import collections
import distutils.version
import packaging.specifiers
import packaging.version
import pkg_resources
import re
@@ -26,7 +26,7 @@ def key_specifier(a):
'===': 1, '==': 1, '~=': 1, '!=': 1,
'<': 2, '<=': 2}
a = a._spec
return (weight[a[0]], distutils.version.LooseVersion(a[1]))
return (weight[a[0]], packaging.version.parse(a[1]))
class Requirement(collections.namedtuple('Requirement',