Maxim Kurnikov
58e2a99ccf
remove disallow_untyped_defs=False for most of pip._internal.cli modules
2019-12-13 09:58:52 +03:00
Chris Hunt
7dea92e5b3
Replace already_downloaded_path with existence check
...
These statements are equivalent, so we exchange them. This will make it
easier to factor the download_dir concerns out of these functions.
2019-12-13 00:46:44 -05:00
Pradyun Gedam
8e7a87bf4b
Factor out pep517 wheel build function ( #7473 )
2019-12-13 04:26:44 +00:00
Chris Hunt
6b0a79501c
Assert that target file does not exist
...
_check_download_dir will only return a falsy value if either:
* the provided path does not exist
* the hash does not match - in which case the file is unlinked
so the file cannot exist at either of these points.
2019-12-12 21:18:03 -05:00
Christopher Hunt
d7eaede434
Revert "Add new option: pip wheel --save-wheel-names ( #6377 )" ( #7420 )
...
This reverts commit bcad1b1cb5
, reversing
changes made to f86490317a
.
As discussed, we should rethink the interface of this command output as
part of larger CLI usability review. In the interim, the same
functionality can be achieved using straightforward shell commands.
2019-12-13 07:57:05 +08:00
Stéphane Bidoul (ACSONE)
339e061e6b
Don't pass req to _build_wheel_pep517
2019-12-12 23:46:05 +01:00
Stéphane Bidoul (ACSONE)
2eff06e7cc
Make WheelBuilder should_unpack argument explicit
2019-12-12 23:46:05 +01:00
Stéphane Bidoul (ACSONE)
deb322d7b7
Move pep517 wheel build method to standalone function
2019-12-12 23:45:45 +01:00
Maxim Kurnikov
b69560661b
remove disallow_untyped_defs=False for pip._internal.distributions, pip._internal.operations.prepare
2019-12-12 21:35:37 +01:00
Chris Hunt
fe320a3da0
Remove redundant build_dir normalization
2019-12-12 21:46:04 +08:00
Chris Hunt
95c3f632e3
Handle build dir normalization in cmdoptions
...
Technically this changes behavior in DownloadCommand, which does not
make build_dir absolute, but given that it is used the same way as in
InstallCommand and WheelCommand (which do make it absolute), it should
not have any visible impact.
2019-12-12 21:46:04 +08:00
Chris Hunt
b6e007c6a8
Remove redundant src_dir normalization
2019-12-12 21:46:04 +08:00
Chris Hunt
a046c4f0c3
Handle making --src-dir absolute at option declaration
...
This will let us reduce duplication of this option normalization in a
few of our commands.
2019-12-12 21:46:04 +08:00
Pradyun Gedam
ce5edd4841
Better workaround for cache poisoning ( #3025 , #7319 )
2019-12-12 11:28:57 +00:00
Paul Moore
8eb3bdbd69
Merge pull request #7471 from pfmoore/runpy_comment
...
Add a comment showing how to call main using runpy
2019-12-12 11:22:27 +00:00
Paul Moore
241a3cb6f2
Update wording based on review comments
2019-12-12 10:50:58 +00:00
Maxim Kurnikov
38fd95aa6a
update to mypy==0.750
2019-12-12 11:08:36 +01:00
Paul Moore
80836a4cae
Remove non-ASCII character in comment
2019-12-12 09:31:13 +00:00
Paul Moore
8b87f8728a
Add a comment showing how to call main using runpy
2019-12-12 09:10:51 +00:00
Remi Rampin
04d8841ace
Update links in docs
2019-12-11 22:23:34 +01:00
toonarmycaptain
17075cc17f
Update README.rst correcting grammar.
...
`there is several` should be `there are several`
2019-12-11 09:26:54 +08:00
Chris Hunt
355c303e12
Lazy evaluate has_tls result
...
This avoids an unnecessary unconditional import of ssl and urllib3 in
compat.
2019-12-09 20:48:58 +08:00
Chris Hunt
f4e40d7a09
Wrap HAS_TLS in a function
...
Next we'll refactor the value to be computed lazily.
2019-12-09 20:48:58 +08:00
Chris Hunt
6343e8093f
Replace atexit with globally-managed tempdir
2019-12-09 06:06:37 +08:00
Chris Hunt
d6b509d7c6
Set up global tempdir manager in BaseCommand
...
This ensures that the resource is available for the lifetime of the
program.
2019-12-09 06:06:37 +08:00
Chris Hunt
0457826bd0
Add global TempDirectory manager
...
In cases where there is not a clear scope, or where enforcing a scope
and passing a temp directory to callees creates unnecessary coupling
between components, this will let us tie the lifetime of temporary
directories to the lifetime of the application without using e.g.
atexit or finalizers.
This has the benefit of being easier to test and reason about.
2019-12-09 06:06:37 +08:00
Chris Hunt
cf743dd245
Remove unnecessary unlink in unpack_http_url
...
The file is downloaded into a TempDirectory which will get cleaned up at
the end of the `with` block, so no need to explicitly unlink the file.
2019-12-08 22:33:51 +01:00
Christopher Hunt
2013753525
Read record file once during legacy install ( #7452 )
2019-12-09 04:55:51 +08:00
Pradyun Gedam
a1b0b9274f
Update warning tense: the next pip will be released after Pytho… ( #7448 )
2019-12-07 17:33:24 +00:00
Pradyun Gedam
edb59e12e9
Added a note about # noqa comments in the Getting Started Guide ( #7446 )
2019-12-07 17:29:53 +00:00
Hugo
0c65a9e2a3
The next pip will be released after Python 2.7's EOL
2019-12-07 11:20:17 +02:00
Preet Thakkar
4abe2f708f
added newline at end of news file
2019-12-06 15:29:36 +05:30
Preet Thakkar
682eafe546
added news file
2019-12-06 15:23:39 +05:30
Preet Thakkar
cc96315273
Added note about # noqa in getting-started.rst
2019-12-06 15:10:33 +05:30
Xavier Fernandez
5e46429bfb
Merge pull request #7441 from chrahunt/refactor/operations-prepare-3
...
Move Downloader construction out of RequirementPreparer
2019-12-06 10:25:02 +01:00
Chris Hunt
24d2f1e719
Remove unused arguments
2019-12-05 20:29:43 -05:00
Chris Hunt
7db57478a2
Construct Downloader outside RequirementPreparer
...
Reduces RequirementPreparer responsibilities, and will let us get rid of
some constructor arguments.
2019-12-05 20:26:53 -05:00
Xavier Fernandez
58435d1efe
Merge pull request #7434 from chrahunt/refactor/remove-conflicts-with-1
...
Replace InstallRequirement.conflicts_with with InstallRequirement.should_reinstall
2019-12-05 12:56:41 +01:00
Pradyun Gedam
7ed66b2c94
Merge pull request #7431 from chrahunt/refactor/operations-prepare-2
...
Move operations.prepare.Downloader (and friends) to network.download.Downloader
2019-12-05 11:11:19 +00:00
Xavier Fernandez
9ccbfcefcc
Merge pull request #7433 from chrahunt/refactor/extract-editable-legacy
...
Extract InstallRequirement.install_editable into operations.install
2019-12-05 11:17:01 +01:00
Chris Hunt
65ac79571b
Justify lack of encoding when reading record file
2019-12-05 10:32:37 +01:00
Chris Hunt
48ddd0b111
Inline InstallRequirement.move_wheel_files
...
This makes InstallRequirement simpler and will make it easier to
refactor InstallRequirement.install.
2019-12-05 10:17:49 +01:00
Chris Hunt
ce42b132ba
Remove unused member InstallRequirement.conflicts_with
2019-12-04 22:57:05 -05:00
Chris Hunt
d098f27d3f
Use should_reinstall flag instead of conflicts_with
...
A boolean flag is simpler to reason about than a complex type like
`conflicts_with`.
In all of these situations `conflicts_with` was being assigned a
non-None value and only being checked for truthyness, so a bool is
sufficient to capture the required usages.
2019-12-04 22:53:58 -05:00
Chris Hunt
331716a439
Don't use conflicts_with in logging
...
InstallRequirement.uninstall doesn't actually use conflicts_with, so
don't log it. Instead we output the requirement name so we still have
something that looks like a heading before indenting the log, and log
what we actually uninstall inside the function.
This will also enable us to get rid of conflicts_with.
2019-12-04 22:43:33 -05:00
Chris Hunt
27fee83065
Add docstrings
2019-12-04 22:23:37 -05:00
Chris Hunt
83b2acf032
Move InstallRequirement.install_editable into operations.install
...
This makes InstallRequirement simpler and overall makes it easier to
track how the parts of InstallRequirement are being used for the phases
of package processing.
2019-12-04 22:23:33 -05:00
Chris Hunt
a4fc8d0e7e
Parameterize InstallRequirement.install_editable
...
This makes it easier to extract the function without keeping references
to InstallRequirement.
2019-12-04 22:03:10 -05:00
Chris Hunt
78a221cf71
Move Downloader to network.download
...
This will help us move Downloader construction out of
RequirementPreparer, reducing its concerns and making it easier to test
in isolation.
2019-12-04 18:31:53 -05:00
Chris Hunt
3a2ff979de
Move _http_get_download to network.download
2019-12-04 18:31:53 -05:00