Beets crashes when running any command.
$ beet
Traceback (most recent call last):
File "C:\Python38\Scripts\beet-script.py", line 11, in <module>
load_entry_point('beets==1.4.8', 'console_scripts', 'beet')()
File "C:\Python38\lib\site-packages\beets-1.4.8-py3.8.egg\beets\ui\__init__.py
", line 1266, in main
_raw_main(args)
File "C:\Python38\lib\site-packages\beets-1.4.8-py3.8.egg\beets\ui\__init__.py
", line 1249, in _raw_main
subcommands, plugins, lib = _setup(options, lib)
File "C:\Python38\lib\site-packages\beets-1.4.8-py3.8.egg\beets\ui\__init__.py
", line 1144, in _setup
lib = _open_library(config)
File "C:\Python38\lib\site-packages\beets-1.4.8-py3.8.egg\beets\ui\__init__.py
", line 1201, in _open_library
get_path_formats(),
File "C:\Python38\lib\site-packages\beets-1.4.8-py3.8.egg\beets\ui\__init__.py
", line 619, in get_path_formats
path_formats.append((query, Template(view.as_str())))
File "C:\Python38\lib\site-packages\beets-1.4.8-py3.8.egg\beets\util\functempl
ate.py", line 558, in __init__
self.compiled = self.translate()
File "C:\Python38\lib\site-packages\beets-1.4.8-py3.8.egg\beets\util\functempl
ate.py", line 591, in translate
func = compile_func(
File "C:\Python38\lib\site-packages\beets-1.4.8-py3.8.egg\beets\util\functempl
ate.py", line 147, in compile_func
prog = compile(mod, '<generated>', 'exec')
TypeError: required field "type_ignores" missing from Module
My configuration (output of beet config) is:
empty
I've also compiled the wheel from git master obviously, I was having this issue from just installing it from pip normally, so I thought doing this manually would solve my issues, but it didn't. I don't really understand why this error occurs, but I imagine it has something to do with the dependencies of this project.
So it looks like the call signature of ast.Module changed in 3.8 from Module(stmt* body) to Module(stmt* body, type_ignore *type_ignores) which is annoying, although it looks like we should be able to change this line;
To something like this;
if sys.version_info >= (3, 8):
mod = ast.Module([func_def], [])
else:
mod = ast.Module([func_def])
~I'm not really available to work on this right now, so hopefully this gives someone else a head-start.~ I'm going to go ahead and pick this up anyway :+1:
It might be worth enabling 3.8 on Travis too, although it is only officially being released in October this year.
Related to Python 3.8 support: on Python 3.7 I was seeing a deprecation warning about collections.abc and the docs indicate that this is expected to become an error in versions after Python 3.7 (although the current 3.8 seems not to have this change yet). #3197 fixes that.
Most helpful comment
Related to Python 3.8 support: on Python 3.7 I was seeing a deprecation warning about
collections.abcand the docs indicate that this is expected to become an error in versions after Python 3.7 (although the current 3.8 seems not to have this change yet). #3197 fixes that.