[BUG] BasicAuth is deprecated and will be removed in aiohttp 4.0
Open
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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