Commit Graph

11 Commits

Author SHA1 Message Date
Kemal Zebari 99cdda2335
Drop support for python 3.8 (#444)
Drops support for python 3.8 since it is EOL. The code refactoring is
due to ruff's formatting rules for 3.9.
2025-01-26 13:40:51 -08:00
pre-commit-ci[bot] 1d20129940
[pre-commit.ci] pre-commit autoupdate (#422)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-10-30 08:03:00 -07:00
pre-commit-ci[bot] 02f4f2684a
[pre-commit.ci] pre-commit autoupdate (#392)
<!--pre-commit.ci start-->
updates:
- [github.com/tox-dev/pyproject-fmt: 2.1.3 →
2.1.4](https://github.com/tox-dev/pyproject-fmt/compare/2.1.3...2.1.4)
- [github.com/astral-sh/ruff-pre-commit: v0.5.0 →
v0.5.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.5.0...v0.5.1)
<!--pre-commit.ci end-->

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-07-08 12:48:17 -07:00
Kemal Zebari 58fb67d1bd
Warn about and ignore invalid package metadata in the environment (#373)
Resolves #370.

I also decided to break away the "filtering" logic we have in
`get_installed_distributions()` into its own function.
2024-06-02 19:05:35 -07:00
pre-commit-ci[bot] 5cc7ba2f4a
[pre-commit.ci] pre-commit autoupdate (#365)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-05-13 10:17:44 -07:00
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