Commit Graph

6 Commits

Author SHA1 Message Date
Kemal Zebari e88356ff84
Mimic pip when handling --user-only in a virtual environment (#364)
In v2.16.1, we would not print any user-site packages if we were:
- In a virtual environment
- Using a custom interpreter

This makes since as we should be isolated away from the system
environment. The only case where we should be seeing user-site packages
is when these environments have system site packages enabled. This patch
brings back this behavior.
2024-05-07 10:01:08 -07:00
Kemal Zebari 7a6e0ff91a
Handle invalid requirement strings when using importlib.metadata (#345)
Resolves #344.

This change also:
- Makes `Distribution.requires()` into a generator for performance (i.e.
avoid building `list[Requirement]` and then iterating `list[Requirement`
and instead do both at the same time) and so that we can handle invalid
requirement exceptions in `PackageDAG.from_pkgs()` for each individual
requirement string
- Modified conftest to avoid adding a extra comma at the end and removed
some older code

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-06 07:09:53 -07:00
Cunshun Xia 91d21e307f
replace pkg_resources with importlib.metadata and packaging (#333)
Signed-off-by: cunshunxia <cunshunxia@tencent.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Kemal Zebari <60799661+kemzeb@users.noreply.github.com>
Co-authored-by: Kemal Zebari <kemalzebra@gmail.com>
2024-04-02 13:56:00 -07:00
Miroslav Šedivý e86182613a
Simplify loops (#267)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bernát Gábor <bgabor8@bloomberg.net>
2023-07-15 09:36:15 -07:00
Bernát Gábor 94682d2b23
Add type check to CI and fix errors (#266) 2023-07-15 08:58:56 -07:00
Bernát Gábor 2a526184e6
Split project to parts (#261) 2023-07-15 07:43:08 -07:00