Skip to content

Commit

Permalink
FIX: remove aiohttp leftovers (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
650elx authored Dec 19, 2024
1 parent 3d24434 commit bbde736
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ For handling all possible exceptions thrown by this SDK use `SinchException` (su

By default, two HTTP implementations are provided:
- Synchronous using `requests` HTTP library
- Asynchronous using `aiohttp` HTTP library
- Asynchronous using `httpx` HTTP library

For creating custom HTTP client code, use either `SinchClient` or `SinchClientAsync` client and inject your transport during initialisation:
```python
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "sinch"
description = "Sinch SDK for Python programming language"
version = "1.1.0"
version = "1.1.1"
license = "Apache 2.0"
readme = "README.md"
authors = [
Expand Down
1 change: 0 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ pytest
flake8
bandit
requests
aiohttp
flask
fastapi
httpx
Expand Down
2 changes: 1 addition & 1 deletion sinch/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
""" Sinch Python SDK
To access Sinch resources, use the Sync or Async version of the Sinch Client.
"""
__version__ = "1.1.0"
__version__ = "1.1.1"

from sinch.core.clients.sinch_client_sync import SinchClient
from sinch.core.clients.sinch_client_async import SinchClientAsync
Expand Down
2 changes: 1 addition & 1 deletion sinch/core/clients/sinch_client_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
class SinchClientAsync(SinchClientBase):
"""
Asynchronous implementation of the Sinch Client
By default this implementation uses HTTPTransportAioHTTP based on AioHTTP library
By default this implementation uses HTTPXTransport based on httpx library
Custom Async HTTPTransport implementation can be provided via `transport` argument
"""
def __init__(
Expand Down
4 changes: 2 additions & 2 deletions sinch/core/ports/http_transport.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import aiohttp
import httpx
from abc import ABC, abstractmethod
from platform import python_version
from sinch.core.endpoint import HTTPEndpoint
Expand Down Expand Up @@ -128,7 +128,7 @@ def handle_response(self, endpoint: HTTPEndpoint, http_response: HTTPResponse):
class AsyncHTTPTransport(HTTPTransport):
async def authenticate(self, endpoint, request_data):
if endpoint.HTTP_AUTHENTICATION == HTTPAuthentication.BASIC.value:
request_data.auth = aiohttp.BasicAuth(
request_data.auth = httpx.BasicAuth(
self.sinch.configuration.key_id,
self.sinch.configuration.key_secret
)
Expand Down

0 comments on commit bbde736

Please sign in to comment.