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. |
0 replies
|
looks like it's solved now |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
All reactions