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

on_request_headers_sent params type was never imported into the top-level file. #8946

Closed
1 task done
Hadock-is-ok opened this issue Aug 30, 2024 · 2 comments · Fixed by #8947
Closed
1 task done
Labels

Comments

@Hadock-is-ok
Copy link
Contributor

Describe the bug

aiohttp.tracing.TraceRequestHeadersSentParams exists in aiohttp/tracing.py, but wasn't imported into _main_.py like the other param types.

To Reproduce

file: main.py

import aiohttp
from types import SimpleNamespace

trace_config = aiohttp.TraceConfig()

async def on_request_headers_sent(session: aiohttp.ClientSession, trace_config_ctx: SimpleNamespace, params: aiohttp.TraceRequestHeadersSentParams):
...

Expected behavior

aiohttp.TraceRequestHeadersSentParams would be a valid typehint and no issues would occur.

Logs/tracebacks

params: aiohttp.TraceRequestHeadersSentParams
Type of parameter "params" is unknown (PylancereportUnknownParameterType)
(parameter) params: Unknown

Python Version

$ python --version
Python 3.12.4

aiohttp Version

$ python -m pip show aiohttp
Name: aiohttp
Version: 3.10.3
Location: venv/lib/python3.12/site-packages
Requires: aiohappyeyeballs, aiosignal, attrs, frozenlist, multidict, yarl

multidict Version

$ python -m pip show multidict
Name: multidict
Version: 6.0.5
Location: venv/lib/python3.12/site-packages
Requires:
Required-by: aiohttp, yarl

yarl Version

$ python -m pip show yarl
Name: yarl
Version: 1.9.4
Location: venv/lib/python3.12/site-packages
Requires: idna, multidict
Required-by: aiohttp, wavelink

OS

macOS Monterey (12.7.6)

Related component

Client

Additional context

No response

Code of Conduct

  • I agree to follow the aio-libs Code of Conduct
@Dreamsorcerer
Copy link
Member

As you've already identified the solution, it'd be great if you could just put the fix in a PR.

@Hadock-is-ok
Copy link
Contributor Author

As you've already identified the solution, it'd be great if you could just put the fix in a PR.

If you've said this 4 minutes earlier I'd be able to 😅
Rest assured I'll get on a pc in ~30 minutes and make one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants