Commit Graph

633 Commits

Author SHA1 Message Date
Damian Shaw 68529081c2
Enforce f-strings via Ruff (#12393) 2023-11-07 09:14:56 +00:00
Wu Zhenyu dba399fe6a Fix #12166
- tests expected results indendation was off
- add bugfix news entry
2023-10-07 15:15:51 +08:00
Stéphane Bidoul ff05e4224b
Merge pull request #12289 from lgeiger/noqa
Remove outdated `noqa` comments
2023-10-01 19:29:09 +02:00
Pradyun Gedam 11ff957838
Merge pull request #12292 from hauntsaninja/literal-type
Avoid use of 2020-resolver and legacy-resolver
2023-10-01 13:56:57 +01:00
Itamar Turner-Trauring cc14055336
Merge branch 'main' into 2984-new-cache-lower-memory 2023-09-26 10:38:42 -04:00
Itamar Turner-Trauring 64d2dc3253 Fix lints 2023-09-26 10:30:15 -04:00
hauntsaninja 666be3544b Avoid use of 2020-resolver and legacy-resolver 2023-09-23 13:34:06 -07:00
Lukas Geiger 3d6b0be901 Remove outdated noqa comments 2023-09-22 01:28:54 +01:00
Seth Michael Larson fca773ccde
Allow truststore to not import on Python 3.9 and earlier 2023-09-12 15:56:31 -05:00
Itamar Turner-Trauring ab9f6f37f1
Fix formatting, combine numbers not strings!
Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
2023-09-07 12:07:50 -04:00
Itamar Turner-Trauring b273cee6c5 Combine one entry, explain difference between entries better. 2023-09-06 16:48:49 -04:00
Itamar Turner-Trauring 577c86cff4
Merge branch 'main' into 2984-new-cache-lower-memory 2023-09-06 11:47:38 -04:00
Tzu-ping Chung af43e139b6
Drive by split() limit to improve performance 2023-09-06 15:39:11 +08:00
Christian Clauss 0c0099b23b
Ruff misidentifies config as a dict
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2023-08-29 11:31:42 +02:00
Christian Clauss 0a24a001fb Fix issues raised in code review 2023-08-28 15:04:54 +02:00
Christian Clauss 69a1e956da Ruff rules C4,C90,PERF 2023-08-28 14:51:13 +02:00
Shantanu 901db9cf8d
Use a set for TargetPython.get_tags for performance (#12204) 2023-08-06 11:08:16 -05:00
Pradyun Gedam 324dd44495
Merge pull request #11417 from Freed-Wu/fix-zsh 2023-07-15 01:57:38 +01:00
Tzu-ping Chung 0cabefbce8 Ensure requirements are prepared before get_dist()
The legacy resolver seems to prepare requirements differently that can
leave them half-done in certain code paths. I'm not quite sure how it's
doing things, but at least we can do this to make sure they do things
right.
2023-07-12 03:41:00 +08:00
Роман Донченко 393ccfbc31 test_freeze_with_setuptools: use mocks
This makes it possible to test both branches on any Python version.
2023-07-07 01:46:03 +03:00
Роман Донченко 5dc65eabb7 Don't exclude setuptools, distribute & wheel from freeze output on Python 3.12+
Due to the advent of build isolation, it is no longer necessary to install
setuptools and wheel in an environment just to install other packages.
Moreover, on Python 3.12 both ensurepip [1] and virtualenv [2] are to stop
installing setuptools & wheel by default. This means that when those packages
are present in a Python 3.12+ environment, it is reasonable to assume that
they are runtime dependencies of the user's project, and therefore should be
included in freeze output.

distribute is just obsolete.

[1] https://github.com/python/cpython/issues/95299
[2] https://github.com/pypa/virtualenv/pull/2558
2023-07-07 01:46:03 +03:00
Stéphane Bidoul 782cff7e01 Warn when legacy versions and specifiers are resolved
Also warn in pip check.

...
2023-06-27 16:43:32 +02:00
Itamar Turner-Trauring c1ead0aa37 Switch to new cache format and new cache location. 2023-06-27 09:11:31 -04:00
Felipe Peter e8b4bae05e Remove superfluous "together" 2023-05-21 00:29:06 +08:00
Felipe Peter 00ddca8bae Merge remote-tracking branch 'upstream/main' into fix-docs-for-pip-list-outdated-with-freeze-format 2023-05-21 00:25:32 +08:00
Wu Zhenyu fb454572b2
Fix `pip completion --zsh` 2023-04-04 15:52:05 +08:00
Stéphane Bidoul 48986a6d1f Don't fallback to setup.py install when build failed 2023-03-31 09:47:08 +02:00
Stéphane Bidoul 2617ccd8a3 Centralize warning about always enabled features 2023-03-29 08:41:09 +02:00
Stéphane Bidoul 8f0201f67a Remove no-binary disabling the cache of locally built wheels 2023-03-29 08:41:09 +02:00
Pradyun Gedam 78ab4cf071
Bump all linters other than mypy (#11901) 2023-03-27 20:03:11 +01:00
Stéphane Bidoul 7047330b0b Simplify check_legacy_setup_py_options 2023-03-18 15:26:43 +01:00
Stéphane Bidoul a04748db8e Remove support for the deprecated --install-options 2023-03-18 11:20:51 +01:00
Stéphane Bidoul 5189a6e0f4 --no-binary does not imply setup.py install anymore 2023-03-12 17:18:53 +01:00
Stéphane Bidoul 852deddb9c
Merge pull request #11775 from pelson/doc/prefix-warning
Document the limitations of the pip install --prefix argument
2023-02-11 15:14:30 +01:00
Phil Elson a2b0eb6838 Document the limitations of the pip install --prefix argument, and cross-reference the --python flag, which can be harder to find due to it being a pip level argument 2023-02-06 09:14:52 +01:00
Stefano Rivera 9abb3c899a
Implement `--break-system-packages` for EXTERNALLY-MANAGED installations (#11780)
The PEP 668 expects an override mechanism to ease the transition.
This provides an override.

---------

Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
2023-02-06 07:06:59 +00:00
Oliver Mannion 62fb64ac96
Ignore PIP_REQUIRE_VIRTUALENV for `pip index` (#11671)
Ignore PIP_REQUIRE_VIRTUALENV in `pip index`
2023-02-06 07:05:31 +00:00
Stéphane Bidoul 126e6f67a5 Install report format declared stable 2023-01-28 14:15:04 +01:00
Stéphane Bidoul 99dddc1616 pip inspect format declared stable 2023-01-28 14:15:04 +01:00
Tzu-ping Chung 5e5480b3bc Only exclude --dry-run when used with --report 2023-01-17 15:04:56 +08:00
Tzu-ping Chung e27a819883 Use ExternallyManagedEnvironment to show error
This moves most of the displaying logic into the exception class so it
can better leverage DiagnosticPipError and Rich functionalities.
2023-01-03 07:57:21 +08:00
Tzu-ping Chung 69cb3f8617 Check EXTERNALLY-MANAGED in install and uninstall
This implements the PEP 668 logic to 'pip install' and 'pip uninstall'.
Are there any other commands that may need it?

This implementation disables the check is any of --prefix, --home, or
--target is provided, since those can indicate the command does not
actually install into the environment. Note that it is still possible
the command is still modifying the environment, but we don't have a
way to stop the user *that* determined to break the environment anyway
(they can always just use those flags in a virtual environment).

Also not sure how best this can be tested.
2023-01-03 07:57:21 +08:00
Pradyun Gedam 4162f28cad
Deal with dashed names in vendored modules, in `pip debug` 2022-12-28 20:13:57 +00:00
doron zarhi e59ff2fc8c show: add editable location if package is editable (#11638) 2022-12-18 01:33:57 +02:00
Felipe Peter fdc262f069 Fix error message and improve help text 2022-10-19 14:47:27 +08:00
Pradyun Gedam 7311c82476
Merge pull request #11359 from sbidoul/deprecate-install-options
Deprecate --install-options
2022-10-06 10:06:48 +01:00
Felipe Peter e6e7c12b6d
Disallow freeze format with pip list --outdated (#11482)
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2022-10-04 10:11:46 +01:00
Stéphane Bidoul 77c83013df
Pass global_options when building for install
Before 'build' was never called in presence of
install_option/global_option/build_option.
Now that it can build in such cases, pass these options as
well, for consistency with the wheel command.
2022-09-25 12:15:23 +02:00
Stéphane Bidoul a5621a8a81
Deprecate --install-option 2022-09-25 11:21:35 +02:00
Stéphane Bidoul 08eb492641
Deprecate --no-binary disabling the wheel cache 2022-09-17 15:32:46 +02:00