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

typing_extensions requirement inconsistency #5695

Open
minusf opened this issue Mar 27, 2025 · 1 comment
Open

typing_extensions requirement inconsistency #5695

minusf opened this issue Mar 27, 2025 · 1 comment

Comments

@minusf
Copy link

minusf commented Mar 27, 2025

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:

$ beet

Led 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

My configuration (output of beet config) is:

(paste here)
@wisp3rwind
Copy link
Member

That's a regression due to #5611

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