Switched HTTP client JSON serialization to orjson for outgoing requests.
CI / Formatting (push) Successful in 5s
CI / Linting (push) Successful in 5s
CI / Tests (Python 3.12) (push) Successful in 13s
CI / Tests (Python 3.13) (push) Successful in 13s
CI / Tests (Python 3.14) (push) Successful in 10s
CI / Type Checking (push) Successful in 9s
CI / Spelling (push) Successful in 5s
CI / Formatting (push) Successful in 5s
CI / Linting (push) Successful in 5s
CI / Tests (Python 3.12) (push) Successful in 13s
CI / Tests (Python 3.13) (push) Successful in 13s
CI / Tests (Python 3.14) (push) Successful in 10s
CI / Type Checking (push) Successful in 9s
CI / Spelling (push) Successful in 5s
This commit is contained in:
@@ -23,6 +23,7 @@ import logging
|
||||
from typing import Any
|
||||
|
||||
import aiohttp
|
||||
import orjson
|
||||
|
||||
logger = logging.getLogger("owlbot.http")
|
||||
|
||||
@@ -68,6 +69,7 @@ class HttpClient:
|
||||
self._session = aiohttp.ClientSession(
|
||||
connector=connector,
|
||||
timeout=timeout,
|
||||
json_serialize=lambda obj: orjson.dumps(obj).decode(),
|
||||
headers={
|
||||
"User-Agent": (
|
||||
f"Owlbot/{__version__} "
|
||||
|
||||
Reference in New Issue
Block a user