Commit Graph

16 Commits

Author SHA1 Message Date
Tzu-ping Chung 9ba2bb90fb Straighten up extra comps across metadata backends
The importlib.metadata and pkg_resources backends unfortunately
normalize extras differently, and we don't really want to continue using
the latter's logic (being partially lossy while still not compliant to
standards), so we add a new abstraction for the purpose.
2023-09-13 16:45:44 +08:00
Danny McClanahan bad03ef931
Use data-dist-info-metadata (PEP 658) to decouple resolution from downloading (#11111)
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2022-09-10 11:28:57 +01:00
Bastian Venthur 5da767c946 fixed some spelling mistakes
that's all :)
2022-06-14 21:24:58 +02:00
Tzu-ping Chung bd9bcef8b3 Enable importlib.metadata backend on Python 3.11 2022-05-10 13:34:43 -04:00
Tzu-ping Chung e3952f8357 Fix unit test to check against the correct backend 2022-04-12 03:26:12 +08:00
Tzu-ping Chung a9cf547dd1 Add workflow to run tests against the new backend 2022-04-12 03:26:12 +08:00
Tzu-ping Chung 60a7ad3a27 An importlib.metadata-based backend
This is not tested at all, but passed Mypy.
2022-04-12 03:26:12 +08:00
Tzu-ping Chung 62b91dfbf1 Return abstract metadata type from ireq.get_dist() 2021-11-18 17:56:26 +08:00
Tzu-ping Chung 135faabfd6
Remove direct pkg_resource usages from resolver and preparer 2021-08-23 02:07:33 +08:00
Tzu-ping Chung 956ed04098 Remove pkg_resources usage in direct_url_helper 2021-07-22 17:12:29 +08:00
Harutaka Kawamura 9582341e08
Complete type annotations in `pip/_internal/metadata` (#10124) 2021-07-04 19:29:15 +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 d16a5036de Remove direct pkg_resources usage in wheel_builder 2021-02-04 12:10:28 +08:00
Tzu-ping Chung 11e37aa6e1 Separate default and ad-hoc environment APIs
pkg_resources performs annoying caching that needs to be worked around
in some parts of pip. This makes it easier to represent the difference
between environments backend by WorkingSet() and working_set.
2021-01-19 14:42:55 +08:00
Tzu-ping Chung a08c4be3f8 Basic abstraction and one migration 2021-01-19 04:57:35 +08:00