docs: add Linux aiolimiter DBus workaround to setup guide#124
Conversation
|
PR Review — docs: add Linux aiolimiter DBus workaround to setup guide Nice, practical addition. This is exactly the kind of "silent failure" that wastes hours for new contributors. What looks good:
One suggestion: PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring poetry installThis disables the keyring entirely and avoids the DBus error upfront, so users don't need the manual pip fix afterwards. Some distros have this as the recommended Poetry workaround. Worth a line if you want to offer a "prevention" path alongside the "fix" path. Either way, this is a net improvement to the contributor experience. Happy to see it merged. — Friday, AI assistant to @RichardAtCT |
There was a problem hiding this comment.
Pull request overview
This PR documents a Linux-specific workaround for a known Poetry keyring (DBus) issue that silently fails to install aiolimiter during make dev, causing 2 test failures at runtime. It also fixes a minor trailing blank-line formatting issue at the end of the file.
Changes:
- Adds a callout block under the "Install dependencies" step warning Linux users about the
DBusErrorResponse/ItemNotFoundExceptionerror and providing a manual pip-based fix. - Fixes a missing line number for the final "Thank you" line (cosmetic formatting correction in the diff).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
CONTRIBUTING.md
Outdated
| > error for `aiolimiter`, this is a known Poetry keyring issue on Linux and is | ||
| > non-fatal — the install continues. However, `aiolimiter` may not be installed, | ||
| > which will cause 2 test failures. Fix it by running: | ||
| > ```bash | ||
| > poetry run pip install aiolimiter | ||
| > ``` | ||
| > Then re-run `make test` to confirm all tests pass. |
There was a problem hiding this comment.
The suggested workaround (poetry run pip install aiolimiter) installs the package directly with pip inside the Poetry virtualenv, bypassing Poetry's dependency resolver. This means:
- The fix is not persistent — if someone runs
make devagain (e.g., after apoetry lockupdate), the DBus error will recur andaiolimiterwill be missing again. - It does not address the root cause.
A more robust alternative that prevents the issue from occurring in the first place is to set the PYTHON_KEYRING_BACKEND environment variable to disable the broken keyring backend before running make dev:
PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring make dev
Or, to make the fix permanent for the project, add poetry config keyring.enabled false to the setup steps, or export the env var in a shell profile.
Consider documenting this preventive approach alongside (or instead of) the after-the-fact pip install workaround, so that Linux users avoid the error entirely on first setup and on subsequent runs.
| > error for `aiolimiter`, this is a known Poetry keyring issue on Linux and is | |
| > non-fatal — the install continues. However, `aiolimiter` may not be installed, | |
| > which will cause 2 test failures. Fix it by running: | |
| > ```bash | |
| > poetry run pip install aiolimiter | |
| > ``` | |
| > Then re-run `make test` to confirm all tests pass. | |
| > error for `aiolimiter`, this is a known Poetry keyring issue on Linux. To prevent | |
| > it and ensure `aiolimiter` is installed correctly, disable the keyring backend | |
| > when running `make dev`: | |
| > ```bash | |
| > PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring make dev | |
| > ``` | |
| > Or configure Poetry once to disable keyring: | |
| > ```bash | |
| > poetry config keyring.enabled false | |
| > make dev | |
| > ``` | |
| > If you already ran `make dev` and see 2 test failures due to a missing | |
| > `aiolimiter`, you can install it inside the Poetry environment and then re-run | |
| > the tests: | |
| > ```bash | |
| > poetry run pip install aiolimiter | |
| > make test | |
| > ``` |
|
PR Review Summary
What looks good
Issues / questions
Suggested tests
Verdict — Friday, AI assistant to @RichardAtCT |
|
Thanks for the thorough review! Regarding the poetry run pip install aiolimiter vs poetry add suggestion — aiolimiter is already declared as a dependency in pyproject.toml (via the python-telegram-bot[rate-limiter] extra). The issue is that Poetry silently skips installing it due to the DBus error, so poetry add would just update pyproject.toml unnecessarily. The pip install workaround is intentionally temporary — it just forces the already-declared package to actually land in the venv. Happy to add a clarifying comment in the docs if that would help. |
|
Good point — that makes sense. Since is already declared via the extra, would indeed be redundant; the workaround is the right call here. No change needed. — Friday, AI assistant to @RichardAtCT |
RichardAtCT
left a comment
There was a problem hiding this comment.
LGTM — clean docs addition for the Linux aiolimiter workaround.
Description
Documents a known Linux-specific issue where Poetry fails to install
aiolimiterdue to a DBus/keyring error duringmake dev. The erroris non-fatal so the install appears to succeed, but
aiolimiterismissing at runtime — causing 2 test failures that are confusing to debug.
Related Issue
N/A — discovered while setting up the dev environment on Linux (Ubuntu 24).
Type of Change
Testing
make testbefore fix: 2 failurespoetry run pip install aiolimitermake testafter fix: 433 passed, 0 failuresChecklist