Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Use virtualenv>=20 #239

Merged
merged 12 commits into from
Jul 23, 2021
Merged

Use virtualenv>=20 #239

merged 12 commits into from
Jul 23, 2021

Conversation

kaisen
Copy link
Member

@kaisen kaisen commented Apr 21, 2021

virtualenv>=20 contains a big refactor of the inner workings of virtualenv which broke venv-update. This PR accounts for the major changes and requires virtualenv>=20 moving forward.

Notable changes:

  • virtualenv>=20 is required
  • The old adjust_options hook doesn't exist anymore in virtualenv, so the logic to check if an old virtualenv is valid needs to be done before virtualenv is invoked
  • Checking if --system-site-packages was passed to virtualenv is now done by checking for a config in the new pyenv.cfg file
  • Major version bump to 4.0.0

Fixes #231.

Copy link
Contributor

@asottile asottile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the invalid check can be greatly simplified as virtualenv 20.x doesn't do major copies of things

here's some prior art: https://github.com/pre-commit/pre-commit/blob/24d9dc7469f9b752b5c772d5cc829d95b43e0e8c/pre_commit/languages/python.py#L166-L186

venv_update.py Outdated Show resolved Hide resolved
venv_update.py Outdated Show resolved Hide resolved
venv_update.py Outdated Show resolved Hide resolved
CI/requirements.txt Outdated Show resolved Hide resolved
Copy link
Member

@ymilki ymilki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all the attention to get all the tests passing!

@kaisen kaisen merged commit 5fb5491 into master Jul 23, 2021
@kaisen kaisen deleted the use_virtualenv_gte_20 branch July 23, 2021 20:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

incompatibility with virtualenv 20
4 participants