jupyter-book
jupyter-book copied to clipboard
[Bug]: Deprecated use of click.BaseCommand in cli/pluggable.py
What happened, and what did you expect to happen?
Running jupyter-book with warnings set to error raises a DeprecationWarning from click (see below).
The relevant code is present in main:
https://github.com/jupyter-book/jupyter-book/blob/5f18bfe70dd687f9f59b7dcc2d45cf2f50a01793/jupyter_book/cli/pluggable.py#L42-L52
What version of Jupyter Book are you running?
1.0.4.post1
What Operating System are you using?
Linux
Relevant log output
$ PYTHONWARNINGS="error" uv run jb build -W specification
Traceback (most recent call last):
File "/[...]/.venv/bin/jb", line 4, in <module>
from jupyter_book.cli.main import main
File "/[...]/.venv/lib/python3.13/site-packages/jupyter_book/cli/main.py", line 19, in <module>
from .pluggable import PluggableGroup
File "/[...]/.venv/lib/python3.13/site-packages/jupyter_book/cli/pluggable.py", line 23, in <module>
class PluggableGroup(click.Group):
...<28 lines>...
return command
File "/[...]/.venv/lib/python3.13/site-packages/jupyter_book/cli/pluggable.py", line 42, in PluggableGroup
def get_command(self, ctx: click.Context, name: str) -> click.BaseCommand:
^^^^^^^^^^^^^^^^^
File "/[...]/.venv/lib/python3.13/site-packages/click/__init__.py", line 80, in __getattr__
warnings.warn(
~~~~~~~~~~~~~^
"'BaseCommand' is deprecated and will be removed in Click 9.0. Use"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<2 lines>...
stacklevel=2,
^^^^^^^^^^^^^
)
^
DeprecationWarning: 'BaseCommand' is deprecated and will be removed in Click 9.0. Use 'Command' instead.