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

Confusing handling of 'magic' dependency #638

Open
ferdnyc opened this issue Nov 14, 2024 · 0 comments
Open

Confusing handling of 'magic' dependency #638

ferdnyc opened this issue Nov 14, 2024 · 0 comments

Comments

@ferdnyc
Copy link

ferdnyc commented Nov 14, 2024

(referencing the Fedora python3-eyed3 distro package)...

...Oh, awesome, even better. It doesn't have a dependency on any magic package!

...Then again, neither does eyeD3 itself, that I can find. Despite being used in plugins/mimetypes.py, python-magic never appears in pyproject.toml or any of the requirements/ files.

Originally posted by @ferdnyc in #637 (comment)

The HISTORY.rst file contains a confusing saga of various changes revolving around mimetype detection... python-magic seems to have been added and removed as a dependency at least three times over the years.

Currently, however, it does not appear as a dependency anywhere in the eyeD3 package metadata.

But plugins/mimetype.py still has code that attempts to import magic and set up a MagicTypes class subclassed from magic.Magic.

Which can be a problem, because doing an import magic in a random distro Python install may import file-magic, the Python libfile bindings (https://github.com/file/file/), instead of python-magic. Both packages have a magic.Magic class, but their APIs are completely different and incompatible.

I think eyeD3 probably needs to continue specifying which magic it's dependent on. (Specifically, python-magic.)

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

1 participant