import cherrypy
from collections import defaultdict
-from distutils.version import StrictVersion
+from packaging.version import Version
import json
import math
import os
# ipv6 isn't yet configured / supported and CherryPy throws an uncaught
# exception.
if cherrypy is not None:
- v = StrictVersion(cherrypy.__version__)
+ v = Version(cherrypy.__version__)
# the issue was fixed in 3.2.3. it's present in 3.2.2 (current version on
# centos:7) and back to at least 3.0.0.
- if StrictVersion("3.1.2") <= v < StrictVersion("3.2.3"):
+ if Version("3.1.2") <= v < Version("3.2.3"):
# https://github.com/cherrypy/cherrypy/issues/1100
from cherrypy.process import servers
servers.wait_for_occupied_port = lambda host, port: None