adamjakab/BeetsPluginYearFixer

beets.util.confit is deprecated

Closed this issue · 6 comments

avma commented

Problem
beets.util.confit is deprecated

Running this command in verbose (-vv) mode:

~ » beet -vvv avi@avi-mint-pc
user configuration: /home/avi/.config/beets/config.yaml
data directory: /home/avi/.config/beets
plugin paths:
/home/avi/.local/lib/python3.8/site-packages/beets/util/confit.py:21: UserWarning: beets.util.confit is deprecated; use confuse instead.

Led to this problem:
/.local/lib/python3.8/site-packages/beets/util/confit.py:21: UserWarning: beets.util.confit is deprecated; use confuse instead
warnings.warn("beets.util.confit is deprecated; use confuse instead")
Sending event: pluginload

OS: Linux mint 20 Cinnamon
Python version: 3.8 update ver 3.8.5-1~20.4
beets version: 1.5.0
Turning off plugins made problem go away (yes/no): no

Looks like the files 'command.py' and 'init.py' in '~/.local/lib/python3.8/site-packages' needs to be modified accordingly.
I did it locally and it seems to work.

Good catch! Would you be able to make a PR for this?

I have the same issue as reported here:
[https://github.com/beetbox/beets/issues/4166]

Relevant details are in the release notes for beets 1.5.0, see the "For plugin developers" section:

Similarly, we've replaced beets' configuration library (previously called Confit) with a standalone version called Confuse. Where you used to do from beets.util import confit, now just do import confuse. The code is almost identical apart from the name change. Again, we'll re-export at the old location (with a deprecation warning) for backwards compatibility, but we might stop doing this in a future release.

JOJ0 commented

This could probably be fixed very similar to: https://github.com/adamjakab/BeetsPluginDescribe/pull/5/files
HTH

could you please fix this?

JOJ0 commented

@eriwst I already fixed it and sent a PR, see the reference above. @adamjakab just needs to approve and merge it now. Thanks in advance @adamjakab :-) Appreciated!