Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

### Fixed

- `opentelemetry-instrumentation-httpx` Fix `RequestInfo`/`ResponseInfo` type hints
([#3105](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3105))

## Version 1.29.0/0.50b0 (2024-12-11)

### Added
Expand Down
2 changes: 2 additions & 0 deletions docs/nitpick-exceptions.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ py-class=
httpx.SyncByteStream
httpx.AsyncByteStream
httpx.Response
httpx.URL
httpx.Headers
aiohttp.web_request.Request
yarl.URL
cimpl.Producer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ async def async_response_hook(span, request, response):
---
"""

from __future__ import annotations

import logging
import typing
from asyncio import iscoroutinefunction
Expand Down Expand Up @@ -249,8 +251,8 @@ async def async_response_hook(span, request, response):

class RequestInfo(typing.NamedTuple):
method: bytes
url: URL
headers: typing.Optional[Headers]
url: httpx.URL
headers: httpx.Headers | None
stream: typing.Optional[
typing.Union[httpx.SyncByteStream, httpx.AsyncByteStream]
]
Expand All @@ -259,7 +261,7 @@ class RequestInfo(typing.NamedTuple):

class ResponseInfo(typing.NamedTuple):
status_code: int
headers: typing.Optional[Headers]
headers: httpx.Headers | None
stream: typing.Iterable[bytes]
extensions: typing.Optional[dict]

Expand Down
Loading