Skip to content

ImportError: cannot import name 'VerifyTypes' from 'httpx._types' #796

@theagenticguy

Description

@theagenticguy

langserve/client.py imports VerifyTypes from encode/httpx ._types and results in an import error. I did a bit of digging on commit history in this repo and httpx and can't figure out what is the breaking change, or when this 'VerifyTypes' thing went missing 🤷

Simply removing VerifyTypes from client.py line 24 fixes the import error.

Environment:

❯ python --version && pip list
Python 3.12.7
Package                  Version
------------------------ -----------
aiohappyeyeballs         2.4.3
aiohttp                  3.11.8
aiosignal                1.3.1
annotated-types          0.7.0
anyio                    4.6.2.post1
attrs                    24.2.0
bandit                   1.8.0
boto3                    1.35.71
boto3-stubs              1.35.71
boto3-stubs-full         1.35.71
botocore                 1.35.71
botocore-stubs           1.35.71
certifi                  2024.8.30
charset-normalizer       3.4.0
click                    8.1.7
fastapi                  0.115.5
frozenlist               1.5.0
greenlet                 3.1.1
h11                      0.14.0
httpcore                 1.0.7
httpx                    0.28.0
httpx-sse                0.4.0
idna                     3.10
iniconfig                2.0.0
jmespath                 1.0.1
jsonpatch                1.33
jsonpointer              3.0.0
langchain                0.3.9
langchain-aws            0.2.7
langchain-core           0.3.21
langchain-text-splitters 0.3.2
langgraph                0.2.53
langgraph-checkpoint     2.0.7
langgraph-sdk            0.1.40
langserve                0.3.0
langsmith                0.1.147
loguru                   0.7.2
markdown-it-py           3.0.0
mdurl                    0.1.2
msgpack                  1.1.0
multidict                6.1.0
numpy                    1.26.4
orjson                   3.10.12
packaging                24.2
pandas                   2.2.3
pbr                      6.1.0
pdf2image                1.17.0
pillow                   11.0.0
pip                      24.2
pluggy                   1.5.0
propcache                0.2.0
pydantic                 2.10.2
pydantic_core            2.27.1
Pygments                 2.18.0
pytest                   8.3.3
python-dateutil          2.9.0.post0
pytz                     2024.2
PyYAML                   6.0.2
requests                 2.32.3
requests-toolbelt        1.0.0
rich                     13.9.4
ruff                     0.7.4
s3transfer               0.10.4
six                      1.16.0
sniffio                  1.3.1
SQLAlchemy               2.0.36
sse-starlette            2.1.3
starlette                0.41.3
stevedore                5.4.0
tenacity                 9.0.0
types-awscrt             0.23.1
types-s3transfer         0.10.4
typing_extensions        4.12.2
tzdata                   2024.2
urllib3                  2.2.3
uvicorn                  0.32.1
yarl                     1.18.0

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