Fix CI on Python 3.11 + Windows (#3547)

This commit is contained in:
Bibo-Joshi 2023-02-09 18:58:36 +01:00 committed by GitHub
parent 217a5f929e
commit 5cff9adb55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -117,13 +117,15 @@ class HTTPXRequest(BaseRequest):
http1 = http_version == "1.1"
self._client_kwargs = {
"timeout": timeout,
"proxies": proxy_url,
"limits": limits,
"http1": http1,
"http2": not http1,
}
# See https://github.com/python-telegram-bot/python-telegram-bot/pull/3542
# for why we need to use `dict()` here.
self._client_kwargs = dict( # pylint: disable=use-dict-literal
timeout=timeout,
proxies=proxy_url,
limits=limits,
http1=http1,
http2=not http1,
)
try:
self._client = self._build_client()