typing for httpx.ASGITransport does not allow starlette applications #2832
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.
-
|
looks like it's solved now |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The typing for the app field in
httpx.ASGITransportwas changed #2468.Previously the type of the app field was a
Callablenow 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.pyExpected
mypy to pass no errors
Actual
Beta Was this translation helpful? Give feedback.
All reactions