Commit Graph

191 Commits

Author SHA1 Message Date
Stéphane Bidoul 9c4a88b0a0
Improve deprecation message for issue 8368 2020-08-12 11:07:36 +02:00
Nguyễn Gia Phong e48a0cb7cb Remove no-longer-used messages 2020-08-01 20:26:44 +07:00
Pradyun Gedam 1b2ae22e7b
Don't print that form link after the end of month. 2020-07-27 19:51:40 +05:30
Pradyun Gedam 4e4951066d
Reverse if statement's condition 2020-07-27 13:52:54 +05:30
Pradyun Gedam 8db354260a
Move the form link to make the linter happy 2020-07-27 13:49:21 +05:30
Pradyun Gedam efdb66ed16
Add messaging variation based on "new resolver" usage 2020-07-27 13:49:21 +05:30
Pradyun Gedam 42c62a08f7
Short circuit when there's nothing to report 2020-07-27 13:49:20 +05:30
Pradyun Gedam d77b5c234c
Refactor the logging calls into a dedicated loop 2020-07-27 13:49:11 +05:30
Stéphane Bidoul d924b16b0d
Give mypy some love after rebase 2020-07-18 13:46:19 +02:00
Stéphane Bidoul fe5682627a
Quote 'setup.py install' when calling it legacy
We want to make it clear that it is the setup.py install command we consider
legacy, not setup.py itself.
2020-07-18 13:46:19 +02:00
Stéphane Bidoul 462d6ca590
Deprecate install fallback when bdist_wheel fails 2020-07-18 13:46:19 +02:00
Nguyễn Gia Phong f8b06a3906 Enable flake8-logging-format 2020-07-17 14:33:19 +07:00
Nguyễn Gia Phong cb8d81d135 Nitpick logging calls 2020-07-17 14:33:19 +07:00
Pradyun Gedam 7ddbcc2e67
Return early for clarity 2020-07-17 03:25:53 +05:30
Pradyun Gedam eafbec5aa6
Move conflict warning to just-before success message
This is a much better location for these errors, since they're in a much
more visible spot. We've had reports in the past of users missing these
messages, and changing where we present these warnings should help
resolve that issue.

We do lose the ability for an advanced user to potentially see the
warning and abort installation before the conflicts are introduced, but
given that we don't even pause for input, I don't think that's a strong
argument and neither do I view this as necessary.
2020-07-16 13:15:39 +05:30
Pradyun Gedam de741fa0dd
Clearly note where code duplication exists
The duplication of this code isn't really that bad, but saying
"pip check" makes it ambigous which file is relevant. Changing to
reference the exact filename makes this clearer.
2020-07-16 13:14:35 +05:30
Pradyun Gedam 67cbd0ca18
Break up pip install's "conflict check" function
Making this into two functions allows for separating the "check"
and "print warnings" step in a follow up commit.
2020-07-16 13:14:29 +05:30
Chris Hunt 15b7afbcad
Merge pull request #8266 from gutsytechster/add_logs_for_install
feat(): Add logs for pip environment when installing
2020-07-10 09:36:13 -04:00
gutsytechster 0ccbad8367
feat(): Add logs for pip environment when installing 2020-07-09 18:15:43 +05:30
Chris Hunt f878fcdeec Rename function that reject location install options
Since it no longer shows a deprecation warning, the previous name
doesn't fit.
2020-07-07 19:11:11 -04:00
Chris Hunt 89572a7d40 Throw CommandError on any location-related install options 2020-07-07 19:11:11 -04:00
Devesh Kumar Singh 87249b9850 Assert target_temp_dir instead of if check 2020-07-07 15:06:27 +05:30
Devesh Kumar Singh 21ca1620d1 Change target_temp_dir type to TempDirectory 2020-07-07 14:57:42 +05:30
Devesh Kumar Singh 61f344b040 Add type annotations for pip._internal.commands.install 2020-07-07 14:57:42 +05:30
Paul Moore f162236360 Fix deletion of temp dir when exception occurs 2020-06-25 13:00:11 +01:00
Pradyun Gedam c348c4215b
Merge pull request #8287 from sbidoul/ref-install_given_reqs-sbi 2020-05-30 13:24:28 +05:30
gutsytechster b82516c9ca fix(_internal/commands): Define a default add_option to child commands 2020-05-23 14:55:37 +05:30
gutsytechster 72a42197a4 refactor(commands): Add method add_options and remove __init__
This removes the __init__ method of child classes and defines
explicit method for adding command options.
2020-05-23 14:50:57 +05:30
Stéphane Bidoul 5cc4f2e390
Pass explicit arguments to install_given_req. 2020-05-21 15:35:39 +02:00
Tzu-ping Chung 8facc4cee1 Avoid RequirementSet before reaching the resolver
The RequirementSet implementation conflates requirements incorrectly in
a lot of places. This means the (new) resolver would get incomplete
requirements.

The removes all RequirementSet.add_requirement() calls outside of the
legacy resolver, so the new resolver can get the unmodified list of
requirements specified by the user, allowing for more sophisticated
requirement merging.
2020-05-04 01:24:19 +08:00
Tzu-ping Chung 6db0df928c Move wheel cache out of InstallRequirment 2020-03-30 17:36:03 +08:00
sinscary 716c9202ee Raise error if --user and --target arguments are used together 2020-02-27 12:22:56 +05:30
Chris Hunt 60a2fa4dce Inline unconditionally-executed blocks 2020-02-23 18:05:09 -05:00
Chris Hunt 45911713db Globally manage temp build dir
This will let us remove the indentation associated with the `with`
statement and eventually refactor these functions more easily.
2020-02-23 18:04:46 -05:00
Christopher Hunt ea47be571e
Merge pull request #7772 from chrahunt/refactor/command-level-scoped-tracker
Use Command context helper to cleanup requirement tracker
2020-02-24 06:51:06 +08:00
Chris Hunt eb91e8ca39 Use Command context helper to cleanup requirement tracker
The lifetime of the requirement tracker will be essentially the same,
but now we have more flexibility on where in the code we create it.

In a followup we can do the same thing with build_dir and remove the
`with` statement (and its indentation) entirely from these commands.
2020-02-23 14:37:01 -05:00
Chris Hunt ccc6d77a73 Do not update `no_clean` option value on PreviousBuildDirError
Since a recent refactoring of our temporary directory handling,
`no_clean` is only read prior to these `except` blocks. Since it's not
needed, remove it!
2020-02-23 14:28:59 -05:00
Pradyun Gedam e648e00dc0
pip is spelt all-lowercase 2020-02-18 10:55:16 +05:30
Paul Moore 6f154f5546
Merge pull request #7707 from pfmoore/refactor_options
Pass individual options to InstallRequirement rather than an options object
2020-02-07 14:22:10 +00:00
Paul Moore a9f1d8562b Pass individual options to InstallRequirement rather than an options object 2020-02-06 16:05:11 +00:00
Chris Hunt e7998a3617 Rename populate_requirement_set to get_requirements 2020-02-05 22:30:07 -05:00
Chris Hunt 543c84402d Remove unused requirement_set in commands 2020-02-05 22:30:07 -05:00
Chris Hunt de5ec7e884 Remove unused requirement_set argument 2020-02-05 22:30:07 -05:00
Chris Hunt e872d2bfb6 Make new RequirementSet in populate_requirement_set
Concentrates use of RequirementSet in individual commands so we can
eventually break it up.
2020-02-05 22:30:07 -05:00
Chris Hunt 9c58aa7eb5 Do not use InstallRequirement in warn_deprecated_install_options
This only needed a list of requirements, so give it just that.
2020-02-05 22:30:07 -05:00
Chris Hunt 779d8df5e6 Inline check_supported_wheels
Reduces our dependency on RequirementSet in individual commands.

The default value for this is True, used everywhere except
InstallCommand.
2020-02-05 22:30:07 -05:00
Chris Hunt 5dcc562616 Return a list of InstallRequirement from populate_requirement_set
Next we can hide RequirementSet from the setup phase of the individual
commands.
2020-02-05 22:30:07 -05:00
Chris Hunt fd815bc1fa Pass in a plain list of InstallRequirement to Resolver.resolve
Further simplifies the Resolver interface, and will give us the
opportunity to remove any knowledge of RequirementSet from the
individual commands.
2020-02-05 22:30:05 -05:00
Chris Hunt a814dc9f1f Centralize logic for getting 'all requirements' 2020-02-05 22:29:48 -05:00
Chris Hunt 550ae907bd Parameterize check_supported_wheels to Resolver.resolve
This reduces our dependence on the input RequirementSet.
2020-02-05 22:29:46 -05:00