Skip to content

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

Description

@ericbuehl

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

aio-libs/aiohttp#12499

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugbug in the library

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions