Skip to content

Install httpx without pulling anyio, trio and socks #3181

Closed

Description

@tbarbugli

I have these dependencies installed with Poetry

[tool.poetry.dependencies]
python = ">=3.8.1,<4.0.0"
httpx = "^0.27.0"

This adds additional dependencies such as anyio, trio and socks that I am not using in the project. Unfortunately these dependencies come from httpx's httpcore dependency.

Is there a way to only get httpcore with no additional async libs?

Activity

  1. lovelydinosaur commented on Apr 30, 2024

    @lovelydinosaur
    Member

    httpx doesn't pull in trio or socks by default. (Perhaps take a closer look into why these are being included in your Python environment?)

    It does currently pull in anyio and sniffio by default, and we're working on removing this. #2858

  2. locked and limited conversation to collaborators on Apr 30, 2024
  3. converted this issue into a discussion #3182 on Apr 30, 2024
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