Update httpx requirement from ~=0.25.2 to ~=0.26.0 (#4024)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Co-authored-by: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com>
This commit is contained in:
dependabot[bot] 2023-12-29 22:32:07 +01:00 committed by GitHub
parent 2345bfbb53
commit a52c91996e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 20 additions and 17 deletions

View file

@ -1,4 +1,4 @@
# Make sure that the additional_dependencies here match requirements.txt # Make sure that the additional_dependencies here match requirements(-opts).txt
ci: ci:
autofix_prs: false autofix_prs: false
@ -28,7 +28,7 @@ repos:
- --jobs=0 - --jobs=0
additional_dependencies: additional_dependencies:
- httpx~=0.25.2 - httpx~=0.26.0
- tornado~=6.4 - tornado~=6.4
- APScheduler~=3.10.4 - APScheduler~=3.10.4
- cachetools~=5.3.2 - cachetools~=5.3.2
@ -44,7 +44,7 @@ repos:
- types-pytz - types-pytz
- types-cryptography - types-cryptography
- types-cachetools - types-cachetools
- httpx~=0.25.2 - httpx~=0.26.0
- tornado~=6.4 - tornado~=6.4
- APScheduler~=3.10.4 - APScheduler~=3.10.4
- cachetools~=5.3.2 - cachetools~=5.3.2
@ -83,7 +83,7 @@ repos:
name: ruff name: ruff
files: ^(telegram|examples|tests)/.*\.py$ files: ^(telegram|examples|tests)/.*\.py$
additional_dependencies: additional_dependencies:
- httpx~=0.25.2 - httpx~=0.26.0
- tornado~=6.4 - tornado~=6.4
- APScheduler~=3.10.4 - APScheduler~=3.10.4
- cachetools~=5.3.2 - cachetools~=5.3.2

View file

@ -135,7 +135,7 @@ As these features are *optional*, the corresponding 3rd party dependencies are n
Instead, they are listed as optional dependencies. Instead, they are listed as optional dependencies.
This allows to avoid unnecessary dependency conflicts for users who don't need the optional features. This allows to avoid unnecessary dependency conflicts for users who don't need the optional features.
The only required dependency is `httpx ~= 0.25.2 <https://www.python-httpx.org>`_ for The only required dependency is `httpx ~= 0.26.0 <https://www.python-httpx.org>`_ for
``telegram.request.HTTPXRequest``, the default networking backend. ``telegram.request.HTTPXRequest``, the default networking backend.
``python-telegram-bot`` is most useful when used along with additional libraries. ``python-telegram-bot`` is most useful when used along with additional libraries.

View file

@ -136,7 +136,7 @@ As these features are *optional*, the corresponding 3rd party dependencies are n
Instead, they are listed as optional dependencies. Instead, they are listed as optional dependencies.
This allows to avoid unnecessary dependency conflicts for users who don't need the optional features. This allows to avoid unnecessary dependency conflicts for users who don't need the optional features.
The only required dependency is `httpx ~= 0.25.2 <https://www.python-httpx.org>`_ for The only required dependency is `httpx ~= 0.26.0 <https://www.python-httpx.org>`_ for
``telegram.request.HTTPXRequest``, the default networking backend. ``telegram.request.HTTPXRequest``, the default networking backend.
``python-telegram-bot`` is most useful when used along with additional libraries. ``python-telegram-bot`` is most useful when used along with additional libraries.

View file

@ -6,4 +6,4 @@
# versions and only increase the lower bound if necessary # versions and only increase the lower bound if necessary
# httpx has no stable release yet, so let's be cautious for now # httpx has no stable release yet, so let's be cautious for now
httpx ~= 0.25.2 httpx ~= 0.26.0

View file

@ -167,7 +167,7 @@ class HTTPXRequest(BaseRequest):
) )
self._client_kwargs = { self._client_kwargs = {
"timeout": timeout, "timeout": timeout,
"proxies": proxy, "proxy": proxy,
"limits": limits, "limits": limits,
"transport": transport, "transport": transport,
**http_kwargs, **http_kwargs,

View file

@ -120,7 +120,7 @@ class TestApplicationBuilder:
@dataclass @dataclass
class Client: class Client:
timeout: object timeout: object
proxies: object proxy: object
limits: object limits: object
http1: object http1: object
http2: object http2: object
@ -150,7 +150,7 @@ class TestApplicationBuilder:
assert get_updates_client.limits == httpx.Limits( assert get_updates_client.limits == httpx.Limits(
max_connections=1, max_keepalive_connections=1 max_connections=1, max_keepalive_connections=1
) )
assert get_updates_client.proxies is None assert get_updates_client.proxy is None
assert get_updates_client.timeout == httpx.Timeout( assert get_updates_client.timeout == httpx.Timeout(
connect=5.0, read=5.0, write=5.0, pool=1.0 connect=5.0, read=5.0, write=5.0, pool=1.0
) )
@ -159,7 +159,7 @@ class TestApplicationBuilder:
client = app.bot.request._client client = app.bot.request._client
assert client.limits == httpx.Limits(max_connections=256, max_keepalive_connections=256) assert client.limits == httpx.Limits(max_connections=256, max_keepalive_connections=256)
assert client.proxies is None assert client.proxy is None
assert client.timeout == httpx.Timeout(connect=5.0, read=5.0, write=5.0, pool=1.0) assert client.timeout == httpx.Timeout(connect=5.0, read=5.0, write=5.0, pool=1.0)
assert client.http1 is True assert client.http1 is True
assert not client.http2 assert not client.http2
@ -378,7 +378,7 @@ class TestApplicationBuilder:
@dataclass @dataclass
class Client: class Client:
timeout: object timeout: object
proxies: object proxy: object
limits: object limits: object
http1: object http1: object
http2: object http2: object
@ -396,7 +396,7 @@ class TestApplicationBuilder:
assert client.timeout == httpx.Timeout(pool=3, connect=2, read=4, write=5) assert client.timeout == httpx.Timeout(pool=3, connect=2, read=4, write=5)
assert client.limits == httpx.Limits(max_connections=1, max_keepalive_connections=1) assert client.limits == httpx.Limits(max_connections=1, max_keepalive_connections=1)
assert client.proxies == "proxy" assert client.proxy == "proxy"
assert client.http1 is True assert client.http1 is True
assert client.http2 is False assert client.http2 is False
@ -414,7 +414,7 @@ class TestApplicationBuilder:
assert client.timeout == httpx.Timeout(pool=3, connect=2, read=4, write=5) assert client.timeout == httpx.Timeout(pool=3, connect=2, read=4, write=5)
assert client.limits == httpx.Limits(max_connections=1, max_keepalive_connections=1) assert client.limits == httpx.Limits(max_connections=1, max_keepalive_connections=1)
assert client.proxies == "get_updates_proxy" assert client.proxy == "get_updates_proxy"
assert client.http1 is True assert client.http1 is True
assert client.http2 is False assert client.http2 is False

View file

@ -410,6 +410,9 @@ class TestRequestWithoutRequest:
DEFAULT_NONE, DEFAULT_NONE,
) )
print("warnings")
for entry in recwarn:
print(entry.message)
if media: if media:
assert len(recwarn) == 1 assert len(recwarn) == 1
assert "will default to `BaseRequest.DEFAULT_NONE` instead of 20" in str( assert "will default to `BaseRequest.DEFAULT_NONE` instead of 20" in str(
@ -435,7 +438,7 @@ class TestHTTPXRequestWithoutRequest:
@dataclass @dataclass
class Client: class Client:
timeout: object timeout: object
proxies: object proxy: object
limits: object limits: object
http1: object http1: object
http2: object http2: object
@ -445,7 +448,7 @@ class TestHTTPXRequestWithoutRequest:
request = HTTPXRequest() request = HTTPXRequest()
assert request._client.timeout == httpx.Timeout(connect=5.0, read=5.0, write=5.0, pool=1.0) assert request._client.timeout == httpx.Timeout(connect=5.0, read=5.0, write=5.0, pool=1.0)
assert request._client.proxies is None assert request._client.proxy is None
assert request._client.limits == httpx.Limits( assert request._client.limits == httpx.Limits(
max_connections=1, max_keepalive_connections=1 max_connections=1, max_keepalive_connections=1
) )
@ -461,7 +464,7 @@ class TestHTTPXRequestWithoutRequest:
"pool_timeout": 46, "pool_timeout": 46,
} }
request = HTTPXRequest(**kwargs) request = HTTPXRequest(**kwargs)
assert request._client.proxies == "proxy" assert request._client.proxy == "proxy"
assert request._client.limits == httpx.Limits( assert request._client.limits == httpx.Limits(
max_connections=42, max_keepalive_connections=42 max_connections=42, max_keepalive_connections=42
) )