fix(deps): support wrapt 2.x (closes #1561)#1664
Open
wtfashwin wants to merge 1 commit into
Open
Conversation
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
0c89db2 to
a867aeb
Compare
Author
|
@hassiebp @wochinge — could you take a look when you have a moment? This is a one-line dependency bump ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Closes #1561.
langfusepinswrapt>=1.14,<2, which prevents installation in environments that ship wrapt 2.x — most notably GCP Cloud Composer, which shipswrapt==2.0.1. Users hit an unresolvable dependency conflict.As the issue notes, bumping this previously also required the transitive
wraptcap inopentelemetry-instrumentationto be lifted (open-telemetry/opentelemetry-python-contrib#3903).Why this is now unblocked
That upstream issue is resolved:
opentelemetry-instrumentationnow allowswrapt>=1.0.0,<3.0.0, shipped inopentelemetry-instrumentation0.63b0 (released 2026-05-19). langfuse's existing otel bounds already permit that release, so the langfuse-side<2ceiling is the only remaining blocker.Change
pyproject.toml:wrapt>=1.14,<2→wrapt>=1.14,<3uv.lockCompatibility
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 lockresolves cleanly.wrapt 2.1.2installs with langfuse's production dependencies (--no-dev) — the GCP Cloud Composer scenario.wrap_function_wrapperwrapping work underwrapt 2.1.2.