Bug Report: traceloop-sdk imports requests and httpx without declaring them

Author: RosieOhCreated Sep 29, 2026Updated Sep 30, 2026

Which component is this bug for?

Traceloop SDK

Description

traceloop-sdk 0.62.3 imports requests and httpx when traceloop.sdk is imported, but neither is listed in its dependencies. In a clean environment, from traceloop.sdk import Traceloop fails with ModuleNotFoundError.

This probably went unnoticed because other packages usually install them: up to OpenTelemetry 1.44, opentelemetry-exporter-otlp-proto-http depended on requests, and SDKs like openai install httpx. OpenTelemetry Python 1.45.0 (released 2026-09-25) moved the HTTP exporter to urllib3 (open-telemetry/opentelemetry-python#5389), so requests is no longer installed transitively, and a plain pip install traceloop-sdk now fails at import.

Reproduction steps

bash
python3.12 -m venv v && . v/bin/activate
pip install traceloop-sdk==0.62.3        # resolves opentelemetry-sdk 1.45.0
python -c "from traceloop.sdk import Traceloop"

With OpenTelemetry pinned to 1.44.0 (pip install traceloop-sdk==0.62.3 opentelemetry-sdk==1.44.0 opentelemetry-exporter-otlp-proto-http==1.44.0), requests is installed, and the same import fails on httpx instead.

Expected behavior

from traceloop.sdk import Traceloop works after pip install traceloop-sdk alone.

Actual Behavior with Screenshots

With OpenTelemetry 1.45.0:

  File ".../traceloop/sdk/__init__.py", line 17, in <module>
  File ".../traceloop/sdk/images/image_uploader.py", line 5, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'

With OpenTelemetry 1.44.0:

  File ".../traceloop/sdk/__init__.py", line 34, in <module>
    from traceloop.sdk.client.client import Client
  ...
  File ".../traceloop/sdk/evaluator/evaluator.py", line 1, in <module>
    import httpx
ModuleNotFoundError: No module named 'httpx'

Python Version

3.12

Provide any additional context for the Bug.

Modules in 0.62.3 that import them:

  • requests: sdk/client/http.py, sdk/datasets/attachment.py, sdk/fetcher.py, sdk/images/image_uploader.py
  • httpx: sdk/client/client.py, sdk/evaluator/evaluator.py, sdk/evaluator/stream_client.py, sdk/experiment/experiment.py, sdk/guardrail/guardrail.py

packages/traceloop-sdk/pyproject.toml on main doesn't list either of them. Adding requests and httpx to the dependencies fixes the import. A similar case after the OpenTelemetry 1.45 release: appsignal/appsignal-python#291.

Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find similar issue

Are you willing to submit PR?

  • Yes I am willing to submit a PR!