Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeprecationWarning: pkg_resources is deprecated as an API #114

Open
graingert-coef opened this issue Nov 23, 2023 · 1 comment
Open

DeprecationWarning: pkg_resources is deprecated as an API #114

graingert-coef opened this issue Nov 23, 2023 · 1 comment

Comments

@graingert-coef
Copy link

liccheck should migrate to importlib.metadata.distributions()

@eldrift
Copy link

eldrift commented Feb 28, 2024

I get this:

liccheck -s liccheck.ini -r requirements.txt >> lisensstatus.txt
Traceback (most recent call last):
File "C:\Users\terje\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return run_code(code, main_globals, None,
File "C:\Users\terje\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\terje\AppData\Local\Programs\Python\Python310\Scripts\liccheck.exe_main
.py", line 7, in
File "C:\Users\terje\AppData\Local\Programs\Python\Python310\lib\site-packages\liccheck\command_line.py", line 529, in main
sys.exit(run(args))
File "C:\Users\terje\AppData\Local\Programs\Python\Python310\lib\site-packages\liccheck\command_line.py", line 509, in run
return process(
File "C:\Users\terje\AppData\Local\Programs\Python\Python310\lib\site-packages\liccheck\command_line.py", line 317, in process
pkg_info = get_packages_info(requirement_file, no_deps)
File "C:\Users\terje\AppData\Local\Programs\Python\Python310\lib\site-packages\liccheck\command_line.py", line 195, in get_packages_info
packages = [transform(dist) for dist in resolve_func(requirements)]
File "C:\Users\terje\AppData\Local\Programs\Python\Python310\lib\site-packages\liccheck\command_line.py", line 195, in
packages = [transform(dist) for dist in resolve_func(requirements)]
File "C:\Users\terje\AppData\Local\Programs\Python\Python310\lib\site-packages\liccheck\requirements.py", line 51, in resolve
for dist in pkg_resources.working_set.resolve(requirements):
File "C:\Users\terje\AppData\Local\Programs\Python\Python310\lib\site-packages\pkg_resources_init
.py", line 777, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (websockets 12.0 (c:\users\terje\appdata\local\programs\python\python310\lib\site-packages), Requirement.parse('websockets<11,>=10; python_version > "3.6" and extra == "websockets"'), {'gql'})

Python 3.10
Win 11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants