You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pkg_resources is part of setuptools and I'm not sure how this worked before. Probably Version was implicitly comparable to str before? I didn't dig deep enough to find out but I have setuptools v60.5.0 in this venv. This is a regression from 6cd49cf.
But I suspect that the better fix would be to move away from pkg_resources entirely due to this guidance:
Use of pkg_resources is discouraged in favor of importlib.resources, importlib.metadata, and their backports (resources, metadata). Please consider using those libraries instead of pkg_resources.
P.S. This is on latest commit 8c1f773, that's why the error is different from user report.
The text was updated successfully, but these errors were encountered:
I have tried to scan the dir from this comment and instead of the error mentioned in that thread got another one:
The offending code is here:
cve-bin-tool/cve_bin_tool/cve_scanner.py
Lines 140 to 146 in 8c1f773
As evident from the error text
parsed_version
is juststr
butparse_version(version_end_including)
isVersion
.cve-bin-tool/cve_bin_tool/cve_scanner.py
Line 13 in 8c1f773
This is a regression from 6cd49cf.pkg_resources
is part ofsetuptools
and I'm not sure how this worked before. ProbablyVersion
was implicitly comparable tostr
before? I didn't dig deep enough to find out but I havesetuptools
v60.5.0 in this venv.Anyway, a quick fix would probably be to call
parse_version
when assigningparsed_version
(this seems to be the intended way).But I suspect that the better fix would be to move away from
pkg_resources
entirely due to this guidance:P.S. This is on latest commit 8c1f773, that's why the error is different from user report.
The text was updated successfully, but these errors were encountered: