1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00
Commit graph

14 commits

Author SHA1 Message Date
Jonathan Helmus
6ec7851bfa
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-02 21:50:16 -04:00
Diego Ramirez
3b3fde2447
Fix the pip/_internal/distributions annotations (#10074) 2021-07-13 06:29:21 +08:00
Jon Dufresne
cd1fb590e7 Blacken the src/pip/_internal/distributions directory 2021-02-21 08:52:50 -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
Pradyun Gedam
8f3687cfd9
Rename pip._internal.distributions.{source -> sdist}
Certain environments seem to be leaving behind empty folders in this
directory -- There was an older pip release that included a source/
folder here which isn't getting deleted for some reason. I have not
figured out the root cause why this happens yet. This is resulting in
ImportErrors since Python imports have a higher precedence for packages
compared to modules.

This commit changes the name we're trying to import from, which should
help prevent this mode of failure.
2020-01-21 17:53:24 +05:30
Pradyun Gedam
911722173e
Move distributions.{source.legacy -> source}
Why: Based on some more experience from refactoring metadata generation,
it became clear to me that the separation of legacy vs modern codepaths
should happen at lower level than this abstraction.
2019-11-04 12:01:38 +05:30
Pradyun Gedam
ea68afab93
Enable isort in pre-commit 2019-09-24 18:03:22 +05:30
Pradyun Gedam
c3c2831893
Merge pull request #6980 from pradyunsg/refactor/simplify-make_distribution
Improve make_distribution_for_install_requirement()
2019-09-05 15:30:55 +05:30
Pradyun Gedam
fc338512de
Better comments in make_distribution_for_install_requirement() 2019-09-05 11:22:03 +05:30
Pradyun Gedam
e31192cf49
Simplify conditional for choosing WheelDistribution 2019-09-05 09:34:16 +05:30
Pradyun Gedam
b731b012e0
Update import statement 2019-08-27 15:14:54 +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