jaraco / jaraco/keyring

25.1.0: generate completion files without installed `keyring` now fails

Open
#675 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.5k
Forks
196
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
Up to now as possible to generate completion files without installing `keyring` after build by
```sh
for sh in bash zsh; do
PYTHONPATH=$PWD/build/lib \
python3 -m keyring --print-completion ${sh} > keyring.${sh}
done
```
Now above fails with
```
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILD/keyring-25.1.0/build/lib
+ /usr/bin/python3 -m keyring --print-completion bash
Install keyring[completion] for completion support.
```
It was especially useful on packaging.

BTW: Currently code generating those completion files is part od the installed by modules files.
If it not would be better to remove that code and maintain just static completion files? 🤔

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the failure with `PYTHONPATH=$PWD/build/lib python3 -m keyring --print-completion bash`, then inspect the `keyring` module entry point and completion-support dependency handling. Done means completion files can again be generated without installed `keyring[completion]` for both bash and zsh, or the issue's proposed static-file approach is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.