refactor(poller): replace deprecated aiohttp.BasicAuth#322
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Replace the deprecated
aiohttp.BasicAuthwithaiohttp.encode_basic_auth(), building theAuthorizationheader 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 aDeprecationWarning; this is the follow-up noted there.Changes
mod_polling/poller.py: GitHub release auth now passesheaders={"Authorization": aiohttp.encode_basic_auth(...)}scripts/test_regexes.py: same swap in the regex-testing maintenance scriptBehavior is unchanged:
encode_basic_authemits the identicalBasic <base64(id:secret)>value for the ASCII GitHub credentials in use.Verification
uv run pytestreports 200 passed with theBasicAuthDeprecationWarning gone (the warnings summary is now empty);ruff checkandruff format --checkare clean.