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

Stop installing setuptools and wheel by default on Python 3.12+ environments #2487

Closed
pradyunsg opened this issue Jan 16, 2023 · 7 comments · Fixed by #2558
Closed

Stop installing setuptools and wheel by default on Python 3.12+ environments #2487

pradyunsg opened this issue Jan 16, 2023 · 7 comments · Fixed by #2558

Comments

@pradyunsg
Copy link
Member

pradyunsg commented Jan 16, 2023

What's the problem this feature will solve?

pip can now operate without setuptools in the environment, and it will be removed from the default set of venv packages in Python 3.12+ (python/cpython#101039)

Describe the solution you'd like

What the title says. :)

Alternative Solutions

Not doing this, and being inconsistent with venv.

Additional context

N/A

@pradyunsg pradyunsg changed the title Stop install setuptools and wheel by default on Python 3.12+ environments Stop installing setuptools and wheel by default on Python 3.12+ environments Jan 16, 2023
@chrysle
Copy link
Contributor

chrysle commented Apr 22, 2023

I'll try to implement the requested behavior.

@gaborbernat
Copy link
Contributor

Go ahead 😃

@chrysle
Copy link
Contributor

chrysle commented Apr 24, 2023

@gaborbernat Did I get it right that the seed packages setuptools and wheel and their wheels are to be removed? Before I do anything wrong.

@gaborbernat
Copy link
Contributor

We should not remove those. We should just by default disable installing this on 3.12 or later. The user might still enable it manually.

@chrysle
Copy link
Contributor

chrysle commented Apr 24, 2023

We should not remove those. We should just by default disable installing this on 3.12 or later. The user might still enable it manually.

Thanks for the quick response! Should an option like --with-seeders be created for that?

@gaborbernat
Copy link
Contributor

No need we already have --setuptools --wheels whose default we can change.

@jaraco
Copy link
Member

jaraco commented May 24, 2023

Really happy to see setuptools and wheel removed by default. Thanks for that!

In jaraco/pip-run#73, I spent about an hour trying to figure out why the Python 3.12 builds were failing when the other Pythons weren't. I wouldn't have expected virtualenv to be providing version-specific features. One of the advantages of third-party packages is that they aren't coupled to Python releases and can provide users a consistent experience across Python versions.

By rolling out this feature based on the Python version, you're creating an extra dimension to the configuration space. I'd have rather seen it rolled out universally (or at least made opt-in for users on older Pythons).

mgedmin added a commit to mgedmin/objgraph that referenced this issue Sep 7, 2023
There's a test that checks whether `import setup` works; our setup.py
requires setuptools.

Before Python 3.12, setuptools was preinstalled in all the virtualenvs.
Virtualenv 20.23.0 changed this:

  - Do not install wheel and setuptools seed packages for Python 3.12+.

See pypa/virtualenv#2487 for details and
rationale.
bdabelow added a commit to bdabelow/qtile that referenced this issue May 29, 2024
As of Python 3.12, setuptools is no longer installed into venvs by default: pypa/virtualenv#2487

flake8-logging-format depends on setuptools without explicitely declaring it: globality-corp/flake8-logging-format#68

Add setuptools to additional_dependencies in pre-commit config to avoid issue when running pre-commit hooks with Python 3.12:
Flake8 failed to load plugin "flake8-logging-format" due to No module named 'pkg_resources'.
bdabelow added a commit to bdabelow/qtile that referenced this issue May 31, 2024
As of Python 3.12, setuptools is no longer installed into venvs by default: pypa/virtualenv#2487

flake8-logging-format depends on setuptools without explicitely declaring it: globality-corp/flake8-logging-format#68

Add setuptools to additional_dependencies in pre-commit config to avoid issue when running pre-commit hooks with Python 3.12:
Flake8 failed to load plugin "flake8-logging-format" due to No module named 'pkg_resources'.

Also remove workaround from "Run pre-commit" GHA workflow.
tych0 pushed a commit to qtile/qtile that referenced this issue May 31, 2024
As of Python 3.12, setuptools is no longer installed into venvs by default: pypa/virtualenv#2487

flake8-logging-format depends on setuptools without explicitely declaring it: globality-corp/flake8-logging-format#68

Add setuptools to additional_dependencies in pre-commit config to avoid issue when running pre-commit hooks with Python 3.12:
Flake8 failed to load plugin "flake8-logging-format" due to No module named 'pkg_resources'.

Also remove workaround from "Run pre-commit" GHA workflow.
WesKw pushed a commit to Flash-X/Milhoja that referenced this issue Jun 25, 2024
`setuptools` will not be bundled in `venv` after Python3.12
see pypa/virtualenv#2487
myxie added a commit to ICRAR/daliuge that referenced this issue Oct 9, 2024
- Add `setuptools` as a dependency: pypa/virtualenv#2487
- Bump pyzmq version number: https://pyzmq.readthedocs.io/en/latest/changelog.html#id11
- Bump pydantic version number: pydantic/pydantic#9637
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants