Skip to content

docs: add Linux aiolimiter DBus workaround to setup guide#124

Merged
RichardAtCT merged 2 commits intoRichardAtCT:mainfrom
haripatel07:fix/linux-aiolimiter-dbus-install
Mar 4, 2026
Merged

docs: add Linux aiolimiter DBus workaround to setup guide#124
RichardAtCT merged 2 commits intoRichardAtCT:mainfrom
haripatel07:fix/linux-aiolimiter-dbus-install

Conversation

@haripatel07
Copy link
Copy Markdown
Contributor

Description

Documents a known Linux-specific issue where Poetry fails to install
aiolimiter due to a DBus/keyring error during make dev. The error
is non-fatal so the install appears to succeed, but aiolimiter is
missing 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

  • Bug fix
  • New feature
  • Documentation update

Testing

  • Ran make test before fix: 2 failures
  • Ran poetry run pip install aiolimiter
  • Ran make test after fix: 433 passed, 0 failures

Checklist

  • Documentation updated
  • No breaking changes
  • Self-review completed

Copilot AI review requested due to automatic review settings March 4, 2026 05:33
@FridayOpenClawBot
Copy link
Copy Markdown

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:

  • The note is placed right where the failure occurs (inline with make dev), which is the right spot
  • Clear cause → symptom → fix flow
  • Confirmed with before/after test runs — good validation

One suggestion:
Consider also mentioning PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring as an environment variable alternative:

PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring poetry install

This 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

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/ItemNotFoundException error 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
Comment on lines +36 to +42
> 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.
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. The fix is not persistent — if someone runs make dev again (e.g., after a poetry lock update), the DBus error will recur and aiolimiter will be missing again.
  2. 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.

Suggested change
> 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
> ```

Copilot uses AI. Check for mistakes.
@FridayOpenClawBot
Copy link
Copy Markdown

PR Review
Reviewed head: 1060d77c70bb129b4842e729947a95a248b09d51

Summary

  • Documents a known Linux-specific Poetry/keyring issue that silently skips aiolimiter installation, causing 2 confusing test failures
  • Adds two workaround options (env var or poetry config) plus a recovery path for users who already hit the problem
  • Adds a trailing newline to the last line of the file

What looks good

  • The workarounds are accurate and cover both the proactive and recovery cases
  • Good callout that the error appears non-fatal but has a real downstream effect — that's the kind of trap that wastes hours

Issues / questions

  1. [Nit] CONTRIBUTING.md — The recovery step suggests poetry run pip install aiolimiter rather than poetry add aiolimiter. Both work, but poetry add would persist it to pyproject.toml/poetry.lock properly. Worth noting if this is a development dependency that should actually live there (or just clarifying that pip install is intentionally temporary).

Suggested tests

  • N/A — docs-only change

Verdict
✅ Ready to merge

Friday, AI assistant to @RichardAtCT

@haripatel07
Copy link
Copy Markdown
Contributor Author

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.

@FridayOpenClawBot
Copy link
Copy Markdown

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

Copy link
Copy Markdown
Owner

@RichardAtCT RichardAtCT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — clean docs addition for the Linux aiolimiter workaround.

@RichardAtCT RichardAtCT merged commit 888854c into RichardAtCT:main Mar 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants