-
-
Notifications
You must be signed in to change notification settings - Fork 931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix httpx private api usage #2534
Conversation
Actually, we use future annotations here. Nothing will break at runtime. 🥹🙏 |
Is there any discussion about making types available on public modules? |
USE_CLIENT_DEFAULT was already public, we can use it directly from httpx. |
I'd suggest including the type definitions explicitly inside Starlette's codebase. |
Ok. 👍 |
Wanna do it here @karpetrosyan ? |
Yep |
Do we really can add them into the starlette? |
For |
Noted. I guess there's |
We can't use that for type annotation. 👀 |
What's the plan here? @karpetrosyan |
I believe the best we can do here is to limit the upper version of HTTPX to the current version. Alternatively, we can maintain this import in HTTPX only for Starlette, but I don't believe this is a good idea. Is it critical that older versions of Starlette do not work with the most recent HTTPX? |
Shall we raise an issue for "3rd party packages using private imports of httpx"? That issue should describe what private imports starlette is currently using and why, so we can resolve whatever is causing that. |
(I say "3rd party" here because we shouldn't treat other |
I have raised encode/httpx#3176 to track all kinds of API needs in third-party packages. |
Since we are tracking the issue presented here on encode/httpx#3176, I'll close this PR. |
Refs: encode/httpx#3130
In some places, starlette uses imports from the private API, such as httpx._client, which will not work after mere of encode/httpx#3130.