Skip to content
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

Drop-in replacement for proxies argument in (httpx.post) #3424

Closed
qqaatw opened this issue Nov 29, 2024 · 7 comments
Closed

Drop-in replacement for proxies argument in (httpx.post) #3424

qqaatw opened this issue Nov 29, 2024 · 7 comments

Comments

@qqaatw
Copy link

qqaatw commented Nov 29, 2024

Hi,

Since version 0.28, the proxies argument is fully deprecated and removed. #2879 indicates that we should use mounts if we have multiple schemas to be proxied over. However, httpx.post doesn't have mounts argument.

Is there a way to

  1. use the new proxy argument, specifying both http & https schemas?
  2. add an argument mounts to httpx.post and relevant methods?

Thanks.

@Lroemon
Copy link

Lroemon commented Nov 29, 2024

Removing an argument & doing a minor update is criminal. Lost all the day yesterday to figure out why opanai library was not working in the new build for the production environment...

@tomchristie
Copy link
Member

tomchristie commented Nov 29, 2024

@Lroemon Do you know what version range of httpx the openai client currently pinned against?

@tomchristie
Copy link
Member

@qqaatw 👉 client = httpx.Client()

@tomchristie tomchristie closed this as not planned Won't fix, can't repro, duplicate, stale Nov 29, 2024
@tomchristie tomchristie reopened this Nov 29, 2024
@qqaatw
Copy link
Author

qqaatw commented Nov 29, 2024

Can I please re-open the issue? I meant, is there a way not explicitly creating Client() and also able to use the functionality of the previous proxies argument?

@tomchristie
Copy link
Member

I meant, is there a way not explicitly creating Client() and also able to use the functionality of the previous proxies argument?

Appreciate the clear question.

There is not. You’ll need an explicit client instance to do that.

@qqaatw
Copy link
Author

qqaatw commented Nov 29, 2024

I see, thanks for the clarification. If there is any chance, I would propose to add a new mounts argument to methods like https.post.

@ChillarAnand
Copy link

Removing an argument & doing a minor update is criminal. Lost all the day yesterday to figure out why opanai library was not working in the new build for the production environment...

This was marked as deprecated in 0.26.0 version itself.

https://github.com/encode/httpx/releases/tag/0.26.0

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

No branches or pull requests

4 participants