twilio / twilio/twilio-python

[BUG] BasicAuth is deprecated and will be removed in aiohttp 4.0

Open
#931 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: bug
Dominant language
Python
Stars
2.1k
Forks
815
Avg merge
2d 13h
Merged PRs (30d)
2

Description

Describe the bug

when using aiohttp 3.14.0+

Code snippet
from twilio.http.async_http_client import AsyncTwilioHttpClient

async def main():
    client = AsyncTwilioHttpClient()
    await client.request(
        "GET",
        "https://api.twilio.com/2010-04-01",
        auth=("ACxxxxx", "auth_token"),
    )

asyncio.run(main())
Actual behavior

DeprecationWarning: BasicAuth is deprecated and will be removed in aiohttp 4.0; use aiohttp.encode_basic_auth() with headers={'Authorization': ...} instead

Expected behavior

no deprecation warning

twilio-python version

9.10.9

Python version

3.14

Logs or error messages

No response

Additional context

https://github.com/aio-libs/aiohttp/pull/12499

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the AsyncTwilioHttpClient request entry point shown in the issue and trace how the auth tuple is passed to aiohttp. Update the authentication handling so aiohttp 3.14+ emits no BasicAuth deprecation warning, then verify the request behavior with the client’s existing tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.