comparison contrib/import-checker.py @ 51659:d9faa71a57f6 stable

test-check: don't report distutils as a local import On python 3.12 this is wrongly reported as a local import. So we adjust the checker to avoid it.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 08 Jul 2024 16:44:07 +0200
parents 617af10994fb
children 3ba998d7fc77
comparison
equal deleted inserted replaced
51658:a0f1378b932e 51659:d9faa71a57f6
235 yield m 235 yield m
236 for m in 'cPickle', 'datetime': # in Python (not C) on PyPy 236 for m in 'cPickle', 'datetime': # in Python (not C) on PyPy
237 yield m 237 yield m
238 for m in ['cffi']: 238 for m in ['cffi']:
239 yield m 239 yield m
240 yield 'distutils' # in Python < 3.12
241 yield 'distutils.version' # in Python < 3.12
240 stdlib_prefixes = {sys.prefix, sys.exec_prefix} 242 stdlib_prefixes = {sys.prefix, sys.exec_prefix}
241 # We need to supplement the list of prefixes for the search to work 243 # We need to supplement the list of prefixes for the search to work
242 # when run from within a virtualenv. 244 # when run from within a virtualenv.
243 for mod in (argparse, zlib): 245 for mod in (argparse, zlib):
244 if mod is None: 246 if mod is None: