Skip to content

refactor(poller): replace deprecated aiohttp.BasicAuth#322

Merged
Pyker merged 1 commit into
masterfrom
fix/basicauth-deprecation
Jun 13, 2026
Merged

refactor(poller): replace deprecated aiohttp.BasicAuth#322
Pyker merged 1 commit into
masterfrom
fix/basicauth-deprecation

Conversation

@Pyker

@Pyker Pyker commented Jun 13, 2026

Copy link
Copy Markdown
Member

What

Replace the deprecated aiohttp.BasicAuth with aiohttp.encode_basic_auth(), building the Authorization header directly.

Why

aiohttp 3.14 deprecates aiohttp.BasicAuth, slated for removal in aiohttp 4.0. The 3.14.0 upgrade in #321 surfaced this as a DeprecationWarning; this is the follow-up noted there.

Changes

  • mod_polling/poller.py: GitHub release auth now passes headers={"Authorization": aiohttp.encode_basic_auth(...)}
  • scripts/test_regexes.py: same swap in the regex-testing maintenance script

Behavior is unchanged: encode_basic_auth emits the identical Basic <base64(id:secret)> value for the ASCII GitHub credentials in use.

Verification

uv run pytest reports 200 passed with the BasicAuth DeprecationWarning gone (the warnings summary is now empty); ruff check and ruff format --check are clean.

aiohttp 3.14 deprecates aiohttp.BasicAuth (removed in 4.0). Build the
Authorization header with aiohttp.encode_basic_auth() instead, which
emits the identical "Basic <base64>" credentials for the ASCII GitHub
client_id/client_secret in use.

- mod_polling/poller.py: GitHub release auth now goes via headers=
- scripts/test_regexes.py: same swap in the regex-testing script

No behavior change; clears the DeprecationWarning surfaced by the
aiohttp 3.14.0 upgrade in #321.
@Pyker Pyker merged commit 4858dfc into master Jun 13, 2026
5 checks passed
@Pyker Pyker deleted the fix/basicauth-deprecation branch June 13, 2026 19:28
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.

1 participant