Opened 2 years ago

Closed 2 years ago

#63930 closed defect (fixed)

py-keyring doesn't work at python3.10

Reported by: catap (Kirill A. Korinsky) Owned by: reneeotten (Renee Otten)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: py-keyring

Description

Python 3.10.0 (default, Nov 12 2021, 12:32:57) [Clang 12.0.5 (clang-1205.0.22.11)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import keyring
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/keyring/__init__.py", line 1, in <module>
    from .core import (
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/keyring/core.py", line 11, in <module>
    from . import backend, credentials
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/keyring/backend.py", line 12, in <module>
    import importlib_metadata as metadata
ModuleNotFoundError: No module named 'importlib_metadata'
>>> 

Change History (4)

comment:1 Changed 2 years ago by jmroot (Joshua Root)

Owner: set to reneeotten
Port: py-keyring added
Status: newassigned

Guess it's using importlib_metadata unconditionally rather than using importlib.metadata from the stdlib when available. So the dependency is needed with all python versions, not just old ones.

comment:2 Changed 2 years ago by catap (Kirill A. Korinsky)

Joshua, not sure because it works very well on 3.9

comment:3 in reply to:  1 Changed 2 years ago by reneeotten (Renee Otten)

Replying to jmroot:

Guess it's using importlib_metadata unconditionally rather than using importlib.metadata from the stdlib when available. So the dependency is needed with all python versions, not just old ones.

Correct, that changed in a more recent version and I assumed it would use it from the stdlib if available; added now for all Python versions except for the py27 subport.

Replying to catap:

Joshua, not sure because it works very well on 3.9

I would conjecture that that's because you have the py39-importlib-metadata already installed because of another port.

comment:4 Changed 2 years ago by catap (Kirill A. Korinsky)

Resolution: fixed
Status: assignedclosed

In 1bf92358124002bda0bcfbba38040f1c593121e6/macports-ports (master):

py-keyring: fix dependencies

Closes: #63930

Note: See TracTickets for help on using tickets.