indygreg / indygreg/PyOxidizer
Support for importlib-metadata EntryPoint.matches()
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 256
- PR merge metrics
- No merged PRs in 30d
Description
I was trying to follow up on #562 using PyOxidizer 0.22.0, updated the dependencies to keyring==23.7.0 and importlib-metadata==4.12.0, and got the following (after adjusting mercurial_keyring to print a stacktrace when the keyring module raises an exception):
keyring: keyring backend doesn't seem to work, password can not be restored. Falling back to prompts. Error details: 'EntryPoint' object has no attribute 'matches'
Traceback (most recent call last):
File "C:/Users/Matt/projects/foss/mercurial/mercurial_keyring/mercurial_keyring.py", line 235, in _read_password_from_keyring
password = keyring.get_password(KEYRING_SERVICE, pwdkey)
File "keyring.core", line 55, in get_password
return get_keyring().get_password(service_name, username)
File "keyring.core", line 32, in get_keyring
init_backend()
File "keyring.core", line 83, in init_backend
set_keyring(_detect_backend(limit))
File "keyring.core", line 101, in _detect_backend
filter(limit, backend.get_all_keyring()),
File "keyring.util", line 22, in wrapper
func.always_returns = func(*args, **kwargs)
File "keyring.backend", line 212, in get_all_keyring
_load_plugins()
File "keyring.backend", line 196, in _load_plugins
for ep in metadata.entry_points(group='keyring.backends'):
File "importlib_metadata", line 1047, in entry_points
return SelectableGroups.load(eps).select(**params)
File "importlib_metadata", line 505, in select
return self._all.select(**params)
File "importlib_metadata", line 381, in select
return EntryPoints(ep for ep in self if ep.matches(**params))
File "importlib_metadata", line 381, in <genexpr>
return EntryPoints(ep for ep in self if ep.matches(**params))
AttributeError: 'EntryPoint' object has no attribute 'matches'
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with PyOxidizer 0.22.0, keyring 23.7.0, and importlib-metadata 4.12.0. Start at keyring.backend._load_plugins and metadata.entry_points(group='keyring.backends'), then trace the EntryPoint.matches() call. Done means backend discovery no longer raises AttributeError with these dependencies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100