typing for httpx.ASGITransport does not allow starlette applications #2832
Unanswered
RommelLayco
asked this question in
Potential Issue
Replies: 2 comments
-
I can reproduce this with starlette 0.31.1 and httpx 0.25.0. The key is that Possible FixLoose master...YDX-2147483647:httpx:message-typing or YDX-2147483647@be45c13 Note Mypy is happy about that, but I have NOT checked other things. Therefore no PR for now. |
Beta Was this translation helpful? Give feedback.
0 replies
-
looks like it's solved now |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The typing for the app field in
httpx.ASGITransport
was changed #2468.Previously the type of the app field was a
Callable
now it ishttpx/httpx/_transports/asgi.py
Lines 22 to 24 in 053bc57
This causes apps that uses starlette to fail the type check when using mypy.
Steps to reproduce
NB taken from https://www.python-httpx.org/async/#calling-into-python-web-apps
mypy example.py
Expected
mypy to pass no errors
Actual
Beta Was this translation helpful? Give feedback.
All reactions