Skip to content

trace_request_ctx type is too restrictive #9397

Closed
@layday

Description

Describe the bug

As of #8620, the request method's trace_request_ctx parameter is typed as taking a Mapping[str, str]. A value of str seems like an odd restriction to impose and other types are used in the wild. Some examples:

To Reproduce

n/a

Expected behavior

That a wider type would be accepted.

Logs/tracebacks

n/a

Python Version

$ python --version
3.12.5

aiohttp Version

$ python -m pip show aiohttp
3.10.8

multidict Version

$ python -m pip show multidict
6.1.0

yarl Version

$ python -m pip show yarl
1.13.1

OS

macOS

Related component

Client

Additional context

No response

Code of Conduct

  • I agree to follow the aio-libs Code of Conduct

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions