Repository: aio-libs/aiohttp
Pull request: Add aiohttp.tracing.TraceRequestHeadersSentParams into the top level file.
<!-- Thank you for your contribution! -->

## What do these changes do?
Add aiohttp.tracing.TraceRequestHeadersSentParams into the top level file

<!-- Please give a short brief about these changes. -->

## Are there changes in behavior for the user?
Typehints change from aiohttp.tracing.TraceRequestHeadersSent to aiohttp.TraceRequestHeadersSent.

<!-- Outline any notable behaviour for the end users. -->

## Is it a substantial burden for the maintainers to support this?
No.
<!--
Stop right there! Pause. Just for a minute... Can you think of anything
obvious that would complicate the ongoing development of this project?

Try to consider if you'd be able to maintain it throughout the next
5 years. Does it seem viable? Tell us your thoughts! We'd very much
love to hear what the consequences of merging this patch might be...

This will help us assess if your change is something we'd want to
entertain early in the review process. Thank you in advance!
-->

## Related issue number
Fixes #8946 
<!-- Are there any issues opened that will be resolved by merging this change? -->
<!-- Remember to prefix with 'Fixes' if it should close the issue (e.g. 'Fixes #123'). -->

## Checklist

- [x] I think the code is well written
- [ ] Unit tests for the changes exist
- [x] Documentation reflects the changes
- [ ] If you provide code modification, please add yourself to `CONTRIBUTORS.txt`
  * The format is &lt;Name&gt; &lt;Surname&gt;.
  * Please keep alphabetical order, the file is sorted by names.
- [ ] Add a new news fragment into the `CHANGES/` folder
  * name it `<issue_or_pr_num>.<type>.rst` (e.g. `588.bugfix.rst`)
  * if you don't have an issue number, change it to the pull request
    number after creating the PR
    * `.bugfix`: A bug fix for something the maintainers deemed an
      improper undesired behavior that got corrected to match
      pre-agreed expectations.
    * `.feature`: A new behavior, public APIs. That sort of stuff.
    * `.deprecation`: A declaration of future API removals and breaking
      changes in behavior.
    * `.breaking`: When something public is removed in a breaking way.
      Could be deprecated in an earlier release.
    * `.doc`: Notable updates to the documentation structure or build
      process.
    * `.packaging`: Notes for downstreams about unobvious side effects
      and tooling. Changes in the test invocation considerations and
      runtime assumptions.
    * `.contrib`: Stuff that affects the contributor experience. e.g.
      Running tests, building the docs, setting up the development
      environment.
    * `.misc`: Changes that are hard to assign to any of the above
      categories.
  * Make sure to use full sentences with correct case and punctuation,
    for example:
    ```rst
    Fixed issue with non-ascii contents in doctest text files
    -- by :user:`contributor-gh-handle`.
    ```

    Use the past tense or the present tense a non-imperative mood,
    referring to what's changed compared to the last released version
    of this project.


Problem statement:
on_request_headers_sent params type was never imported into the top-level file.
### 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

```python-traceback
params: aiohttp.TraceRequestHeadersSentParams
Type of parameter "params" is unknown (PylancereportUnknownParameterType)
(parameter) params: Unknown
```


### Python Version

```console
$ python --version
Python 3.12.4
```


### aiohttp Version

```console
$ 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

```console
$ 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

```console
$ 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

- [X] I agree to follow the aio-libs Code of Conduct

Hints from issue discussion:
As you've already identified the solution, it'd be great if you could just put the fix in a PR.
> 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.

Commit message: [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Patch to review:
diff --git a/aiohttp/__init__.py b/aiohttp/__init__.py
index 43025000315..7a9faa8b44d 100644
--- a/aiohttp/__init__.py
+++ b/aiohttp/__init__.py
@@ -102,6 +102,7 @@
     TraceRequestChunkSentParams,
     TraceRequestEndParams,
     TraceRequestExceptionParams,
+    TraceRequestHeadersSentParams,
     TraceRequestRedirectParams,
     TraceRequestStartParams,
     TraceResponseChunkReceivedParams,
@@ -216,7 +217,7 @@
     "TraceRequestChunkSentParams",
     "TraceRequestEndParams",
     "TraceRequestExceptionParams",
-    "TraceRequestRedirectParams",
+    "TraceRequestHeadersSentParams" "TraceRequestRedirectParams",
     "TraceRequestStartParams",
     "TraceResponseChunkReceivedParams",
     # workers (imported lazily with __getattr__)


Code review comments:
diff_hunk: @@ -216,7 +217,7 @@
     "TraceRequestChunkSentParams",
     "TraceRequestEndParams",
     "TraceRequestExceptionParams",
-    "TraceRequestRedirectParams",
+    "TraceRequestHeadersSentParams" "TraceRequestRedirectParams",
path: aiohttp/__init__.py
text: @user1:
```suggestion
    "TraceRequestHeadersSentParams".
    "TraceRequestRedirectParams",
```