Commit Graph

2530 Commits

Author SHA1 Message Date
Paul Moore 2a66ad1e2d Add an assertion to ensure we don't reuse the factory 2020-04-24 16:44:02 +01:00
Pradyun Gedam e6853336fe
Revert "Drop code for nicer diffs later"
This reverts commit f927f9ae39.
2020-04-24 19:57:58 +05:30
Paul Moore 7a54b2b3a8 Use is_direct rather than an explicit root parameter 2020-04-24 14:30:34 +01:00
Paul Moore 04bf571521 Ensure root requirement name is canonicalised 2020-04-24 14:30:34 +01:00
Pradyun Gedam 746f47cc3a
Factor out logic for getting weights 2020-04-24 17:27:40 +05:30
Tzu-ping Chung e03614fe6d Use req to populate candidate line instead of link
This ensures a candidate built from a "found" link (from e.g. index) is
categorized as specifier-based, not URL-based. This is important to
avoid a specifier-based candidate to be 'pip freeze'-ed in the direct
URL form due to PEP 610 (direct-url.json).
2020-04-24 19:14:00 +08:00
Paul Moore d605530b44 Implement upgrade strategies for the new resolver 2020-04-24 11:08:06 +01:00
Noah Gorny e212f66575 commands: cache: Abort early if cache is disabled 2020-04-24 12:57:13 +03:00
Pradyun Gedam f927f9ae39
Drop code for nicer diffs later 2020-04-23 07:04:28 +05:30
Pradyun Gedam 3fe1eab593
Reword get_installation_order docstring 2020-04-23 07:02:53 +05:30
Pradyun Gedam daff81124a
Merge pull request #8087 from pradyunsg/document-python-2-drop-date 2020-04-23 00:43:26 +05:30
Stefano Rivera 7fb9a9dbc5 Mark certifi as bundled, it's used in the debug command 2020-04-21 09:07:50 -07:00
Pradyun Gedam c46e16794d
Include month and year for pip 21.0
Co-Authored-By: Hugo van Kemenade <hugovk@users.noreply.github.com>
2020-04-21 08:22:47 +05:30
Pradyun Gedam 4502aba799
Bump for development 2020-04-21 00:31:45 +05:30
Pradyun Gedam 1626bb917b
Bump for release 2020-04-21 00:31:45 +05:30
Pradyun Gedam b5e2cc6264
Remove unused imports 2020-04-20 22:45:09 +05:30
Pradyun Gedam 7e61569b1a
Drop --skip-requirements-regex 2020-04-20 22:37:25 +05:30
Hugo cebac6aa6c Add 'pip cache dir' command to show the path to pip's cache directory 2020-04-20 11:48:36 +03:00
Devesh Kumar Singh 2b6113797d Remove Any type from run function 2020-04-20 03:29:47 +05:30
Devesh Kumar Singh 52f30a1c46 Add type for latest_info and fix type for iter_packages_latest_infos 2020-04-20 03:28:49 +05:30
Devesh Kumar Singh 3b35b416e9 Changed type of variadic args to Any and removed unneeded type ignore 2020-04-20 03:25:22 +05:30
Devesh Kumar Singh 35ea5a6d5f Remove Any type from run function 2020-04-20 03:19:43 +05:30
Pradyun Gedam a75f2fa31d
Document pip 21.0 as end of Python 2 support 2020-04-19 23:42:39 +05:30
Tzu-ping Chung 572d03b25b Always allow prereleases in is_satisfied_by() 2020-04-18 23:08:30 +08:00
Pradyun Gedam 97f639057e
Merge pull request #8014 from uranusjr/always-return-installed-candidate 2020-04-18 16:15:14 +05:30
Devesh Kumar Singh 18fd161c44 Fix pip config docstring to render correctly in docs 2020-04-18 01:03:19 +05:30
Tzu-ping Chung 510aa46580 Space after comma 2020-04-17 22:39:35 +08:00
Pradyun Gedam 6f7d5b9ae9
Merge pull request #8056 from pradyunsg/vendoring/april-2020 2020-04-17 01:35:31 +05:30
Tzu-ping Chung 9c97b285b9 Rename variable for clarity 2020-04-16 13:44:13 +08:00
Paul Moore 2f3a1be118
Merge pull request #8033 from pfmoore/messages
Make message more user friendly when unable to resolve
2020-04-15 19:43:53 +01:00
Pradyun Gedam 5bea530899
Change certifi version to 2020.04.05.1 2020-04-15 23:27:30 +05:30
Pradyun Gedam df9bbb403f
Fix bug in pip debug 2020-04-15 23:26:12 +05:30
Pradyun Gedam 101332f70f
Upgrade urllib3 to 1.25.8 2020-04-15 21:35:58 +05:30
Pradyun Gedam 812f2a9f5b
Upgrade idna to 2.9 2020-04-15 21:35:58 +05:30
Pradyun Gedam 05aae8f888
Upgrade certifi to 2020.4.5.1 2020-04-15 21:35:57 +05:30
Pradyun Gedam e94f93530f
Upgrade requests to 2.23.0 2020-04-15 21:35:55 +05:30
Pradyun Gedam d2439f7d99
Upgrade pyparsing to 2.4.7 2020-04-15 21:35:52 +05:30
Pradyun Gedam 8ce1872cdd
Upgrade pep517 to 0.8.2 2020-04-15 21:35:49 +05:30
Pradyun Gedam 2694496d26
Upgrade packaging to 20.3 2020-04-15 21:35:45 +05:30
Pradyun Gedam 8f2b7c6344
Upgrade msgpack to 1.0.0 2020-04-15 21:35:43 +05:30
Pradyun Gedam fc394ca52b
Upgrade distro to 1.5.0 2020-04-15 21:09:17 +05:30
Pradyun Gedam 2ece449217
Upgrade contextlib2 to 0.6.0.post1 2020-04-15 21:07:42 +05:30
Devesh Kumar Singh ae8391b4b7 Type annotations for completion and debug in commands 2020-04-15 01:17:53 +05:30
Pradyun Gedam e40d2670fa
Merge pull request #8045 from pradyunsg/pytoml-to-toml
Switch from `pytoml` to `toml`
2020-04-14 17:04:16 +05:30
Paul Moore 6a244de617
Merge pull request #8025 from catPill/fix-windows-writable-test
Fix Windows folder writable detection
2020-04-14 12:33:10 +01:00
Devesh Kumar Singh 02b3c68c76 Merge branch 'master' into add-mypy-annotations-commands 2020-04-14 16:35:49 +05:30
Devesh Kumar Singh 0470a82248 Type annotations for help, list and uninstall in commands 2020-04-14 16:07:13 +05:30
Paul Moore ea391b2aab Merge with master 2020-04-14 11:27:10 +01:00
Pradyun Gedam 8b359582de
Fix `vendored` calls 2020-04-14 15:16:04 +05:30
Pradyun Gedam 8b8fdd8429
Drop pytoml from vendored libraries 2020-04-14 13:07:20 +05:30
Pradyun Gedam 78f16daa27
Switch pip's use of pytoml -> toml 2020-04-14 13:07:17 +05:30
Pradyun Gedam 1f74437948
So... our vendoring of pep517 wasn't correct. :) 2020-04-14 13:00:29 +05:30
Pradyun Gedam a1af9d517d
Vendor toml 0.10.0 2020-04-14 12:59:54 +05:30
Pradyun Gedam 471bc0e2c3
Merge pull request #7962 from CrafterKolyan/patch-1
Speed up `pip list --outdated`
2020-04-14 02:28:28 +05:30
Pradyun Gedam 3c1cf3e139
Merge pull request #7885 from NoahGorny/cache-trusted-host
Cache trusted host
2020-04-14 02:26:28 +05:30
Devesh Kumar Singh 0e8093ec5c Type annotations for hash, show and wheel in commands 2020-04-14 01:18:09 +05:30
Pradyun Gedam f458573de6
Merge pull request #7882 from sbidoul/build-in-place-7555-sbi
Build local directories in place
2020-04-13 21:33:02 +05:30
Pradyun Gedam bdff935570
Merge pull request #6391 from duckinator/pip-cache
Add 'pip cache' command
2020-04-13 19:53:05 +05:30
Pradyun Gedam 92c9f8136a
Merge pull request #8004 from uranusjr/requires-python-error
New Resolver: Raise UnsupportedPythonVersion for Requires-Python mismatch
2020-04-13 19:42:51 +05:30
Pradyun Gedam d49fcab9f4
Merge pull request #8039 from uranusjr/new-resolver-reject-constraints-for-now
Block user from unfinished parts of the resolver
2020-04-13 19:37:36 +05:30
Pradyun Gedam 15f8a35e4b
Merge pull request #7887 from NoahGorny/pip-debug-print-vendored-versions
pip debug: Add versions of vendored libraries to output
2020-04-13 19:29:27 +05:30
Tzu-ping Chung f4f0a34053 Block user from unfinished parts of the resolver 2020-04-13 21:32:20 +08:00
Paul Moore 3642589903 Make message more user friendly when unable to resolve 2020-04-13 11:32:21 +01:00
Tzu-ping Chung 84b99c20b8 Canonicalize installed distribution keys 2020-04-13 18:05:24 +08:00
Nikolay Korolev f0ae64f959
Delete misleading line of code 2020-04-12 19:01:51 +03:00
ghost dbd2c2f760 Fix Windows folder writable detection 2020-04-12 20:38:43 +08:00
Stéphane Bidoul 873f1e6332
remove _copy_source_tree and friends 2020-04-12 12:00:57 +02:00
Stéphane Bidoul 88e6e6bc5c
build in place 2020-04-12 12:00:57 +02:00
Stéphane Bidoul 58295d0df7
Remove InstallRequirement source_dir parameter
source_dir is only passed to the InstallRequirement constructor
in the case of editable requirements, and it is built from link,
which is also passed to the same constructor. So we let
InstallRequirement compute source_dir, to remove that burden
from call sites.
2020-04-12 11:39:09 +02:00
Tzu-ping Chung 7f8bf5e677 Run vedoring 2020-04-11 11:17:24 +08:00
Tzu-ping Chung 74003e60ea Upgrade ResolveLib vendoring to 0.3.0 2020-04-11 11:16:00 +08:00
Noah Gorny e131c825d4 commands: debug: Add vendor library versions 2020-04-11 01:54:57 +03:00
Noah Gorny 972ef6f970 commands: debug: Print pip._vendor.DEBUNDLED info 2020-04-10 22:27:47 +03:00
Tzu-ping Chung d2028e9538 Implement RequiresPythonRequirement with context
This specialized class is able to carry more context information than
the previous implementation (which reuses ExplicitRequirement). Error
reports can thus provide better messages by introspecting.
2020-04-10 23:17:29 +08:00
Tzu-ping Chung 4e74a735d2 Run vendoring 2020-04-10 22:39:29 +08:00
Tzu-ping Chung 72204f2640 Upgrade ResolveLib vendoring definition 2020-04-10 22:11:15 +08:00
Pradyun Gedam 8cca170ceb
Merge pull request #7976 from uranusjr/installed-candidate-equal
New Resolver: Implement equality on candidate classes
2020-04-10 18:57:56 +05:30
Pradyun Gedam 9cbe8fbdd0
Merge pull request #7978 from sbidoul/remove-pip-egg-info-sbi
Generate legacy metadata in temporary directory
2020-04-10 18:57:13 +05:30
Pradyun Gedam 81f1054865
Merge pull request #7873 from hroncok/no_copy_self
Prevent infinite recursion with pip wheel with $TMPDIR in $PWD
2020-04-10 18:56:31 +05:30
Tzu-ping Chung cfac6aebdd Always return an install candidate last if matches
This rewrites how a SpecifierRequirement generates candidates, so it

* Always return an AlreadyInstalledCandidate (as long as the version
  satisfies the specifier), even if PackageFinder does not return a
  candidate for the same version.
* Always put the AlreadyInstalledCandidate last, so it's preferred over
  LinkCandidate, preventing version changes if possible.
2020-04-10 20:51:06 +08:00
Paul Moore 6c97645e2f
Merge pull request #8000 from uranusjr/new-resolver-normal-test-progress
New Resolver: Make sure candidates are prepared after resolution
2020-04-10 11:56:56 +01:00
Paul Moore c7bde5bf88
Merge pull request #7990 from uranusjr/resolver-installed-2
New Resolver: Correctly uninstall existing distribution before installing
2020-04-09 20:58:17 +01:00
Nikolay Korolev 3acf8b7e4b
Merge branch 'master' into patch-1 2020-04-09 15:48:56 +03:00
Tzu-ping Chung d5e45bb59a Remove the version part from the dist-info stem 2020-04-09 20:28:28 +08:00
Pradyun Gedam c5da021142
Merge pull request #7959 from hrnciar/remove-shebang-from-nonexecutable-script
Remove shebang from nonexecutable script
2020-04-09 17:26:34 +05:30
Pradyun Gedam c8e4afac57
Merge pull request #7977 from deveshks/add-mypy-annotations-commands
Added type annotations to pip._internal.commands.check
2020-04-09 17:15:59 +05:30
Pradyun Gedam ea1295b720
Merge pull request #7965 from deveshks/warn-on-invalid-index-url
Warn if an invalid URL is passed with --index-url
2020-04-09 17:15:47 +05:30
Xavier Fernandez ea9cb06c49
Merge pull request #7988 from McSinyx/tabulate
Fix tabulate col size in case of empty cell
2020-04-09 13:35:16 +02:00
Tomas Hrnciar b438d47344 Remove shebang from nonexecutable script
When packaging pip in Fedora, we have realised
that there is a nonexecutable file with a shebang line.

It seems that the primary purpose of this file is to be imported from Python
code and hence the shebang appears to be unnecessary.

Shebangs are hard to handle when doing downstream packaging because it makes
sense for upstream to use `#!/usr/bin/env python` while in the RPM package, we
need to avoid that and use a more specific interpreter. Since the shebang was
unused, I propose to remove it to avoid the problems.

We have found more shebangs but in vendored packages. I have also opened PRs there:
https://github.com/ActiveState/appdirs/pull/144
https://github.com/psf/requests/pull/5410
https://github.com/chardet/chardet/pull/192

x
2020-04-09 11:53:21 +02:00
Tzu-ping Chung 56e065f956 Move dist preparation to its own method 2020-04-09 02:27:37 +08:00
Tzu-ping Chung a7d17f8da6 Make sure candidates are prepared after resolution 2020-04-08 23:38:10 +08:00
Tzu-ping Chung be60eaaa4f Uninstall existing dist before reinstallation 2020-04-08 17:17:25 +08:00
Tzu-ping Chung 90ce7c9edd Refactor to prepare for upgrade procedures 2020-04-08 17:17:25 +08:00
Tzu-ping Chung 591d476fca Note on why we don't implement equality 2020-04-08 16:38:47 +08:00
Tzu-ping Chung 018c051a8e Implement equality on candidate classes 2020-04-08 16:38:47 +08:00
Xavier Fernandez 327a31536f
Merge pull request #7729 from cosmicexplorer/cache-parse-links
Cache parse_links() by --find-links html page url
2020-04-08 10:33:24 +02:00
Paul Moore bd912cf0de
Merge pull request #7993 from uranusjr/new-resolver-normal-test-progress
Canonicalise project name from InstallationCandidate
2020-04-08 09:12:50 +01:00
Danny McClanahan 6e7b16cec4
add failing test ; apply the fix ; add template NEWS entry
add failing test

apply the fix

add template NEWS entry according to https://pip.pypa.io/en/latest/development/contributing/#news-entries (wrong PR #)

rename news entry to the current PR #

respond to review comments

fix test failures

fix tests by adding uuid salt in urls

cache html page fetching by link

make CI pass (?)

make the types much better

finally listen to the maintainer and cache parse_links() by url :)

avoid caching parse_links() when the url is an index url

cleanup

add testing for uncachable marking

only conditionally vendor _lru_cache for py2

bugfix => feature

python 2 does not cache!

Do away with type: ignore with getattr()

respond to review comments
2020-04-07 12:01:43 -07:00
Stéphane Bidoul 030578ef04
Remove unused argument from generate_metadata 2020-04-07 17:01:08 +02:00
Stéphane Bidoul 34adf0a258
Simplify make_setuptools_egg_info_args 2020-04-07 17:01:08 +02:00
Stéphane Bidoul da2ab6b829
Simplify legacy metadata generation
Always generate legacy metadata in a
temporary directory, even in the editable
case. Generating it in the source directory
did not add value, because setup.py develop
always regenerates the .egg-info directory.
2020-04-07 17:01:08 +02:00
Tzu-ping Chung 6d40804b12 Add __repr__ to requirement/candidate models 2020-04-07 20:53:25 +08:00
Tzu-ping Chung b89e1c2fb4 Canonicalize InstallationCandidate name
Caught by test_single_download_from_requirements_file etc.
2020-04-07 19:05:26 +08:00
Tzu-ping Chung 2f36ac7587 Add assertion message for easier debugging 2020-04-07 19:02:17 +08:00
Nguyễn Gia Phong 26b76f6f11 Move tabulate to utils.misc and test it 2020-04-07 17:35:47 +07:00
Devesh Kumar Singh efd6dd28d0 Address review comments 2020-04-07 09:44:36 +05:30
Paul Moore 2b3d0a5cc0
Merge pull request #7983 from uranusjr/install-req-editable-type-fix
Accept InstallRequirement as comes_from
2020-04-06 14:48:26 +01:00
Nguyễn Gia Phong c2aa573107 Fix tabulate col size in case of empty cell
Previously, the size is no less than len(str(None)) == 4.
This commit also add type hint and docstring to the function.
2020-04-06 17:56:49 +07:00
Devesh Kumar Singh 4c70c6d350 Warn if an invalid URL is passed with --index-url 2020-04-06 10:57:50 +05:30
Pradyun Gedam eb865b4e10
Merge pull request #7955 from deveshks/pip-list-not-contain-pkg-work-dir
Don't list packages in current directory
2020-04-05 21:13:14 +05:30
Devesh Kumar Singh feac595446 Don't use cwd in python -m pip command 2020-04-05 19:59:05 +05:30
Stéphane Bidoul bf8e6bc785
Generate legacy metadata in temporary directory
Before it was generated in a pip-egg-info
subdirectory of the source dir. This will avoid
polluting source dir when we build in place.
2020-04-05 11:23:57 +02:00
Tzu-ping Chung 74c5042052 Accept InsatllRequirement as comes_from 2020-04-05 12:17:25 +08:00
Paul Moore d9b3a7cc32
Merge pull request #7979 from uranusjr/editable
Implement editable candidate
2020-04-04 23:22:55 +01:00
Devesh Kumar Singh c2fdf4a35b Add mypy annotations to pip._internal.commands.check 2020-04-05 01:56:05 +05:30
Ricky Ng-Adam 45d5b377ab elaborate on type of links supported 2020-04-04 10:22:02 -04:00
Tzu-ping Chung aead201fda No need to think about editable for installed dist 2020-04-04 21:53:04 +08:00
Tzu-ping Chung 05f7dbd0c8 Type hint hacks 2020-04-04 18:15:26 +08:00
Tzu-ping Chung 2430aba879 Implement editable candidate 2020-04-04 17:51:43 +08:00
Tzu-ping Chung 3b06cb6b53 Refactor ireq-related operations to base class 2020-04-03 21:33:16 +08:00
Paul Moore d53d3d6b24 Use the name/version from the InstallationCandidate 2020-04-03 11:23:35 +01:00
Nikolay Korolev 5cccd4ef6b Change ThreadPool to Pool 2020-04-03 09:07:09 +03:00
Nikolay Korolev 9b9e137d1d Update comment 2020-04-02 22:01:22 +03:00
Nikolay Korolev 6b8c191ee2 Update comment 2020-04-02 21:57:10 +03:00
Nikolay Korolev f695354bf8 Add commentary 2020-04-02 21:55:34 +03:00
Tzu-ping Chung 7511737ee7 AlreadyInstalledCandidate 2020-04-03 01:27:34 +08:00
Tzu-ping Chung f061f3f691 Fetch install dist for a candidate if available
The candidate creation logic is further moved into the factory. The
factory would use pkg_resources.get_distribution() to find a matching
distribution for a givan InstallationCandidate. If found, the Candidate
would be created based on that found distribution, instead of the link.

--ignore-installed is implemented as to always use the link to create
candidates, even if an installed distribution is found.
2020-04-03 00:36:26 +08:00
Nikolay Korolev 03bfdbcc58 Refactoring. Rename inner function 2020-04-02 17:15:47 +03:00
Tzu-ping Chung 9ca2240530 More clarification on the name 2020-04-02 21:42:29 +08:00
Nikolay Korolev ccb0b5cc08 Lazier calculations 2020-04-02 16:38:54 +03:00
Nikolay Korolev 1d4fc03fe2 Change Pool to ThreadPool and fix minor closing 2020-04-02 16:20:09 +03:00
Nikolay Korolev 829a3b20c4 Fix Python 2 compatibility 2020-04-02 15:58:28 +03:00
Nikolay Korolev f8e2b5d5a0 Make indent_log thread-safe 2020-04-02 15:58:28 +03:00
Nikolay Korolev 957c093a10 Speed up pip list --outdated 2020-04-02 15:58:27 +03:00
Tzu-ping Chung 65ffd338f4 Explain how Requires-Python matching works 2020-04-02 19:02:20 +08:00
Tzu-ping Chung 190c424b1e Implement Python as a dependency
If a dist contains Requires-Python metadata, it is converted into a
Requirement for the resolver based on whether the Requires-Python
is compatible or not.

If it is compatible, an ExplicitRequirement is returned to hold the
Python information (either sys.version_info, or the user-supplied
--python-version).

If it is incompatible, a special NoMatchRequirement is returned, which
never matches to anything, generating a ResolutionImpossible to report
the Python version incompatibility.

The --ignore-requires-python flag is implemented as to not return a
Requirement for Requires-Python at all.
2020-04-02 18:36:08 +08:00
Paul Moore 2a1f3c22a6
Merge pull request #7910 from uranusjr/resolver-refactor-factory
Second round of resolver refactor factory
2020-04-02 11:27:04 +01:00
Stéphane Bidoul 196706d305
Better freeze using direct_url.json 2020-04-01 22:57:00 +02:00
Stéphane Bidoul a0ed759fb3
Add direct_url support to InstallRequirement
pass it to install_wheel via install
2020-04-01 22:57:00 +02:00
Stéphane Bidoul 94b77130aa
Add WheelCache method to inform which cache was used
Return whether the link was found in the persistent or ephemeral cache.
2020-04-01 22:57:00 +02:00
Stéphane Bidoul f77944733d
Add DirectUrl support to install_wheel 2020-04-01 22:56:59 +02:00
Stéphane Bidoul bd4d52b09c
Add helper to get DirectUrl metadata from Distrribution 2020-04-01 22:56:59 +02:00
Stéphane Bidoul 88582c2564
Add helper to create a DirectUrl from a Link 2020-04-01 22:56:59 +02:00
Stéphane Bidoul 6f689f61db
Add helper to convert DirectUrl to PEP 440 direct reference 2020-04-01 22:56:59 +02:00
Stéphane Bidoul 6b7f4ce81b
Add DirectUrl model, implementing PEP 610 2020-04-01 22:56:59 +02:00
Ellen Marie Dash e804aa56af [commands/cache] Have `pip cache info` raise an exception if it gets any arguments. 2020-04-01 16:54:42 -04:00
Ellen Marie Dash e1fde1faca [commands/cache] Remove unnecessary re-definition of __init__. 2020-04-01 16:54:42 -04:00
Ellen Marie Dash d57407a37d [commands/cache] Make _find_wheels(), and this `pip cache {list,remove}` behave more predictably. 2020-04-01 16:54:42 -04:00
Ellen Marie Dash ed9f885bd7 [commands/cache] Reformat output of `pip cache info`
Co-Authored-By: Pradyun Gedam <pradyunsg@gmail.com>
2020-04-01 16:54:42 -04:00
Ellen Marie Dash 63ba6cce4a [command/cache, utils/filesystem] Use existing format_size; remove _friendly_size; rename friendly_*_size to format_*_size for consistency. 2020-04-01 16:54:42 -04:00
Ellen Marie Dash 8cd8c91491 [commands/cache] Reformat (more) documentation.
Co-Authored-By: Pradyun Gedam <pradyunsg@gmail.com>
2020-04-01 16:54:42 -04:00
Ellen Marie Dash 735375fb6b [commands/cache] Reformat documentation.
Co-Authored-By: Pradyun Gedam <pradyunsg@gmail.com>
2020-04-01 16:54:42 -04:00
Ellen Marie Dash 03d5ec10f2 [utils/filesystem] Reformat comment to keep lines <79 characters long. 2020-04-01 16:54:42 -04:00
Ellen Marie Dash f22f69e9bd [utils/filesystem] Convert `size` to float, for consistent behavior between Py2 and Py3. 2020-04-01 16:54:42 -04:00
Ellen Marie Dash d9dc76e909 [commands/cache] Correct argument name in documentation for `pip cache list`. 2020-04-01 16:54:42 -04:00
Ellen Marie Dash 10d13762eb [commands/cache] Be explicit about `pip cache` only working on the wheel cache. 2020-04-01 16:54:42 -04:00
Ellen Marie Dash 6fa8498e18 [commands/cache] Avoid use of "(s)" suffix.
As @hugovk pointed out, it can cause problems sometimes:

https://github.com/pypa/pip/pull/6391#discussion_r366259867
2020-04-01 16:54:42 -04:00
Ellen Marie Dash 2d978309a2 [commands/cache] Minor clean-up.
- Consistently use singular 'cache' (not plural 'caches').
- Remove unnecessary uses of the word 'currently'.
- Use 'file(s)' instead of 'files', to account for case of only one file.
- Use .format() when appropriate.
- Minor cleanup of `pip cache`-related files in docs/.
2020-04-01 16:54:42 -04:00
Ellen Marie Dash 554133a90e [commands/cache] Add file size information. 2020-04-01 16:54:42 -04:00
Ellen Marie Dash 61a0adcfe7 [commands/cache] Add missing type annotation. 2020-04-01 16:54:04 -04:00
Ellen Marie Dash 61dd0bc16c [commands/cache] Use location of wheel cache dir specifically. 2020-04-01 16:54:04 -04:00
Ellen Marie Dash c838a67178 [commands/cache] Change pattern suffix from -*.whl to *.whl. 2020-04-01 16:54:04 -04:00
Ellen Marie Dash 9563dfb526 [commands/cache] Refactor get_cache_info(). 2020-04-01 16:54:03 -04:00
Ellen Marie Dash 50604be6c4 [commands/cache] Raise errors if wrong number of args.
Also add tests for purge_cache, since I apparently forgot those before.
2020-04-01 16:54:03 -04:00
Ellen Marie Dash 8ae71adbea [commands/cache] Add docs for 'pip cache' command. 2020-04-01 16:54:03 -04:00
Ellen Marie Dash c59ced6942 [commands/cache] More refactoring of cache command 2020-04-01 16:54:03 -04:00
Ellen Marie Dash b9b29b8c10 [commands/cache] fix 'pip cache info'; don't hide python/abi/platform tags. 2020-04-01 16:54:03 -04:00
Ellen Marie Dash b0e7b66326 [commands/cache] Refactor + fix linting failures. 2020-04-01 16:54:03 -04:00
Ellen Marie Dash 04c0b0e6eb Add 'pip cache' command. 2020-04-01 16:54:03 -04:00
Paul Moore 657cf2515b
Merge pull request #7929 from McSinyx/tmp-file
Use better temporary files mechanism
2020-04-01 16:47:30 +01:00
Nguyễn Gia Phong 209c74f690 Use better temporary files mechanism 2020-04-01 22:02:34 +07:00
Pradyun Gedam 7b02273f3e
Merge pull request #7927 from deveshks/raise-exception-if-rev-empty-git-url
Raise an exception if revision is empty in git url
2020-04-01 18:17:36 +05:30
Tzu-ping Chung d29c86af98 Add method to create requirement from spec 2020-04-01 16:53:39 +08:00
Tzu-ping Chung 4491f38047 Return Requirement directly from get_dependencies
This is possible now we have the factory construct.
2020-04-01 15:31:52 +08:00
Tzu-ping Chung e06048cb8b Aggregate helper usages into factory object
This prevents us from having to hold multiple references of
finder/preparer/make_install_req in each requirement/candidate class.
Instead we just pass around the factory object, and let others use the
instances on it.
2020-04-01 15:31:52 +08:00
Pradyun Gedam 0f7fac3a3d
Merge pull request #7801 from uranusjr/yanked-link-refactor
Move wheel cache out of InstallRequirement
2020-03-31 15:14:37 +05:30
Tzu-ping Chung 4a453e12d4 Reword docstring to match code 2020-03-31 01:31:11 +08:00
Tzu-ping Chung 799ffcbfe1 One arg per line 2020-03-31 01:29:15 +08:00
Devesh Kumar Singh 0d2ca67729 Changed ValueError to InstallationError 2020-03-30 22:29:40 +05:30
Pradyun Gedam 57cb941645
Merge pull request #7891 from deveshks/ignore-uninstall-error-if-easy-install-missing
Don't fail uninstallation if easy-install.pth doesn't exist
2020-03-30 21:42:38 +05:30
cjc7373 c388315bc0 Clarify the usage of --no-binary and --only-binary command 2020-03-30 16:57:24 +02:00
Tzu-ping Chung 6db0df928c Move wheel cache out of InstallRequirment 2020-03-30 17:36:03 +08:00
Devesh Kumar Singh 106bd0d77f Raise an exception if revision is empty in git url 2020-03-29 12:04:48 +05:30
Tzu-ping Chung 4ae50f9af7 Remove unused preparer from SpecifierRequirement 2020-03-27 19:00:27 +08:00
Noah Gorny 544c307ebf session: Always cache responses from trusted-host source
news: Add news about default behaviour change
2020-03-26 21:29:18 +02:00
Noah Gorny 65a9bec7a4 session: Add InsecureCacheControlAdapter 2020-03-26 21:15:38 +02:00
Noah Gorny c936ed0165 session: Rename _insecure_adapter to _trusted_host_adapter
Currently it is just the insecure adapter, but this can change in the future
2020-03-26 21:15:38 +02:00
Noah Gorny f1a8bd4ad6 session: Fix comment about add_insecure_host, rename to add_trusted_host 2020-03-26 21:15:38 +02:00
Tzu-ping Chung 07563847b0 Decouple candidate and requirement modules
This introduces a new module "factory" that contains all methods dealing
with producing candidates/requirements from an input
requirement/candidate. This allows both models to know nothing about
each other, and simply rely on the intermediate to produce the other.

I *believe* this also helps us reduce merge conflicts due to adding
arguments to those producer functions, since now we only need to modify
the factory, and exactly one of candidate/requirement.

This is only part of a big scheme--the plan is to also move
Candidate.get_dependencies() and Requirement.find_matches() into the
factory class, so they can avoid holding and passing around finder,
preparer, and make_install_req. This is also necessary to change the
return type of Candidate.get_dependencies() to Requirement without
hard-coupling.
2020-03-27 03:14:51 +08:00
Paul Moore fea9766fa2 Merge branch 'master' into new_resolver_extras 2020-03-26 15:49:43 +00:00
Paul Moore 4f64052676
Merge pull request #7888 from uranusjr/resolver-progress
Implement ignore_dependencies in new resolver
2020-03-26 15:45:21 +00:00
Paul Moore a68345e81c Warn if invalid extras are given 2020-03-26 14:53:24 +00:00
Paul Moore 7e97cf6426 Ignore invalid extras 2020-03-26 11:57:34 +00:00
Paul Moore 67bf5890ea Document the ExtrasCandidate class 2020-03-26 11:56:46 +00:00
Paul Moore ffb56db5dd Allow candidates to not have an associated install requirement 2020-03-26 11:19:10 +00:00
Paul Moore d79aacc61c Forgot to run lint before pushing again :-( 2020-03-25 12:39:21 +00:00
Paul Moore bd0f7fe346 Add an ExtrasCandidate class 2020-03-25 12:27:24 +00:00
Paul Moore 76de49bc24 Make a proper get_install_requirement method for candidates 2020-03-25 12:27:24 +00:00
Devesh Kumar Singh 4264d5e0d3 Don't fail uninstallation if easy-install.pth doesn't exist 2020-03-24 17:08:44 +05:30
Xavier Fernandez d43699b111 Move darwin special config dir to pip wrapper 2020-03-23 19:31:07 +01:00