You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow wrapt 2.x: the ^1.11.2 bound conflicts with environments on the current wrapt line #861
datadog-lambda can be installed together with wrapt 2.x.
wrapt 2.x is the actively developed line: 2.0.0 shipped in October 2025 and 2.5.0 in September 2026, and the last final 1.x release is 1.17.3 (August 2025).
ddtrace supports wrapt 2 since the fixes for DataDog/dd-trace-py#14993: current 4.x releases declare wrapt>=1,!=2.2.0,<3. Widening the bound in pyproject.toml to match would allow it:
wrapt = ">=1.11.2,!=2.2.0,<3"
Actual Behavior
datadog-lambda declares wrapt = "^1.11.2", which Poetry publishes as wrapt>=1.11.2,<2.0.0.
The bound is unchanged in the latest release (8.128.0) and on main (8.129.0.dev0).
Projects that move their dependency set to wrapt 2.x, for example through a lockfile or a constraints file shared across services, can no longer install datadog-lambda. The only workarounds are holding the whole environment on wrapt 1.x, or installing datadog-lambda with --no-deps.
The bound appears to be Poetry's default caret rather than a deliberate cap. wrapt (>=1.11.2,<2.0.0) is already present in 5.85.0 (2023-12) and 6.99.0 (2024-10), before wrapt 2.0 existed.
wrapt 2 does work in practice: datadog_lambda uses only wrapt.wrap_function_wrapper and wrapt.importer.when_imported (datadog_lambda/patch.py). Both are still available in wrapt 2.x, and datadog_lambda calls them positionally the same way as before. With wrapt installed over the declared bound, on CPython 3.14.7:
datadog-lambda 8.128.0, ddtrace 4.15.3, wrapt 2.5.0: datadog_lambda.patch.patch_all() wraps requests.Session.send, and a handler decorated with datadog_lambda.wrapper.datadog_lambda_wrapper runs and returns normally.
datadog-lambda 8.123.0, ddtrace 4.14.0, wrapt 2.4.1: same result, and the handler emits aws.lambda.enhanced.invocations.
Steps to Reproduce the Problem
Create a fresh virtual environment with Python 3.10 or later.
Run pip install "datadog-lambda==8.128.0" "wrapt==2.5.0".
pip refuses the install with the conflict shown below.
Specifications
Datadog Lambda Layer version: not used; the datadog-lambda package from PyPI, 8.128.0 (also seen with 8.123.0)
Python version: 3.14.7 (local; the target runtime is AWS Lambda python3.14)
Stacktrace
$ pip install "datadog-lambda==8.128.0" "wrapt==2.5.0"
ERROR: Cannot install datadog-lambda==8.128.0 and wrapt==2.5.0 because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested wrapt==2.5.0
datadog-lambda 8.128.0 depends on wrapt<2.0.0 and >=1.11.2
Activity
purple4reina commentedon Oct 1, 2026
Hi @makkesi, thanks for reporting this to us. I'll get a PR going.