zopefoundation / z3c.checkversions

Find newer package versions on PyPI
Other
2 stars 6 forks source link

Ignore packages #17

Closed jugmac00 closed 2 years ago

jugmac00 commented 4 years ago

It would be nice to be able to configure a list with packages which gets excluded from the check.

Either by a config file or maybe by supporting a noqa comment after a version declaration in the versions file.

icemac commented 4 years ago

You are able to provide a file of listed bad versions, see https://github.com/zopefoundation/z3c.checkversions#usage maybe this goes into the direction you want.

jugmac00 commented 4 years ago

@icemac Thanks, I read the help section.

I do not want to blacklist a version, but the complete package.

Using blacklist with a > operator could be a workaround - but would not be supported by the current checker.

https://github.com/zopefoundation/z3c.checkversions/blob/be59ba7b131b0773e10018abdccf6a40a545659e/src/z3c/checkversions/base.py#L45-L54

This is no urgent issue - just a minor annoyance when I daily check for newer versions, and for some packages the newer versions are Python 3 only (and my app is currently still on Python 2).

icemac commented 4 years ago

Idea: Implement a constraints file which contains the maximum versions specifications, e.g.:

zope.interface < 5

Then in addition to the black list check if the currently handled package matches the constraint.

if not all(dist in req for req in parse_requirements(constraint)):
    # with constraint = "zope.interface < 5" when checking for zope.interface instead of the whole constraints file
    continue
jugmac00 commented 2 years ago

I have no use case for this issue any more, so I'll close it. Feel free to re-open if you find any value in it.