Closed dihm closed 2 years ago
Thanks to @josiahsinclair for pointing out this issue and helping me track down its source.
Looks like labscript-utils is the only part of the suite that has direct distutils imports (based on github searches of the repos).
It appears that setuptools is shipping a distutils hack that has begun to trigger double import warnings from the double import denier.
Easiest method to reproduce is to have setuptools>=60.0.0 and run the following two commands (from labscript_utils.ls_zprocess):
With setuptools=60.0.5, the error is
Under setuptools=60.9.3, (most recent release), the message changes slightly and becomes decidedly less helpful.
While I suppose we could whitelist distutils, I think the more correct solution is to remove calls to distutils (seeing as it will be fully deprecated in python 3.12). It appears the equivalent function for this present problem is now packaging.version.Version. If we go this route, it's probably worth checking the whole suite for random distutils calls and updating them as well.