diff contrib/import-checker.py @ 50275:ada9a0245fd7 stable

run-tests: fix a crash when using the coverage options 35bf7f23b84c attempted to transition away from `distutils`, but the `packaging` code lacks `StrictVersion`. I have no idea when `packaging.version` became available, but I have it in python 3.6, so that should be good enough. For some reason, the import checker thinks this is a local import, and needs help to decide otherwise. Alternately we could ditch the version check entirely, because `coverage` is currently at 7.2.1, and the original check was added back in 2010.
author Matt Harbison <matt_harbison@yahoo.com>
date Tue, 07 Mar 2023 23:38:14 -0500
parents 1572f790ee5e
children 82e5a9b1ef1e
line wrap: on
line diff
--- a/contrib/import-checker.py	Tue Mar 07 13:39:31 2023 +0100
+++ b/contrib/import-checker.py	Tue Mar 07 23:38:14 2023 -0500
@@ -232,6 +232,7 @@
     yield 'importlib.abc'  # python3 only
     yield 'importlib.machinery'  # python3 only
     yield 'importlib.util'  # python3 only
+    yield 'packaging.version'
     for m in 'fcntl', 'grp', 'pwd', 'termios':  # Unix only
         yield m
     for m in 'cPickle', 'datetime':  # in Python (not C) on PyPy