pylint
tox environment has false import-errors on local tox
runs
#32504
Labels
pylint
tox environment has false import-errors on local tox
runs
#32504
Context
Thanks @pvaneck for repro and investigation!
results in bunches of:
This started occurring with the
python 3.12
upgrade. The origin of the new behavior is the newpip
version interacting withpylint
erroneously.Specifically, when a dependency of the package being pylinted is editable installed,
import error
s are thrown when they really shouldn't be. See this pylint issue for the discussion. These aren't real import errors, they are caused by howpylint
is interacting with a newsetuptools
required by py 3.12.This can be bypassed temporarily by setting env variable:
SETUPTOOLS_ENABLE_FEATURES="legacy-editable"
We don't see this in CI because in CI, no editable requirements are installed. They're all pre-built!
Solutions
dev_requirements.txt
installs within thepylint
environment to prebuilt packages. REGARDLESS of whether it is being run in CI or not.The text was updated successfully, but these errors were encountered: