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

Adequate venv fixtures to the latest change in virtualenv for Python 3.12 #3915

Merged
merged 3 commits into from
May 3, 2023

Conversation

abravalheri
Copy link
Contributor

@abravalheri abravalheri commented May 2, 2023

Summary of changes

Since version v20.23.0, virtualenv will no longer include wheel and setuptools in the created folders.

Some tests in the setuptools test suite assume that these packages are always present. So we need to adequate these tests.

EDIT: Apparently we are also having problems with __version__. It seems that the code path triggered in the "unhappy path" that results in __version__ = "unknown".
Since unknown is not a valid PEP 440, it causes problem. I changed this fallback to be PEP 440-compliant.
This problem might be related to the race conditions between importlib.metadata (used by pytest and plugins) and egg_info (that writes setuptools.egg-info/PKG-INFO).

Closes

Pull Request Checklist

Since version v20.23.0, `virtualenv` will no longer include `wheel` and
`setuptools` in the created folders.

Some tests in the setuptools test suite assume that these packages are
always present. So we need to adequate these tests.
@abravalheri
Copy link
Contributor Author

It also seems that somehow setuptools.__version__ ends up either as None or unknown, which will result in an invalid version error.

I added a commit to correct that.

@abravalheri abravalheri marked this pull request as ready for review May 2, 2023 16:45
@abravalheri abravalheri changed the title Adequate venv fixtures to the latest change in virtualenv Adequate venv fixtures to the latest change in virtualenv for Python 3.12 May 2, 2023
@abravalheri abravalheri merged commit b010f52 into pypa:main May 3, 2023
@abravalheri abravalheri deleted the fix-py312-virtualenv branch May 3, 2023 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant