Skip to content

[gunicorn] Use TypedDict for proxy_protocol_info#16003

Merged
srittau merged 6 commits into
python:mainfrom
Ashid332:gunicorn-proxy-protocol-info
Jul 24, 2026
Merged

[gunicorn] Use TypedDict for proxy_protocol_info#16003
srittau merged 6 commits into
python:mainfrom
Ashid332:gunicorn-proxy-protocol-info

Conversation

@Ashid332

Copy link
Copy Markdown
Contributor

This PR extracts the inline TypedDict declarations for proxy_protocol_info from gunicorn.asgi.parser into the shared gunicorn._types module and reuses them consistently across all affected gunicorn stubs.

This fully resolves the TODO: Use TypedDict annotations for this attribute and increases the strictness of the type annotations without affecting runtime behavior.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Ashid332 added 2 commits July 11, 2026 14:23
Moving the TypedDict definitions back to parser.pyi (where they are used internally) and importing them directly in other files avoids the need for an unused intermediate alias and any
oqa pragmas, conforming to strict typeshed style.
@github-actions

This comment has been minimized.

@Ashid332 Ashid332 closed this Jul 11, 2026
@github-actions

This comment has been minimized.

@Ashid332 Ashid332 reopened this Jul 11, 2026
@github-actions

This comment has been minimized.

@donbarbos donbarbos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! LGTM

@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau
srittau merged commit 29a510f into python:main Jul 24, 2026
59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants