Skip to content

Update to mokkari 4.10.0 and remove Basic Auth support - #277

Merged
bpepple merged 3 commits into
mainfrom
mokkari-4.10.0
Oct 13, 2026
Merged

bpepple merged 3 commits into
mainfrom
mokkari-4.10.0

Conversation

@bpepple

@bpepple bpepple commented Oct 13, 2026

Copy link
Copy Markdown
Member

Summary

mokkari 4.10.0 deprecates username/password (Basic Auth) authentication, and mokkari 5.0 will remove it. This PR updates to mokkari 4.10.0 and makes metron-tagger authenticate only with a Metron API token.

Changes

  • pyproject.toml / uv.lock: Requires mokkari>=4.10.0, including the redis extra.
  • talker.py: Talker(api_token, metron_info, comic_info, *, username=None, redis_url=None). Only the token is passed to mokkari.api(). username is still accepted, but only to key the Redis rate limiter. It's never sent to Metron.
  • cli.py: If no token is configured, the CLI explains where to generate one (Metron profile page → "API Tokens") and prompts for it. Removes the username/password prompt and the one-time offer to switch to a token.
  • run.py: Passes metron.auth_token to Talker, plus metron.user for the Redis limiter.
  • settings.py: Removes the password and token_migration_prompted defaults. Adds OBSOLETE_OPTIONS, which removes these keys from existing settings.ini files on load, so a plaintext password saved by an older version is deleted. user is kept. Removes the now-unused remove_option() method.
  • README.md: The Redis FAQ no longer describes token auth as optional.
  • Tests: Updated the Talker constructor calls and the CLI credential tests for token-only auth. Removed the password/migration settings tests. Added a test that obsolete options are removed from an existing settings file.

Breaking change

Users still on username/password will be asked for an API token the next time they run --online or --id, and their stored password is removed from settings.ini. Users who want Redis rate limiting still need user set.

mokkari 4.10.0 deprecates username/password (Basic Auth) authentication, so metron-tagger now authenticates only with an API token.

- Bump mokkari to >=4.10.0 (including the redis extra)
- Talker now takes the API token as its first argument; `username` is an optional keyword used only to key the Redis rate limiter and is no longer sent to Metron
- The CLI prompts only for an API token and explains where to generate one; the username/password prompt and token-migration offer are removed
- Drop the `password` and `token_migration_prompted` settings and scrub them from existing settings.ini files on load, so stored plaintext passwords are deleted
- Remove the now-unused MetronTaggerSettings.remove_option()
- Update tests and the README Redis FAQ

BREAKING CHANGE: users still on username/password will be prompted for an API token the next time they run --online or --id.
@bpepple bpepple self-assigned this Oct 13, 2026
@bpepple bpepple added dependencies Pull requests that update a dependency file chore Miscellaneous drudgery major Breaking change; bumps the major version labels Oct 13, 2026
@bpepple
bpepple merged commit 339c380 into main Oct 13, 2026
11 checks passed
@bpepple
bpepple deleted the mokkari-4.10.0 branch October 13, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Miscellaneous drudgery dependencies Pull requests that update a dependency file major Breaking change; bumps the major version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant