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

collections renamed to collections.abc #646

Closed
ballynakill-waif opened this issue Apr 30, 2024 · 1 comment
Closed

collections renamed to collections.abc #646

ballynakill-waif opened this issue Apr 30, 2024 · 1 comment

Comments

@ballynakill-waif
Copy link

ballynakill-waif commented Apr 30, 2024

It seems that there where some changes to the structure of the package,
and my usage of pip install doesn't clear it up.

 mutagen-inspect -h
Traceback (most recent call last):
  File "/Users/hecate/.pyenv/versions/3.11.4/bin/mutagen-inspect", line 12, in <module>
    from mutagen._tools.mutagen_inspect import entry_point
  File "/Users/hecate/.pyenv/versions/3.11.4/lib/python3.11/site-packages/mutagen/_tools/mutagen_inspect.py", line 11, in <module>
    from mutagen._senf import print_, argv
  File "/Users/hecate/.pyenv/versions/3.11.4/lib/python3.11/site-packages/mutagen/_senf/__init__.py", line 32, in <module>
    from ._stdlib import sep, pathsep, curdir, pardir, altsep, extsep, devnull, \
  File "/Users/hecate/.pyenv/versions/3.11.4/lib/python3.11/site-packages/mutagen/_senf/_stdlib.py", line 28, in <module>
    from ._environ import environ
  File "/Users/hecate/.pyenv/versions/3.11.4/lib/python3.11/site-packages/mutagen/_senf/_environ.py", line 133, in <module>
    class Environ(collections.MutableMapping):
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'collections' has no attribute 'MutableMapping'

after fixing the file my self with:

import collections.abc as collections

that's the _environ.py, ~/.pyenv/versions/3.11.4/lib/python3.11/site-packages/mutagen/_senf/_environ.py.
I still receive more errors

mutagen-inspect -h
Traceback \(most recent call last\):
  File \"/Users/hecate/.pyenv/versions/3.11.4/bin/mutagen-inspect\", line 12, in <module>
    from mutagen._tools.mutagen_inspect import entry_point
  File \"/Users/hecate/.pyenv/versions/3.11.4/lib/python3.11/site-packages/mutagen/_tools/mutagen_inspect.py\", line 11, in <module>
    from mutagen._senf import print_, argv
  File \"/Users/hecate/.pyenv/versions/3.11.4/lib/python3.11/site-packages/mutagen/_senf/__init__.py\", line 34, in <module>
    from ._argv import argv
  File \"/Users/hecate/.pyenv/versions/3.11.4/lib/python3.11/site-packages/mutagen/_senf/_argv.py\", line 60, in <module>
    class Argv\(collections.MutableSequence\):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module \'collections\' has no attribute \'MutableSequence\'

which makes me feel like this is a daisy chain of errors that could be better addressed some other way
other than changing these files.

note

I had to change both importation lines concerning the module collections to

import collections.abc as collections

in both, ~/.pyenv/versions/3.11.4/lib/python3.11/site-packages/mutagen/_senf/_argv.py, and
~/.pyenv/versions/3.11.4/lib/python3.11/site-packages/mutagen/_senf/_environ.py in order to get things working --
in order to get the binaries from this package working again.
I'm using python 3.11.4 and I use pyenv if that is useful.

@phw
Copy link
Collaborator

phw commented May 20, 2024

Can you please check what version of mutagen you are using? From the error logs it looks like you are using 1.42.0 or earlier. Please upgrade to the latest version. collections.abc is supported since mutagen 1.43.0 (releases November 2019), the current latest version is 1.47.0 from September last year.

@phw phw closed this as completed May 20, 2024
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