-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
Remove bundled setuptools #95299
Comments
@pablogsal do you think it is still acceptable to do this in 3.11? If positive we can likely land a PR on time for RC1. |
Unfortunately I don't feel comfortable landing this so late in the release cycle, specially so close to RC1 and given the current stability of 3.11 :( This will need to wait until 3.12. |
It feels strange that |
I've filed #101039 for this (almost had a number with three 0s), targetting 3.12. |
Do you have some examples of cases where the PEP 517 mode doesn't work for legacy packages? :-) |
PEP 517 is backwards compatible, it should work on legacy packages, the opposite is the issue, pip trying to use the legacy path for packages that need PEP 517. |
…directly" This reverts commit 41c5a66.
# This is the 1st commit message: pythongh-95299: Rework test_cppext.py to not invoke setup.py directly # This is the commit message #2: Add tests/cppextdata data to `TESTSUBDIRS` # This is the commit message #3: Revert "Add tests/cppextdata data to `TESTSUBDIRS`" This reverts commit 635492e.
) * gh-95299: Rework test_cppext.py to not invoke setup.py directly * Add tests/cppextdata data to `TESTSUBDIRS` * Revert "Add tests/cppextdata data to `TESTSUBDIRS`" This reverts commit 635492e. * Revert "gh-95299: Rework test_cppext.py to not invoke setup.py directly" This reverts commit 41c5a66. * Build and install the extension in a temporary directory instead * Pull in wheels for setuptools and wheel for testing extension builds
* main: pythongh-103479: [Enum] require __new__ to be considered a data type (pythonGH-103495) pythongh-103365: [Enum] STRICT boundary corrections (pythonGH-103494) pythonGH-103488: Use return-offset, not yield-offset. (pythonGH-103502) pythongh-103088: Fix test_venv error message to avoid bytes/str warning (pythonGH-103500) pythonGH-103082: Turn on branch events for FOR_ITER instructions. (python#103507) pythongh-102978: Fix mock.patch function signatures for class and staticmethod decorators (python#103228) pythongh-103462: Ensure SelectorSocketTransport.writelines registers a writer when data is still pending (python#103463) pythongh-95299: Rework test_cppext.py to not invoke setup.py directly (python#103316)
…101039) Remove the bundled setuptools wheel from ensurepip, and stop installing setuptools in environments created by venv. Co-Authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
https://docs.python.org/3.12/library/venv.html#an-example-of-extending-envbuilder is the final piece of work here -- that example needs to be updated to use something more modern or otherwise behave differently to showcase extending behaviours of the class. |
…python#103316) * pythongh-95299: Rework test_cppext.py to not invoke setup.py directly * Add tests/cppextdata data to `TESTSUBDIRS` * Revert "Add tests/cppextdata data to `TESTSUBDIRS`" This reverts commit 635492e. * Revert "pythongh-95299: Rework test_cppext.py to not invoke setup.py directly" This reverts commit 41c5a66. * Build and install the extension in a temporary directory instead * Pull in wheels for setuptools and wheel for testing extension builds
* main: (24 commits) pythongh-98040: Move the Single-Phase Init Tests Out of test_imp (pythongh-102561) pythongh-83861: Fix datetime.astimezone() method (pythonGH-101545) pythongh-102856: Clean some of the PEP 701 tokenizer implementation (python#103634) pythongh-102856: Skip test_mismatched_parens in WASI builds (python#103633) pythongh-102856: Initial implementation of PEP 701 (python#102855) pythongh-103583: Add ref. dependency between multibytecodec modules (python#103589) pythongh-83004: Harden msvcrt further (python#103420) pythonGH-88342: clarify that `asyncio.as_completed` accepts generators yielding tasks (python#103626) pythongh-102778: IDLE - make sys.last_exc available in Shell after traceback (python#103314) pythongh-103582: Remove last references to `argparse.REMAINDER` from docs (python#103586) pythongh-103583: Always pass multibyte codec structs as const (python#103588) pythongh-103617: Fix compiler warning in _iomodule.c (python#103618) pythongh-103596: [Enum] do not shadow mixed-in methods/attributes (pythonGH-103600) pythonGH-100530: Change the error message for non-class class patterns (pythonGH-103576) pythongh-95299: Remove lingering setuptools reference in installer scripts (pythonGH-103613) [Doc] Fix a typo in optparse.rst (python#103504) pythongh-101100: Fix broken reference `__format__` in `string.rst` (python#103531) pythongh-95299: Stop installing setuptools as a part of ensurepip and venv (python#101039) pythonGH-103484: Docs: add linkcheck allowed redirects entries for most cases (python#103569) pythongh-67230: update whatsnew note for csv changes (python#103598) ...
For parity with the `ensurepip` and `venv` modules, which no longer install setuptools as of Python 3.12: - python/cpython#95299 - python/cpython@ece20db Fixes indygreg#300.
For parity with the `ensurepip` and `venv` modules, which no longer install setuptools as of Python 3.12: - python/cpython#95299 - python/cpython@ece20db Fixes indygreg#300.
For parity with the `ensurepip` and `venv` modules, which no longer install setuptools as of Python 3.12: - python/cpython#95299 - python/cpython@ece20db Fixes #300.
* Remove distutils references (it was removed on python3.12) * Add setuptools as dependency on tox environments (see python/cpython#95299)
* Remove distutils references (it was removed on python3.12) * Add setuptools as dependency on tox environments (see python/cpython#95299)
As of Python 3.12, `setuptools` is no longer installed by default (see: python/cpython#95299) At some point I'll migrate this project to the latest approaches for package management, but for now, this is a functional stopgap.
Feature or enhancement
Remove the bundled setuptools so that
ensurepip
andpython -m venv
only installs pip.Context
The
setup.py install
command ofsetuptools
is deprecated.However, in an environment where
setuptools
is installed butwheel
is not (such as one created withpython -m venv
), pip falls back on running the deprecated and non-standardsetup.py install
.Since version 22.1 pip works correctly by default in environments where
setuptools
is not installed, by enabling its PEP 517 mode automatically, leading to unsurprising installations in most cases.So, in order to progressively expose more users to standard-based installation workflows, we (the pip team) would like that virtual environments are created without
setuptools
by default.Users faced with failing installations following this change (likely due to packages with customized
setup.py
that do not support building a wheel) can easilypip install setuptools
to solve the issue.Previous discussion
pypa/pip#8102 (comment) and following comments has some more context.
Linked PRs
The text was updated successfully, but these errors were encountered: