-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
It is claimed in the documentation and in pyproject.toml that typing_extensions is needed only for python>=3.10. However if plugins are enabled, beets crashes with ModuleNotFoundError: No module named 'typing_extensions'.
The plugins functionality is trying to import typing_extensions unconditionally.
I think it would be more user friendly and practical to have the same requirements as the official plugins. (requests is a similar plugin hidden dependency that needs to be added manually to a newly installed beets)
Now every time I update the venv or uv tool upgrade, I have to manually readd typing_extensions as it's being removed.
Would it be possible to either only import it conditionally, or declaring it in pyproject.toml so it's not being removed with every update?
Here is the string search for typing_extensions in the repo:
https://github.com/search?q=repo%3Abeetbox%2Fbeets%20typing_extensions&type=code
Problem
Running this command in verbose (-vv) mode:
$ beetLed to this problem:
...
** error loading plugin edit:
Traceback (most recent call last):
File "/Users/minusf/src/tmp/beetspip/venv/lib/python3.12/site-packages/beets/plugins.py", line 268, in load_plugins
namespace = __import__(modname, None, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/minusf/src/tmp/beetspip/venv/lib/python3.12/site-packages/beetsplug/edit.py", line 27, in <module>
from beets.importer import action
File "/Users/minusf/src/tmp/beetspip/venv/lib/python3.12/site-packages/beets/importer.py", line 37, in <module>
from beets.util import (
File "/Users/minusf/src/tmp/beetspip/venv/lib/python3.12/site-packages/beets/util/pipeline.py", line 41, in <module>
from typing_extensions import TypeVar, TypeVarTuple, Unpack
ModuleNotFoundError: No module named 'typing_extensions'
Setup
- OS: macos
- Python version: 3.12.9
- beets version: 2.2.0 (https://github.com/beetbox/beets.git)
- Turning off plugins mode problem go away (yes/no): yes
My configuration (output of beet config) is:
(paste here)