Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virtualenv 20.11.0 broke our pre-commit checks #2257

Closed
dhalperi opened this issue Dec 28, 2021 · 3 comments
Closed

virtualenv 20.11.0 broke our pre-commit checks #2257

dhalperi opened this issue Dec 28, 2021 · 3 comments
Labels

Comments

@dhalperi
Copy link

dhalperi commented Dec 28, 2021

Issue

After overnight upgrade of virtualenv to 20.11.0, our precommit checks started failing with:

File "/home/batfish/.cache/pre-commit/repozzh13x5u/py_env-python3/lib/python3.8/site-packages/_distutils_hack/__init__.py", line 92, in create_module
--
  | return importlib.import_module('setuptools._distutils')
  | File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
  | return _bootstrap._gcd_import(name[level:], package, level)
  | ModuleNotFoundError: No module named 'setuptools'

Environment

Provide at least:

  • OS: Ubuntu 20.04, AWS Linux
  • pip list of the host python where virtualenv is installed:
      Installing collected packages: six, platformdirs, filelock, distlib, virtualenv, toml, pyyaml, nodeenv, identify, cfgv, pre-commit
        | Successfully installed cfgv-3.3.1 distlib-0.3.4 filelock-3.4.2 identify-2.4.1 nodeenv-1.6.0 platformdirs-2.4.1 pre-commit-2.16.0 pyyaml-6.0 six-1.16.0 toml-0.10.2 virtualenv-20.11.0

Investigation

Last succeeding build (public): https://buildkite.com/batfish/pybatfish-pre-commit/builds/27313#bbf21871-a3c6-44e6-b63b-f797e3c7de1f

Next run, first failing build (public): https://buildkite.com/batfish/pybatfish-pre-commit/builds/27314#475992ad-c90a-4457-ad74-1b94a0f78762

The only difference appears to be the upgrade to virtualenv-20.11.0 and the correspond loss of backports.entry-points-selectable.

It has something to do with isort; I've tried both 5.8.0 (as in the existing pre-commit file) and the latest 5.10.1 release. Disabling isort check in pre-commit makes the build pass. batfish/pybatfish#805

@gaborbernat
Copy link
Contributor

As pre-commit/pre-commit#2178 (comment) details the culprit here is pip and setuptools, virtualenv just makes easier that bug to manifest. There's nothing to be done on our end though.

@dhalperi
Copy link
Author

Thank you!

@gaborbernat
Copy link
Contributor

https://pypi.org/project/virtualenv/20.11.1/ now ships setuptools 60.1.1 with the fix

dhalperi added a commit to dhalperi/pybatfish that referenced this issue Dec 30, 2021
Per pypa/virtualenv#2257, new version has
been released.
dhalperi added a commit to batfish/pybatfish that referenced this issue Dec 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants