Skip to content

[gunicorn] Use TypedDict for proxy_protocol_info#16003

Open
Ashid332 wants to merge 5 commits into
python:mainfrom
Ashid332:gunicorn-proxy-protocol-info
Open

[gunicorn] Use TypedDict for proxy_protocol_info#16003
Ashid332 wants to merge 5 commits into
python:mainfrom
Ashid332:gunicorn-proxy-protocol-info

Conversation

@Ashid332

Copy link
Copy Markdown

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

Copy link
Copy Markdown
Contributor

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

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.

1 participant