Bug 255050

Summary: security/py-keyring: missing dependency on devel/py-importlib-metadata>=3.6
Product: Ports & Packages Reporter: Florian Wagner <florian>
Component: Individual Port(s)Assignee: Piotr Kubaj <pkubaj>
Status: Closed FIXED    
Severity: Affects Only Me CC: douglas, leres, rhurlin, swills, yuri
Priority: --- Flags: douglas: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 255325    
Attachments:
Description Flags
patch which fixes issue swills: maintainer-approval? (douglas)

Description Florian Wagner 2021-04-14 11:59:11 UTC
Not actually using this package but I've come across this during #255036.

  ~ pkg install security/py-keyring
[...]
New packages to be INSTALLED:
	gettext-runtime: 0.21
	indexinfo: 0.3.1
	libffi: 3.3_1
	py39-entrypoints: 0.3
	py39-keyring: 23.0.1
	py39-setuptools: 44.0.0
	python39: 3.9.4
	readline: 8.1.0
[...]

  ~ python3.9 -c "import keyring"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.9/site-packages/keyring/__init__.py", line 1, in <module>
    from .core import (
  File "/usr/local/lib/python3.9/site-packages/keyring/core.py", line 11, in <module>
    from . import backend, credentials
  File "/usr/local/lib/python3.9/site-packages/keyring/backend.py", line 12, in <module>
    import importlib_metadata as metadata
ModuleNotFoundError: No module named 'importlib_metadata'

  ~ cd /usr/local/lib/python3.9/site-packages; grep -r importlib_metadata .
  ./keyring-23.0.1-py3.9.egg-info/requires.txt:importlib_metadata>=3.6

And also [1]. I'll not be helping fix this since I've found a workaround and my time is a bit limited currently. And someone needs to update devel/py-importlib-metadata first...

[1] https://github.com/jaraco/keyring/blob/90bf330ebe3f86fe77794cf16af954858735b0dd/setup.cfg#L24-L28
Comment 1 Yuri Victorovich freebsd_committer 2021-04-25 16:01:32 UTC
*** Bug 255395 has been marked as a duplicate of this bug. ***
Comment 2 Steve Wills freebsd_committer 2021-05-04 23:56:09 UTC
Created attachment 224672 [details]
patch which fixes issue
Comment 3 Douglas Thrift 2021-05-05 00:21:32 UTC
This looks good and matches what was discussed in bug 255237, comment 8; approved.
Comment 4 commit-hook freebsd_committer 2021-05-06 23:48:11 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f043e2bdfd2063a32f59a9100cfc80bd3a580f7a

commit f043e2bdfd2063a32f59a9100cfc80bd3a580f7a
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2021-05-06 23:47:33 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2021-05-06 23:47:33 +0000

    security/py-keyring: downgrade to 18.0.1

    importlib_metadata>=3.6 is necessary for py-keyring 23.0.1 to work.

    PR:     255050
    Approved by:    douglas@douglasthrift.net (maintainer)

 security/py-keyring/Makefile | 3 ++-
 security/py-keyring/distinfo | 6 +++---
 2 files changed, 5 insertions(+), 4 deletions(-)