containerbuildsystem / cachi2

GNU General Public License v3.0
5 stars 20 forks source link

Make PipRequirement a subclass of packaging.Requirement #542

Open ianrochapg opened 2 months ago

ianrochapg commented 2 months ago

PipRequirement implemented pkg_resources which is very lean and also deprecated. Removing pkg_resources and subclassing directly from packaging.Requirement.

setuptools has been removed because it was only used by pkg_resources, which has also been removed.

Resolves #486

Maintainers will complete the following section

Note: if the contribution is external (not from an organization member), the CI pipeline will not run automatically. After verifying that the CI is safe to run:

slimreaper35 commented 2 months ago

You forgot to run make pip-compile to regenerate requirements files (it takes pyproject.toml as an input).

Also, we can probably delete --allow-unsafe option. https://github.com/containerbuildsystem/cachi2/blob/main/Makefile#L53

brunoapimentel commented 2 months ago

/ok-to-test

eskultety commented 2 months ago

@ianrochapg if you don't plan on not actually working on subclassing packaging.Requirement inside our code, that's fine, but in that case the subject of both the PR and the commit need to drop any mention of "subclassing". Additionally, the 'resolves' reference should be dropped as well from the PR description since this PR is only one of the steps towards resolving the issue, but not quite, so on its own the issue should not get closed automatically via this PR.

eskultety commented 1 month ago

Any update on this one?