Danny McClanahan
8bbeb829cb
Merge 227d8e8dd2
into a15dd75d98
2023-11-29 21:12:11 +08:00
Stéphane Bidoul
76a8c0f265
Postpone deprecation of legacy versions and specifiers
2023-10-08 18:17:05 +02:00
Jonathan Helmus
eb096b126e
use .metadata distribution info when possible
...
When performing `install --dry-run` and PEP 658 .metadata files are
available to guide the resolve, do not download the associated wheels.
Rather use the distribution information directly from the .metadata
files when reporting the results on the CLI and in the --report file.
- describe the new --dry-run behavior
- finalize linked requirements immediately after resolve
- introduce is_concrete
- funnel InstalledDistribution through _get_prepared_distribution() too
2023-09-14 13:24:43 -04: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
Pradyun Gedam
bc96473b9a
Ignore optional (`extra`) dependencies in `pip check`
...
This preserves the current behaviour and avoids failures due to optional
dependencies in the graph.
2023-01-09 16:15:37 +00:00
Jon Dufresne
0a06106d18
Remove unnecessary TYPE_CHECKING guards around packaging imports
...
Unnecessary since: 76cd70ac42
2021-09-26 10:42:38 -07:00
Tzu-ping Chung
135faabfd6
Remove direct pkg_resource usages from resolver and preparer
2021-08-23 02:07:33 +08:00
Pradyun Gedam
94999255d5
Reformat the codebase, with black
2021-08-20 13:37:49 +01:00
harupy
93db97c383
convert type comments
2021-07-23 23:29:29 +09:00
Tzu-ping Chung
d4d2445350
Remove get_installed_distributions usages
...
The function itself is kept for now because it's currently used to test
the pip.metadata subpackage...
2021-07-22 23:22:12 +08:00
Tzu-ping Chung
c76e9c4d8e
Reduce diff
2021-03-15 14:53:14 +08:00
Tzu-ping Chung
56a8f3d8bd
Typing fixes
2021-03-10 16:40:58 +08:00
Jon Dufresne
0945809afc
Remove typing.TYPE_CHECKING guards
...
The typing module has been available since Python 3.5. Guarding the
import has been unnecessary since dropping Python 2.
Some guards remain to either:
- Avoid circular imports
- Importing objects that are also guarded by typing.TYPE_CHECKING
- Avoid mypy_extensions dependency
2021-02-19 18:34:21 -08:00
Jon Dufresne
a6392bd62e
Replace pip._internal.utils.typing with stdlib typing
...
The stdlib module has been available since Python 3.5 and the
TYPE_CHECKING constant has been available since 3.5.2.
By using stdlib, this removes the need for pip to maintain its own
Python 2 typing compatibility shim.
2021-02-18 19:09:13 -08:00
Tzu-ping Chung
806c112ed0
Don't crash on 'check' when METADATA is missing
2020-09-28 14:28:53 +08:00
Pradyun Gedam
58c594c06b
Prepare isort for black
2020-09-23 21:47:47 +05:30
Pradyun Gedam
25ab172b55
Update linter: isort
2020-09-23 19:52:28 +05:30
Pradyun Gedam
e3e916be8d
Add a dedicated type for check_install_conflicts
2020-07-16 01:38:36 +05:30
Devesh Kumar Singh
245bcd0456
Check should_ignore in if condition and remove function creation
2020-07-03 12:27:13 +05:30
Devesh Kumar Singh
65e55e2540
Type annotations for pip._internal.operations.check
2020-07-03 12:27:13 +05:30
Tzu-ping Chung
1ea7a05df6
One more found by grepping
2020-01-07 20:49:55 +05:30
Maxim Kurnikov
3692097cca
add per-file disallow_untyped_defs=False, and set it to True globally
2019-09-29 23:31:15 +02:00
Pradyun Gedam
40a0f189b9
Enable check-builtin-literals
2019-09-24 18:03:22 +05:30
Pradyun Gedam
f377148f6d
Use mypy's inline configuration syntax for opt-outs
2019-07-30 12:39:51 +05:30
Pradyun Gedam
7908973c07
Rename AbstractDistribution.dist()
...
Use a more descriptive name get_pkg_resources_distribution()
2019-06-16 05:28:55 +05:30
Pradyun Gedam
534a102564
Rename make_abstract_dist
...
Use a more descriptive name make_distribution_for_install_requirement()
2019-06-16 05:23:16 +05:30
Pradyun Gedam
d43e31802b
Add distributions sub-package for holding build logic
...
This moves the DistAbstraction logic into a dedicated 'distributions'
sub-package, with separated modules for the concrete implementations of
various distribution handling logic.
2019-06-14 23:27:42 +05:30
Maxim Kurnikov
f77b8ca051
remove #noqa: F401
2019-02-22 14:17:07 +03:00
Pradyun Gedam
f9b66cacb3
Stop passing finder to DistAbstraction.dist
2019-01-02 17:27:34 +05:30
Maxim Kurnikov
7ee388178a
Add type annotations for pip._internal.operations ( #6066 )
...
References https://github.com/pypa/pip/issues/4748 , https://github.com/pypa/pip/pull/6038 .
2018-12-17 16:41:47 +05:30
Thomas Kluyver
4286f49d6d
Arrange imports as required by linter
2018-10-02 14:25:42 +02:00
Thomas Kluyver
9a1194e4be
Exit 'pip check' with code 1 on problems parsing requirements
2018-10-02 12:38:16 +02:00
Thomas Kluyver
172a71b0cf
Log warning when there's a problem parsing requirements
2018-10-02 12:03:26 +02:00
Thomas Kluyver
cfac80f374
Catch errors parsing requirements to check packages
2018-10-02 12:00:53 +02:00
Pradyun Gedam
8a565aac75
Sort imports as per newer isort
2018-06-27 12:53:31 +05:30
Pradyun Gedam
161e8bd210
Switch to using a set and callable argument
2018-06-15 11:29:36 +05:30
Pradyun Gedam
daa3163d08
Restrict install time dependency warnings to directly-dependant packages
2018-06-15 11:29:36 +05:30
Pradyun Gedam
a121abbc30
Add flake8 ignores for mypy imports
2018-06-13 13:17:30 +05:30
Pradyun Gedam
ee2e81ca1f
Use all available distributions
...
Same as b5f56efde5
2018-04-04 13:03:07 +05:30
Pradyun Gedam
ecc1072ba0
Merge pull request #5146 from pradyunsg/fix/check-accept-prerelease-versions
...
Accept prerelease versions when checking conflicts
2018-04-03 23:18:10 +05:30
Stephan Erb
72b3195f0e
Fix name normalization used for install warnings
2018-04-02 20:17:20 +02:00
Pradyun Gedam
1862d2f887
Accept prerelease versions when checking conflicts
2018-04-02 21:35:49 +05:30
Pradyun Gedam
49767ec374
Use string representation for comparing
...
More robust with weird requirements that can't be directly compared for
some reason (like markers).
2018-03-28 13:48:38 +05:30
Pradyun Gedam
f286fb8bdd
pip check should care about the markers
2018-03-28 13:44:21 +05:30
Pradyun Gedam
e04e5a6aab
mypy gets more data
2018-03-28 13:43:56 +05:30
Pradyun Gedam
1c911bfbdd
🎨 Make the linters happy again
2018-01-26 11:06:16 +05:30
Pradyun Gedam
045e244b7e
Run pip check in pip install
...
Also, add --no-warn-conflicts option to allow supressing the error messages generated.
2018-01-24 18:16:18 +05:30
Pradyun Gedam
a33846b627
Use namedtuple attributes
2018-01-24 18:08:46 +05:30
Pradyun Gedam
980b3ff0c1
Use canonical names
2018-01-24 18:08:46 +05:30
Pradyun Gedam
0fa2736090
Improve operations.check
...
- Move get_installed_distributions call into operations.check
- Use a named tuple, instead of a normal tuple
2018-01-24 18:08:39 +05:30