Skip to content

fix(deps): support wrapt 2.x (closes #1561)#1664

Open
wtfashwin wants to merge 1 commit into
langfuse:mainfrom
wtfashwin:fix/1561-support-wrapt-2x
Open

fix(deps): support wrapt 2.x (closes #1561)#1664
wtfashwin wants to merge 1 commit into
langfuse:mainfrom
wtfashwin:fix/1561-support-wrapt-2x

Conversation

@wtfashwin
Copy link
Copy Markdown

@wtfashwin wtfashwin commented May 20, 2026

Problem

Closes #1561.

langfuse pins wrapt>=1.14,<2, which prevents installation in environments that ship wrapt 2.x — most notably GCP Cloud Composer, which ships wrapt==2.0.1. Users hit an unresolvable dependency conflict.

As the issue notes, bumping this previously also required the transitive wrapt cap in opentelemetry-instrumentation to be lifted (open-telemetry/opentelemetry-python-contrib#3903).

Why this is now unblocked

That upstream issue is resolved: opentelemetry-instrumentation now allows wrapt>=1.0.0,<3.0.0, shipped in opentelemetry-instrumentation 0.63b0 (released 2026-05-19). langfuse's existing otel bounds already permit that release, so the langfuse-side <2 ceiling is the only remaining blocker.

Change

  • pyproject.toml: wrapt>=1.14,<2wrapt>=1.14,<3
  • Regenerated uv.lock

Compatibility

langfuse's only use of wrapt is wrapt.wrap_function_wrapper (langfuse/openai.py), whose API is unchanged across 1.x → 2.x.

Verification

  • uv lock resolves cleanly.
  • Confirmed wrapt 2.1.2 installs with langfuse's production dependencies (--no-dev) — the GCP Cloud Composer scenario.
  • Verified langfuse imports and the OpenAI integration's wrap_function_wrapper wrapping work under wrapt 2.1.2.

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

Relax the wrapt upper bound from <2 to <3 so langfuse installs in
environments that ship wrapt 2.x (e.g. GCP Cloud Composer).

The previous ceiling was kept because the transitive wrapt pin via
opentelemetry-instrumentation also capped <2. That upstream bound was
relaxed to <3 in opentelemetry-python-contrib (open-telemetry/
opentelemetry-python-contrib#3903, released in
opentelemetry-instrumentation 0.63b0), so the langfuse-side cap is now
the only blocker.

langfuse uses only wrapt.wrap_function_wrapper, whose API is unchanged
in 2.x; verified langfuse imports and wraps cleanly under wrapt 2.1.2.

Fixes langfuse#1561
@wtfashwin wtfashwin force-pushed the fix/1561-support-wrapt-2x branch from 0c89db2 to a867aeb Compare May 20, 2026 18:26
@wtfashwin
Copy link
Copy Markdown
Author

@hassiebp @wochinge — could you take a look when you have a moment?

This is a one-line dependency bump (wrapt<2wrapt<3, plus regenerated uv.lock) to close #1561. The previous blocker — the transitive wrapt<2 cap in opentelemetry-instrumentation — was lifted upstream in 0.63b0 (released 2026-05-19), which langfuse's existing otel bounds already allow. langfuse only uses wrapt.wrap_function_wrapper, whose API is unchanged in 2.x, and I verified wrapt 2.1.2 installs and wraps cleanly with the production dependency set. Happy to adjust if you'd prefer a different bound.

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

Successfully merging this pull request may close these issues.

Support wrapt 2.x

1 participant