Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update httpx requirement from >=0.23,<0.28 to >=0.23,<0.29 in /packages/http/httpx #412

Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/http/httpx/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ python = ">=3.8,<4.0"
microsoft-kiota-abstractions = {path="../../abstractions/", develop=true}
opentelemetry-api = ">=1.27.0"
opentelemetry-sdk = ">=1.27.0"
httpx = {extras = ["http2"], version = ">=0.23,<0.28"}
httpx = {extras = ["http2"], version = ">=0.23,<0.29"}
baywet marked this conversation as resolved.
Show resolved Hide resolved
urllib3 = "^2.2.2"

[tool.poetry.group.dev.dependencies]
Expand Down
8 changes: 4 additions & 4 deletions packages/http/httpx/tests/test_httpx_request_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def test_enable_backing_store(request_adapter):

@pytest.mark.asyncio
async def test_get_root_parse_node(request_adapter, simple_success_response):
assert simple_success_response.text == '{"message": "Success!"}'
assert simple_success_response.text == '{"message":"Success!"}'
assert simple_success_response.status_code == 200
content_type = request_adapter.get_response_content_type(simple_success_response)
assert content_type == "application/json"
Expand All @@ -118,7 +118,7 @@ async def test_get_root_parse_node_no_content_type_header_return_null(
@pytest.mark.asyncio
async def test_does_not_throw_failed_responses_on_success(request_adapter, simple_success_response):
try:
assert simple_success_response.text == '{"message": "Success!"}'
assert simple_success_response.text == '{"message":"Success!"}'
assert simple_success_response.status_code == 200
content_type = request_adapter.get_response_content_type(simple_success_response)
assert content_type == "application/json"
Expand All @@ -130,7 +130,7 @@ async def test_does_not_throw_failed_responses_on_success(request_adapter, simpl
async def test_throw_failed_responses_null_error_map(
request_adapter, simple_error_response, mock_otel_span
):
assert simple_error_response.text == '{"error": "not found"}'
assert simple_error_response.text == '{"error":"not found"}'
assert simple_error_response.status_code == 404
content_type = request_adapter.get_response_content_type(simple_error_response)
assert content_type == "application/json"
Expand All @@ -149,7 +149,7 @@ async def test_throw_failed_responses_null_error_map(
async def test_throw_failed_responses_no_error_class(
request_adapter, simple_error_response, mock_error_500_map, mock_otel_span
):
assert simple_error_response.text == '{"error": "not found"}'
assert simple_error_response.text == '{"error":"not found"}'
assert simple_error_response.status_code == 404
content_type = request_adapter.get_response_content_type(simple_error_response)
assert content_type == "application/json"
Expand Down
12 changes: 6 additions & 6 deletions packages/http/httpx/tests/test_kiota_client_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ def test_create_with_default_middleware_custom_client_with_proxy():
"""Test creation of HTTP Client using default middleware while providing
a custom client"""
proxies = {
"http://": "http://localhost:8030",
"https://": "http://localhost:8031",
"http://": httpx.HTTPTransport(proxy="http://localhost:8030"),
"https://": httpx.HTTPTransport(proxy="http://localhost:8031"),
}
timeout = httpx.Timeout(20, connect=10)
custom_client = httpx.AsyncClient(timeout=timeout, http2=True, proxies=proxies)
custom_client = httpx.AsyncClient(timeout=timeout, http2=True, mounts=proxies)
client = KiotaClientFactory.create_with_default_middleware(custom_client)

assert isinstance(client, httpx.AsyncClient)
Expand Down Expand Up @@ -96,11 +96,11 @@ def test_create_with_custom_middleware_custom_client_with_proxy():
"""Test creation of HTTP Client using custom middleware while providing
a custom client"""
proxies = {
"http://": "http://localhost:8030",
"https://": "http://localhost:8031",
"http://": httpx.HTTPTransport(proxy="http://localhost:8030"),
"https://": httpx.HTTPTransport(proxy="http://localhost:8031"),
}
timeout = httpx.Timeout(20, connect=10)
custom_client = httpx.AsyncClient(timeout=timeout, http2=True, proxies=proxies)
custom_client = httpx.AsyncClient(timeout=timeout, http2=True, mounts=proxies)
middleware = [
RetryHandler(),
]
Expand Down
Loading