Skip to content

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

Closed

Description

@qqaatw

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.

Activity

  1. Lroemon commented on Nov 29, 2024

    @Lroemon

    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...

  2. lovelydinosaur commented on Nov 29, 2024

    @lovelydinosaur
    Member

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

  3. lovelydinosaur commented on Nov 29, 2024

    @lovelydinosaur
    Member

    @qqaatw 👉 client = httpx.Client()

  4. qqaatw commented on Nov 29, 2024

    @qqaatw
    Author

    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?

  5. lovelydinosaur commented on Nov 29, 2024

    @lovelydinosaur
    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.

  6. qqaatw commented on Nov 29, 2024

    @qqaatw
    Author

    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.

  7. ChillarAnand commented on Nov 29, 2024

    @ChillarAnand

    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

  8. dgellow commented on Dec 2, 2024

    @dgellow

    @Lroemon openai-python has been updated to support httpx v0.28.0 with the release v1.55.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions