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
click 8.0.0 now relies on importlib.metadata under certain conditions.
On Python 3.8, click will raise an error and ask the user to install the importlib_metadata backport package.
Ex:
Traceback (most recent call last):
File "/path_to_my_venv/bin/myexecutable", line 8, in <module>
sys.exit(cli())
File "/path_to_my_venv/lib/python3.6/site-packages/click/core.py", line 1134, in __call__
return self.main(*args, **kwargs)
File "/path_to_my_venv/lib/python3.6/site-packages/click/core.py", line 1058, in main
with self.make_context(prog_name, args, **extra) as ctx:
File "/path_to_my_venv/lib/python3.6/site-packages/click/core.py", line 927, in make_context
self.parse_args(ctx, args)
File "/path_to_my_venv/lib/python3.6/site-packages/click/core.py", line 1621, in parse_args
rest = super().parse_args(ctx, args)
File "/path_to_my_venv/lib/python3.6/site-packages/click/core.py", line 1376, in parse_args
value, args = param.handle_parse_result(ctx, opts, args)
File "/path_to_my_venv/lib/python3.6/site-packages/click/core.py", line 2352, in handle_parse_result
value = self.process_value(ctx, value)
File "/path_to_my_venv/lib/python3.6/site-packages/click/core.py", line 2314, in process_value
value = self.callback(ctx, self, value)
File "/path_to_my_venv/lib/python3.6/site-packages/click/decorators.py", line 380, in callback
"Install 'importlib_metadata' to get the version on Python < 3.8."
RuntimeError: Install 'importlib_metadata' to get the version on Python < 3.8.
The user can install importlib_metadata, but I think Click could use environment markers to install the importlib_metadata backport package on Python 3.8, in the same manner that colorama is installed on Windows.
I will send a PR soon. Feel free to express any concerns, doubts or considerations to the project context that I've missed.
Environment:
Python version: 3.6
Click version: 8.0.0
The text was updated successfully, but these errors were encountered:
davidism
changed the title
importlib_metadata missing. Suggestion: Install importlib_metadata on Python < 3.8
install importlib_metadata on Python < 3.8
May 19, 2021
click 8.0.0
now relies onimportlib.metadata
under certain conditions.On Python 3.8, click will raise an error and ask the user to install the
importlib_metadata
backport package.Ex:
The user can install
importlib_metadata
, but I think Click could use environment markers to install theimportlib_metadata
backport package on Python 3.8, in the same manner thatcolorama
is installed on Windows.I will send a PR soon. Feel free to express any concerns, doubts or considerations to the project context that I've missed.
Environment:
The text was updated successfully, but these errors were encountered: