Commit Graph

144 Commits

Author SHA1 Message Date
Damian Shaw 68529081c2
Enforce f-strings via Ruff (#12393) 2023-11-07 09:14:56 +00:00
Lukas Geiger 3d6b0be901 Remove outdated noqa comments 2023-09-22 01:28:54 +01:00
Damian Shaw 184e482626 Clarify --prefer-binary 2023-09-20 18:48:52 -04:00
Joshua b2a151500b --dry-run is cool 2023-08-08 13:37:57 -05:00
Dos Moonen 9605b97b48 Correct default from `disabled` to `auto`. See #11939. 2023-04-10 11:13:31 +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
Stéphane Bidoul e4d291c5a7 Combine setuptools and wheel detection in one step
It would be annoying if you see an error about setuptools, install it,
and only be greeted by another error telling you to install wheel.
So we combine the two into one.
2023-03-27 13:52:23 +02:00
Stéphane Bidoul 8a1a8d7915 Always use pep 517 when the 'wheel' package is absent 2023-03-27 11:55:20 +01:00
Stéphane Bidoul a04748db8e Remove support for the deprecated --install-options 2023-03-18 11:20:51 +01:00
Filipe Laíns 1268487cba
Support passing the same key multiple times in --config-settings (#11853) 2023-03-17 21:23:19 +00:00
Tzu-ping Chung 5c3d1fed4a
Merge pull request #11698 from Darsstar/keyring-multi-choice 2023-03-15 18:07:07 +08:00
Filipe Laíns 30fd549c77
Add -C as a short version of --config-settings (#11786)
Signed-off-by: Filipe Laíns <lains@riseup.net>
2023-02-28 00:33:06 +00:00
Dos Moonen 6affad8032 Merge branch 'main' into keyring-multi-choice
# Conflicts:
#	src/pip/_internal/network/auth.py
2023-02-21 14:02:32 +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
Dos Moonen 33cd541cc4 Make it possible to request a keyring provider: `auto`, `disabled`, `import` or `subprocess`
Refactored `_get_index_url()` to get integration tests for the subprocess backend working.

Keyring support via the 'subprocess' provider can only retrieve a password, not a username-password combo. The username therefor MUST come from the URL.
If the URL obtained from the index does not contain a username then the username from a matching index is used. `_get_index_url()` does that matching.

The problem this refactoring solves is that the URL where a wheel or sdist can be downloaded from does not always start with the index url. Azure DevOps Artifacts Feeds are an example since it replaces the friendly name of the Feed with the GUID of the Feed. Causing `url.startswith(prefix)` to evaluate as `False`.

The new behaviour is to return the index which matches the netloc and has the longest common prefix of the `path` property of the value returned by `urllib.parse.urlsplit()`. The behaviour for resolving ties is unspecified.
2023-01-30 09:00:59 +01:00
Oliver Freund 1304e3e8d4 Fixed lint errors (line too long) 2022-10-29 17:21:51 -05:00
Oliver Freund bfaebd96b9 changed the description of --install_options, since the option is now deprecated 2022-10-28 23:37:56 -05:00
Pradyun Gedam 6421ab59d5
Remove the opt-in for `2020-resolver`
This has been the default for quite some time now.
2022-10-07 11:57:02 +01: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
Paul Moore 79cd5998aa Add a --python option 2022-07-28 12:10:50 +01:00
Stéphane Bidoul bb2a3d7410
Remove the html5lib deprecated feature flag. 2022-07-16 19:37:11 +02:00
Pradyun Gedam 8bebea801d
Remove `--use-deprecated=backtrack-on-build-failures`
This flag is due for removal, in pip 22.2.
2022-07-15 08:27:23 +01:00
Tzu-ping Chung b91dbde21f
Merge pull request #11082 from uranusjr/truststore 2022-05-30 02:32:49 -04:00
q0w 3166157e40 Opt to check build dependencies 2022-05-13 03:05:55 +03:00
Tzu-ping Chung f4962cce70 Optional truststore support
This adds a --use-feature=truststore flag that, when specified on Python
3.10+ with truststore installed, switches pip to use truststore to
provide HTTPS certificate validation, instead of certifi. This allows
pip to verify certificates against custom certificates in the system
store.

truststore is deliberately NOT vendored because it is expected the
library to be under active development in the short term, and this
prevents users having to wait for a pip release to get potentially vital
bug fixes needed to be made in truststore.

Supplying the use-feature flag without installing truststore beforehand,
or on Python versions prior to 3.10, results in a command error.
2022-05-03 11:04:05 -06:00
Paul Moore cdeb8f9e63
Merge pull request #11059 from pfmoore/config_settings
Add a UI to set config settings for PEP 517 backends
2022-04-29 12:58:32 +01:00
Tomáš Hrnčiar 452d7da880
Fallback to pyproject.toml-based builds if setuptools cannot be imported (#10717)
This fallback is only triggered if the project has a `setup.py` file.

Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
2022-04-23 15:56:59 +01:00
Paul Moore 962b0738fd Add documentation 2022-04-22 10:42:16 +01:00
Paul Moore 01690b8423 Add new --config-settings option to install and wheel commands 2022-04-21 18:30:48 +01:00
Tzu-ping Chung 2e1112a814
Make the root warning silence flag multi-state (#11035)
Instead of a flag, make the option take an argument like this:

    --root-user-action=ignore

This allows us to add more alternatives in the future, for example to
emit a hard error when a root user is detected.

Also re-label the news fragment to point to the issue instead of the PR
that introduced the option.
2022-04-14 18:10:19 +01:00
Pradyun Gedam 428e886ad6
Drop out-of-tree/in-tree build transition flags
These were intended to help users transition when the default behaviour
changed to no longer perform out-of-tree builds. The transition is now
considered complete.
2022-04-08 12:20:36 +01:00
Pradyun Gedam 7a4c3ba03a
Merge pull request #11014 from pradyunsg/remove-alternative-progress-bars
Co-authored-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
2022-04-08 11:47:34 +01:00
Pradyun Gedam 728e4fe7c4
Drop alternative progress bar styles
These were deprecated in a previous release, and added complexity
despite being rarely used.
2022-04-07 09:05:00 +01:00
Jarek Potiuk 62b2264d72 Allow to disable warning for root user package management
Implements the flag that allows to disable the root
warning when using `pip` to install packages. While there are
differing opinions on this, it seems that the final decision is
to lean forward to implement a long and not very easily
discoverable flag to accommodate the minority of users who know
what they are doing and using root installation to - for example
build optimized Dockerfiles.
2022-03-27 09:53:07 +02:00
Georgy Pchelkin a7fc70455e --proxy option requires scheme, does not work without it
see also: 2b2ca40ccc
2022-03-09 16:59:22 +03:00
Jon Dufresne bf5f4008e7
Replace vendored html5lib with stdlib
The html5lib library isn't strictly required as the same functionality
can be achieved through the stdlib html.parser module.

The html5lib is one of the largest uses of the six library. By dropping
this unnecessary dependency, the pip project is closer to dropping the
six library.

Additionally, html5lib maintenance has slowed down and the project has
rejected pull requests to drop Python 2 support.

For now, the html5lib code remains, but is gated behind a command
line option: `--use-deprecated=html5lib`. After a sufficient amount of
time has passed without any reported bugs, the vendored library and this
flag can be removed completely.
2022-01-28 06:45:57 +00:00
Pradyun Gedam 9d0db8839f
Add `--use-deprecated=backtrack-on-build-failures`
This serves as an opt-out from build failures causing the entire
installation to abort.
2022-01-27 18:11:05 +00:00
Pradyun Gedam 57198c6688
Use `logger.warning` instead of `warnings.warn`
This is more in line with the rest of our output presentation logic.
2022-01-25 01:38:22 +00:00
Tushar Sadhwani 3c0d09e02e Fix line too long 2021-10-17 16:33:46 +05:30
Tushar Sadhwani 284f459f71
Update src/pip/_internal/cli/cmdoptions.py
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2021-10-16 08:44:43 +05:30
Tushar Sadhwani 6c8ef89d97 Document --require-virtualenv flag 2021-10-14 22:12:33 +05:30
Pradyun Gedam bc98892d0b
Drop --build-dir from the CLI
This was restored as a no-op for PyCharm, as a way to soften the
migration for them. It is no longer necessary, since the migration has
completed.
2021-10-04 22:35:48 +01:00
Pradyun Gedam a07bfb33a0
Merge pull request #10495 from sbidoul/out-of-tree-build-flag 2021-10-02 12:34:24 +01:00
Stéphane Bidoul 040cc391ba
Make in-tree-build the default
Add an out-of-tree-build feature flag to ease the transition.
2021-09-25 13:11:01 +02:00
Blazej Michalik 03e0053c2c Add --debug flag to base command
This flag makes the main subroutine (cli.base_command.Command.run)
withold from intercepting unhandled exceptions. This means, that
debugging via "python -m pdb -m pip" is now possible.
2021-09-21 00:07:28 +02:00
Harutaka Kawamura df98167fe5
Complete type annotations in `pip/_internal/cli` (#10169) 2021-07-23 11:39:53 +08:00
Diego Ramirez 1e016d2994
Convert type hint comments into annotations
Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2021-06-07 21:19:23 +08:00
Deepyaman Datta 0170e37046
Remove second space after comma in find_links help 2021-06-07 17:42:32 +08:00