Skip to content

'ABCMeta' object is not subscriptable on Python 3.8.10 #587

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

Closed
ale5000-git opened this issue Sep 6, 2022 · 3 comments · Fixed by #600
Closed

'ABCMeta' object is not subscriptable on Python 3.8.10 #587

ale5000-git opened this issue Sep 6, 2022 · 3 comments · Fixed by #600

Comments

@ale5000-git
Copy link

ale5000-git commented Sep 6, 2022

On Python 3.8.10 I get:
TypeError: 'ABCMeta' object is not subscriptable

I have fixed it by replacing:
if sys.version_info >= (3, 8) or TYPE_CHECKING:
with:
if sys.version_info >= (3, 9) or TYPE_CHECKING:
in all places,
but I'm not sure what is the correct minimum version.

@ale5000-git ale5000-git changed the title Python 3.8.10 'ABCMeta' object is not subscriptable on Python 3.8.10 Sep 6, 2022
@carmenbianca
Copy link
Member

Can you give a full traceback to reproduce this error?

@ale5000-git
Copy link
Author

Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\user\AppData\Local\Programs\Python\Python38\Scripts\reuse.exe\__main__.py", line 4, in <module>
  File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\site-packages\reuse\_main.py", line 15, in <module>
    from . import (
  File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\site-packages\reuse\download.py", line 18, in <module>
    from ._util import (
  File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\site-packages\reuse\_util.py", line 28, in <module>
    from debian.copyright import Copyright
  File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\site-packages\debian\copyright.py", line 58, in <module>
    from debian._deb822_repro import (
  File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\site-packages\debian\_deb822_repro\__init__.py", line 166, in <module>
    from debian._deb822_repro.parsing import (
  File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\site-packages\debian\_deb822_repro\parsing.py", line 12, in <module>
    from debian._deb822_repro._util import (combine_into_replacement, BufferingIterator,
  File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\site-packages\debian\_deb822_repro\_util.py", line 120, in <module>
    _bufferingIterator_Base = collections.abc.Iterator[T]
TypeError: 'ABCMeta' object is not subscriptable

@priv-kweihmann
Copy link

priv-kweihmann commented Sep 18, 2022

Was fixed upstream almost two weeks ago (https://salsa.debian.org/python-debian-team/python-debian/-/commit/7b71e7cdb5e8f637fa139af1d378a029884e6f09) - a simple bump in the requirements.txt would actually fix the issue IMO - btw the version referenced there is almost 2 years old 😳


edit: it seems to be that the issue was introduced with python-debian 0.1.45, so a downgrade to a version below should help.
And sadly the fix mentioned above isn't released yet, so if the latest version is required only pip with git support would help

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

Successfully merging a pull request may close this issue.

3 participants