Skip to content

Conversation

@wantsui
Copy link
Collaborator

@wantsui wantsui commented Oct 20, 2025

Description

We have a bug report that there are recursion errors with wrapt 2.x on our psycopg integration. I'd still like to study if we can recreate the error in a test but don't want this investigation to block this known issue.

Testing

Risks

Additional Notes

@wantsui wantsui changed the title bug: do not use wrapt 2.x yet bug(wrapt): do not use wrapt 2.x yet Oct 20, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 20, 2025

CODEOWNERS have been resolved as:

releasenotes/notes/avoid-wrapt-two-fd3b8ad3057343ba.yaml                @DataDog/apm-python
lib-injection/sources/requirements.csv                                  @DataDog/apm-core-python
pyproject.toml                                                          @DataDog/python-guild
requirements.csv                                                        @DataDog/apm-core-python

@github-actions
Copy link
Contributor

github-actions bot commented Oct 20, 2025

Bootstrap import analysis

Comparison of import times between this PR and base.

Summary

The average import time from this PR is: 240 ± 2 ms.

The average import time from base is: 244 ± 6 ms.

The import time difference between this PR and base is: -4.1 ± 0.2 ms.

Import time breakdown

The following import paths have appeared:

ddtrace.auto 24.984 ms (10.40%)
ddtrace 16.499 ms (6.87%)
ddtrace._logger 12.969 ms (5.40%)
ddtrace.internal.telemetry 12.969 ms (5.40%)
ddtrace.internal.telemetry.writer 10.453 ms (4.35%)
http.client 10.453 ms (4.35%)
email.parser 9.199 ms (3.83%)
email.feedparser 8.934 ms (3.72%)
email._policybase 7.631 ms (3.18%)
email.utils 4.157 ms (1.73%)
random 1.543 ms (0.64%)
bisect 0.515 ms (0.21%)
_bisect 0.276 ms (0.11%)
_sha2 0.275 ms (0.11%)
_random 0.265 ms (0.11%)
email._parseaddr 1.347 ms (0.56%)
calendar 0.981 ms (0.41%)
datetime 0.657 ms (0.27%)
_datetime 0.428 ms (0.18%)
email.header 2.999 ms (1.25%)
email.charset 0.884 ms (0.37%)
email.encoders 0.578 ms (0.24%)
quopri 0.346 ms (0.14%)
email.base64mime 0.605 ms (0.25%)
base64 0.361 ms (0.15%)
binascii 0.401 ms (0.17%)
email.quoprimime 0.357 ms (0.15%)
email.errors 1.303 ms (0.54%)
email 0.265 ms (0.11%)
email.message 1.255 ms (0.52%)
email._encoded_words 0.395 ms (0.16%)
email.iterators 0.239 ms (0.10%)
ddtrace.settings._agent 2.515 ms (1.05%)
socket 2.515 ms (1.05%)
_socket 0.465 ms (0.19%)
array 0.438 ms (0.18%)
ddtrace._monkey 3.531 ms (1.47%)
ddtrace.appsec._listeners 3.531 ms (1.47%)
ddtrace.internal.core 3.531 ms (1.47%)
ddtrace.internal.core.event_hub 3.531 ms (1.47%)
ddtrace.settings._config 3.531 ms (1.47%)
ddtrace.internal.gitmetadata 3.531 ms (1.47%)
ddtrace.ext.ci 3.531 ms (1.47%)
ddtrace.ext.git 3.531 ms (1.47%)
shutil 3.005 ms (1.25%)
bz2 1.061 ms (0.44%)
_bz2 0.387 ms (0.16%)
_compression 0.330 ms (0.14%)
lzma 0.849 ms (0.35%)
_lzma 0.432 ms (0.18%)
zlib 0.344 ms (0.14%)
tempfile 0.526 ms (0.22%)
ddtrace.bootstrap.sitecustomize 8.484 ms (3.53%)
ddtrace.bootstrap.preload 8.484 ms (3.53%)
ddtrace.internal.products 8.484 ms (3.53%)
importlib.metadata 8.484 ms (3.53%)
importlib.abc 2.540 ms (1.06%)
importlib.resources 2.046 ms (0.85%)
importlib.resources._common 1.502 ms (0.63%)
importlib.resources.abc 0.497 ms (0.21%)
importlib.resources._adapters 0.429 ms (0.18%)
importlib.resources._legacy 0.299 ms (0.12%)
zipfile 1.783 ms (0.74%)
zipfile._path 0.795 ms (0.33%)
zipfile._path.glob 0.292 ms (0.12%)
importlib.metadata._adapters 0.892 ms (0.37%)
importlib.metadata._text 0.514 ms (0.21%)
importlib.metadata._functools 0.237 ms (0.10%)
csv 0.760 ms (0.32%)
_csv 0.312 ms (0.13%)
importlib.metadata._meta 0.553 ms (0.23%)
importlib.metadata._collections 0.398 ms (0.17%)
importlib.metadata._itertools 0.232 ms (0.10%)

The following import paths have disappeared:

ddtrace.auto 20.814 ms (8.67%)
ddtrace 20.814 ms (8.67%)
ddtrace._logger 20.814 ms (8.67%)
ddtrace.internal.telemetry 20.814 ms (8.67%)
ddtrace.settings._agent 20.814 ms (8.67%)
ddtrace.settings 20.814 ms (8.67%)
ddtrace.vendor.debtcollector 20.814 ms (8.67%)
ddtrace.vendor 20.814 ms (8.67%)
ddtrace.internal.module 20.814 ms (8.67%)
ddtrace.internal.wrapping.context 20.814 ms (8.67%)
ddtrace.internal.utils.inspection 20.814 ms (8.67%)
ddtrace.internal.safety 20.814 ms (8.67%)
wrapt 20.814 ms (8.67%)
wrapt.importer 20.589 ms (8.57%)
importlib.metadata 20.589 ms (8.57%)
importlib.metadata._adapters 10.961 ms (4.56%)
email.message 10.427 ms (4.34%)
email.utils 8.228 ms (3.43%)
socket 2.247 ms (0.94%)
_socket 0.346 ms (0.14%)
array 0.229 ms (0.10%)
email.charset 2.237 ms (0.93%)
email.encoders 0.763 ms (0.32%)
email.errors 0.511 ms (0.21%)
email.base64mime 0.382 ms (0.16%)
base64 0.244 ms (0.10%)
email.quoprimime 0.235 ms (0.10%)
email._parseaddr 1.327 ms (0.55%)
calendar 0.940 ms (0.39%)
random 1.180 ms (0.49%)
bisect 0.300 ms (0.12%)
_bisect 0.156 ms (0.07%)
_sha2 0.166 ms (0.07%)
_random 0.164 ms (0.07%)
datetime 0.496 ms (0.21%)
_datetime 0.242 ms (0.10%)
email._policybase 0.984 ms (0.41%)
email.header 0.672 ms (0.28%)
email._encoded_words 0.337 ms (0.14%)
quopri 0.171 ms (0.07%)
email.iterators 0.140 ms (0.06%)
importlib.metadata._text 0.278 ms (0.12%)
importlib.metadata._functools 0.112 ms (0.05%)
zipfile 4.036 ms (1.68%)
shutil 2.302 ms (0.96%)
bz2 0.781 ms (0.33%)
_bz2 0.279 ms (0.12%)
_compression 0.260 ms (0.11%)
lzma 0.577 ms (0.24%)
_lzma 0.332 ms (0.14%)
zlib 0.217 ms (0.09%)
zipfile._path 0.563 ms (0.23%)
zipfile._path.glob 0.164 ms (0.07%)
binascii 0.293 ms (0.12%)
importlib.abc 2.713 ms (1.13%)
importlib.resources 2.317 ms (0.96%)
importlib.resources._common 1.986 ms (0.83%)
importlib.resources.abc 0.680 ms (0.28%)
tempfile 0.456 ms (0.19%)
importlib.resources._adapters 0.419 ms (0.17%)
importlib.resources._legacy 0.191 ms (0.08%)
csv 0.535 ms (0.22%)
_csv 0.192 ms (0.08%)
importlib.metadata._meta 0.499 ms (0.21%)
importlib.metadata._collections 0.287 ms (0.12%)
email 0.159 ms (0.07%)
importlib.metadata._itertools 0.122 ms (0.05%)
wrapt.proxies 0.225 ms (0.09%)

The following import paths have grown:

ddtrace.auto 3.383 ms (1.41%)
ddtrace 1.927 ms (0.80%)
ddtrace.trace 1.052 ms (0.44%)
ddtrace._trace.tracer 0.682 ms (0.28%)
ddtrace.internal.debug 0.682 ms (0.28%)
ddtrace._trace.filters 0.370 ms (0.15%)
ddtrace._trace.processor 0.370 ms (0.15%)
ddtrace._trace.sampler 0.214 ms (0.09%)
ddtrace._trace.span 0.111 ms (0.05%)
ddtrace._trace._span_pointer 0.111 ms (0.05%)
hashlib 0.111 ms (0.05%)
_hashlib 0.111 ms (0.05%)
ddtrace.internal.sampling 0.103 ms (0.04%)
ddtrace.internal.writer 0.156 ms (0.07%)
ddtrace.internal.writer.writer 0.156 ms (0.07%)
ddtrace.internal.dogstatsd 0.084 ms (0.04%)
ddtrace.vendor.dogstatsd 0.084 ms (0.04%)
ddtrace.vendor.dogstatsd.base 0.084 ms (0.04%)
ddtrace.internal.writer.writer_client 0.072 ms (0.03%)
ddtrace._logger 0.825 ms (0.34%)
ddtrace.internal.telemetry 0.825 ms (0.34%)
ddtrace.internal.telemetry.writer 0.717 ms (0.30%)
ddtrace.internal.packages 0.279 ms (0.12%)
sysconfig 0.279 ms (0.12%)
http.client 0.048 ms (0.02%)
http 0.048 ms (0.02%)
ddtrace.settings._agent 0.109 ms (0.05%)
ddtrace.settings 0.109 ms (0.05%)
ddtrace.vendor.debtcollector 0.109 ms (0.05%)
ddtrace.vendor 0.063 ms (0.03%)
ddtrace.internal.module 0.063 ms (0.03%)
ddtrace.internal.wrapping.context 0.063 ms (0.03%)
ddtrace.internal.utils.inspection 0.063 ms (0.03%)
ddtrace.internal.safety 0.063 ms (0.03%)
ddtrace.internal.utils.cache 0.063 ms (0.03%)
ddtrace.vendor.debtcollector.updating 0.045 ms (0.02%)
ddtrace._monkey 0.049 ms (0.02%)
ddtrace.appsec._listeners 0.049 ms (0.02%)
ddtrace.internal.core 0.049 ms (0.02%)
ddtrace.internal.core.event_hub 0.049 ms (0.02%)
ddtrace.settings._config 0.049 ms (0.02%)
ddtrace.internal.gitmetadata 0.049 ms (0.02%)
ddtrace.ext.ci 0.049 ms (0.02%)
ddtrace.bootstrap.sitecustomize 1.456 ms (0.61%)
ddtrace.bootstrap.preload 0.920 ms (0.38%)
multiprocessing 0.667 ms (0.28%)
multiprocessing.context 0.667 ms (0.28%)
multiprocessing.process 0.609 ms (0.25%)
multiprocessing.reduction 0.058 ms (0.02%)
pickle 0.058 ms (0.02%)
_compat_pickle 0.058 ms (0.02%)
ddtrace.settings.profiling 0.133 ms (0.06%)
ddtrace.vendor.psutil 0.069 ms (0.03%)
ddtrace.internal.datadog.profiling 0.063 ms (0.03%)
ddtrace.internal.datadog 0.063 ms (0.03%)
ddtrace.internal.runtime.runtime_metrics 0.102 ms (0.04%)
ddtrace.internal.runtime.constants 0.102 ms (0.04%)
ddtrace.internal.products 0.018 ms (0.01%)
ddtrace.internal.uwsgi 0.018 ms (0.01%)

The following import paths have shrunk:

ddtrace.auto 10.047 ms (4.18%)
ddtrace 7.392 ms (3.08%)
ddtrace._logger 5.255 ms (2.19%)
ddtrace.internal.telemetry 5.255 ms (2.19%)
ddtrace.settings._agent 3.972 ms (1.65%)
ddtrace.settings 3.874 ms (1.61%)
ddtrace.vendor.debtcollector 3.874 ms (1.61%)
ddtrace.vendor.debtcollector._utils 3.478 ms (1.45%)
ddtrace.vendor 0.396 ms (0.16%)
ddtrace.internal.module 0.396 ms (0.16%)
ddtrace.internal.wrapping.context 0.277 ms (0.12%)
ddtrace.internal.utils.inspection 0.277 ms (0.12%)
ddtrace.internal.safety 0.277 ms (0.12%)
wrapt 0.277 ms (0.12%)
wrapt.decorators 0.158 ms (0.07%)
wrapt.arguments 0.158 ms (0.07%)
wrapt.importer 0.071 ms (0.03%)
wrapt.__wrapt__ 0.047 ms (0.02%)
wrapt.wrappers 0.026 ms (0.01%)
ddtrace.settings._core 0.098 ms (0.04%)
envier 0.098 ms (0.04%)
envier.env 0.098 ms (0.04%)
ddtrace.internal.telemetry.writer 0.938 ms (0.39%)
ddtrace.settings._telemetry 0.743 ms (0.31%)
http.client 0.126 ms (0.05%)
ssl 0.096 ms (0.04%)
_ssl 0.096 ms (0.04%)
email.parser 0.030 ms (0.01%)
email.feedparser 0.030 ms (0.01%)
ddtrace.internal.runtime 0.052 ms (0.02%)
uuid 0.052 ms (0.02%)
_uuid 0.023 ms (0.01%)
ddtrace.internal.utils.version 0.017 ms (0.01%)
ddtrace._version 0.017 ms (0.01%)
ddtrace.settings._otel_remapper 0.345 ms (0.14%)
ddtrace.trace 1.390 ms (0.58%)
ddtrace._trace.filters 1.124 ms (0.47%)
ddtrace._trace.processor 1.124 ms (0.47%)
ddtrace.internal.writer 0.829 ms (0.35%)
ddtrace.internal.writer.writer 0.829 ms (0.35%)
ddtrace.internal.dist_computing.utils 0.756 ms (0.31%)
ddtrace.internal.dist_computing 0.756 ms (0.31%)
ddtrace.internal.dogstatsd 0.073 ms (0.03%)
ddtrace.vendor.dogstatsd 0.073 ms (0.03%)
ddtrace.vendor.dogstatsd.base 0.073 ms (0.03%)
ddtrace.vendor.dogstatsd.context 0.073 ms (0.03%)
ddtrace.vendor.dogstatsd.context_async 0.073 ms (0.03%)
ddtrace._trace.sampler 0.295 ms (0.12%)
ddtrace._trace.span 0.160 ms (0.07%)
ddtrace.internal.rate_limiter 0.113 ms (0.05%)
ddtrace.internal.sampling 0.022 ms (0.01%)
ddtrace._trace.sampling_rule 0.022 ms (0.01%)
ddtrace._trace.tracer 0.150 ms (0.06%)
ddtrace.internal.processor.endpoint_call_counter 0.036 ms (0.01%)
ddtrace._trace.pin 0.116 ms (0.05%)
ddtrace._monkey 0.062 ms (0.03%)
ddtrace.appsec._listeners 0.062 ms (0.03%)
ddtrace.settings.asm 0.062 ms (0.03%)
ddtrace.internal._unpatched 0.030 ms (0.01%)
json 0.030 ms (0.01%)
json.decoder 0.030 ms (0.01%)
re 0.030 ms (0.01%)
enum 0.030 ms (0.01%)
types 0.030 ms (0.01%)
ddtrace.bootstrap.sitecustomize 2.655 ms (1.11%)
ddtrace.bootstrap.preload 2.655 ms (1.11%)
multiprocessing 0.785 ms (0.33%)
multiprocessing.context 0.785 ms (0.33%)
multiprocessing.reduction 0.785 ms (0.33%)
pickle 0.785 ms (0.33%)
_pickle 0.785 ms (0.33%)
ddtrace.internal.remoteconfig.client 0.691 ms (0.29%)
ddtrace.settings.profiling 0.218 ms (0.09%)
ddtrace.vendor.psutil 0.148 ms (0.06%)
ddtrace.vendor.psutil._common 0.074 ms (0.03%)
ddtrace.vendor.psutil._pslinux 0.074 ms (0.03%)
glob 0.074 ms (0.03%)
ddtrace.internal.datadog.profiling 0.071 ms (0.03%)
ddtrace.internal.remoteconfig._connectors 0.098 ms (0.04%)
ddtrace.internal.runtime.runtime_metrics 0.092 ms (0.04%)

@juanjux juanjux changed the title bug(wrapt): do not use wrapt 2.x yet fix(wrapt): do not use wrapt 2.x yet Oct 21, 2025
Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
@brettlangdon brettlangdon marked this pull request as ready for review October 21, 2025 12:33
@brettlangdon brettlangdon requested review from a team as code owners October 21, 2025 12:33
@brettlangdon brettlangdon enabled auto-merge (squash) October 21, 2025 12:33
@brettlangdon brettlangdon disabled auto-merge October 21, 2025 13:44
@brettlangdon brettlangdon merged commit 492135a into main Oct 21, 2025
698 of 708 checks passed
@brettlangdon brettlangdon deleted the wrapt-version branch October 21, 2025 13:46
@dd-octo-sts
Copy link
Contributor

dd-octo-sts bot commented Oct 21, 2025

The backport to 3.14 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-3.14 3.14
# Navigate to the new working tree
cd .worktrees/backport-3.14
# Create a new branch
git switch --create backport-14955-to-3.14
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 492135a4950e798b276cb91df3fac438cac6c2e4
# Push it to GitHub
git push --set-upstream origin backport-14955-to-3.14
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-3.14

Then, create a pull request where the base branch is 3.14 and the compare/head branch is backport-14955-to-3.14.

@dd-octo-sts
Copy link
Contributor

dd-octo-sts bot commented Oct 21, 2025

The backport to 3.15 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-3.15 3.15
# Navigate to the new working tree
cd .worktrees/backport-3.15
# Create a new branch
git switch --create backport-14955-to-3.15
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 492135a4950e798b276cb91df3fac438cac6c2e4
# Push it to GitHub
git push --set-upstream origin backport-14955-to-3.15
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-3.15

Then, create a pull request where the base branch is 3.15 and the compare/head branch is backport-14955-to-3.15.

dd-octo-sts bot pushed a commit that referenced this pull request Oct 21, 2025
## Description

<!-- Provide an overview of the change and motivation for the change -->

We have a bug report that there are recursion errors with wrapt 2.x on
our psycopg integration. I'd still like to study if we can recreate the
error in a test but don't want this investigation to block this known
issue.

## Testing

<!-- Describe your testing strategy or note what tests are included -->

## Risks

<!-- Note any risks associated with this change, or "None" if no risks
-->

## Additional Notes

<!-- Any other information that would be helpful for reviewers -->

---------

Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Co-authored-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Co-authored-by: Brett Langdon <brett.langdon@datadoghq.com>
(cherry picked from commit 492135a)
brettlangdon added a commit that referenced this pull request Oct 21, 2025
## Description

<!-- Provide an overview of the change and motivation for the change -->

We have a bug report that there are recursion errors with wrapt 2.x on
our psycopg integration. I'd still like to study if we can recreate the
error in a test but don't want this investigation to block this known
issue.

## Testing

<!-- Describe your testing strategy or note what tests are included -->

## Risks

<!-- Note any risks associated with this change, or "None" if no risks
-->

## Additional Notes

<!-- Any other information that would be helpful for reviewers -->

---------

Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Co-authored-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Co-authored-by: Brett Langdon <brett.langdon@datadoghq.com>
(cherry picked from commit 492135a)
brettlangdon added a commit that referenced this pull request Oct 21, 2025
<!-- Provide an overview of the change and motivation for the change -->

We have a bug report that there are recursion errors with wrapt 2.x on
our psycopg integration. I'd still like to study if we can recreate the
error in a test but don't want this investigation to block this known
issue.

<!-- Describe your testing strategy or note what tests are included -->

<!-- Note any risks associated with this change, or "None" if no risks
-->

<!-- Any other information that would be helpful for reviewers -->

---------

Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Co-authored-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Co-authored-by: Brett Langdon <brett.langdon@datadoghq.com>
(cherry picked from commit 492135a)
brettlangdon added a commit that referenced this pull request Oct 21, 2025
<!-- Provide an overview of the change and motivation for the change -->

We have a bug report that there are recursion errors with wrapt 2.x on
our psycopg integration. I'd still like to study if we can recreate the
error in a test but don't want this investigation to block this known
issue.

<!-- Describe your testing strategy or note what tests are included -->

<!-- Note any risks associated with this change, or "None" if no risks
-->

<!-- Any other information that would be helpful for reviewers -->

---------

Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Co-authored-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Co-authored-by: Brett Langdon <brett.langdon@datadoghq.com>
(cherry picked from commit 492135a)
@nijave
Copy link

nijave commented Oct 21, 2025

Think we may have also hit this as well with ddtrace 2.21.0

works

amqp==5.3.1
anyio==4.11.0
asgiref==3.10.0
asttokens==3.0.0
async-timeout==5.0.1
attrs==25.4.0
backcall==0.2.0
backports.tarfile==1.2.0
billiard==4.2.2
black==22.12.0
boto3==1.34.41
boto3-stubs==1.34.109
botocore==1.34.162
botocore-stubs==1.40.50
bytecode==0.17.0
celery==5.5.0
certifi==2025.10.5
cffi==2.0.0
cfgv==3.4.0
charset-normalizer==3.4.3
click==8.1.7
click-didyoumean==0.3.0
click-plugins==1.1.1
click-repl==0.3.0
coverage==7.10.7
cryptography==42.0.0
ddtrace==2.21.0
decorator==5.2.1
distlib==0.4.0
Django==4.2.24
django-datadog-logger==0.7.3
django-environ==0.9.0
django-extensions==3.2.1
django-factory-boy==1.0.0
django-filter==22.1
django-jsonform==2.23.0
django-simple-history==3.6.0
django-waffle==3.0.0
djangoql==0.17.1
djangorestframework==3.14.0
docutils==0.22.2
envier==0.6.1
et_xmlfile==2.0.0
exceptiongroup==1.3.0
executing==2.2.1
expiringdict==1.2.2
factory_boy==3.3.3
Faker==37.11.0
filelock==3.20.0
flake8==6.0.0
freezegun==1.2.2
funcy==2.0
gunicorn==20.1.0
h11==0.16.0
httpcore==1.0.9
httpx==0.28.1
identify==2.6.15
idna==3.11
importlib_metadata==8.7.0
inflect==7.0.0
iniconfig==2.1.0
ipdb==0.13.11
ipython==8.6.0
isort==5.12.0
jaraco.classes==3.4.0
jaraco.context==6.0.1
jaraco.functools==4.3.0
jedi==0.19.2
jeepney==0.9.0
Jinja2==3.1.6
jmespath==1.0.1
JSON-log-formatter==1.1.1
kafka-python==2.0.2
keyring==25.6.0
kombu==5.5.4
launchdarkly-server-sdk==8.1.4
lxml==6.0.2
Markdown==3.4.1
MarkupSafe==3.0.3
matplotlib-inline==0.1.7
mccabe==0.7.0
mergepythonclient==0.2.6
MergePythonSDK==2.3.0
more-itertools==10.8.0
multidict==6.7.0
mypy==1.4.1
mypy_extensions==1.1.0
nh3==0.3.1
nodeenv==1.9.1
numpy==2.2.6
openpyxl==3.1.2
opentelemetry-api==1.37.0
packaging==25.0
pandas==2.2.2
parso==0.8.5
pathspec==0.12.1
pdoc==14.5.1
pexpect==4.9.0
pickleshare==0.7.5
pkginfo==1.12.1.2
platformdirs==4.5.0
pluggy==1.6.0
ply==3.11
pre-commit==3.2.0
prompt_toolkit==3.0.52
propcache==0.4.1
protobuf==6.32.1
psycopg2==2.9.10
ptyprocess==0.7.0
pure_eval==0.2.3
py==1.11.0
pycodestyle==2.10.0
pycparser==2.23
pydantic==1.10.24
pydash==7.0.6
pyflakes==3.0.1
Pygments==2.19.2
pyRFC3339==2.1.0
pytest==7.1.2
pytest-cov==6.2.1
pytest-django==4.5.2
python-dateutil==2.9.0.post0
pytz==2025.2
PyYAML==6.0.3
RapidFuzz==3.14.1
readme_renderer==44.0
redis==4.3.5
requests==2.31.0
requests-toolbelt==1.0.0
responses==0.10.6
ruff==0.0.275
s3transfer==0.10.4
SecretStorage==3.4.0
semver==2.13.0
six==1.17.0
sniffio==1.3.1
sqlparse==0.5.3
stack-data==0.6.3
thefuzz==0.22.1
time-machine==2.10.0
toml==0.10.2
tomli==2.0.1
tqdm==4.67.1
traitlets==5.14.3
twine==3.1.1
types-awscrt==0.28.1
types-docutils==0.22.2.20251006
types-psycopg2==2.9.21.5
types-Pygments==2.14.0.3
types-python-dateutil==2.8.19.4
types-requests==2.28.11.5
types-s3transfer==0.14.0
types-setuptools==80.9.0.20250822
types-urllib3==1.26.25.14
typing_extensions==4.7.1
tzdata==2025.2
unittest-xml-reporting==3.2.0
urllib3==1.26.20
vcrpy==6.0.1
vine==5.1.0
virtualenv==20.33.1
watchdog==3.0.0
wcwidth==0.2.14
wrapt==1.17.3
xmltodict==1.0.2
yarl==1.22.0
zipp==3.23.0

doesn't work

amqp==5.3.1
anyio==4.11.0
asgiref==3.10.0
asttokens==3.0.0
async-timeout==5.0.1
attrs==25.4.0
backcall==0.2.0
backports.tarfile==1.2.0
billiard==4.2.2
black==22.12.0
boto3==1.34.41
boto3-stubs==1.34.109
botocore==1.34.162
botocore-stubs==1.40.55
bytecode==0.17.0
celery==5.5.0
certifi==2025.10.5
cffi==2.0.0
cfgv==3.4.0
charset-normalizer==3.4.4
click==8.1.7
click-didyoumean==0.3.0
click-plugins==1.1.1
click-repl==0.3.0
coverage==7.11.0
cryptography==42.0.0
ddtrace==2.21.0
decorator==5.2.1
distlib==0.4.0
Django==4.2.24
django-datadog-logger==0.7.3
django-environ==0.9.0
django-extensions==3.2.1
django-factory-boy==1.0.0
django-filter==22.1
django-jsonform==2.23.0
django-simple-history==3.6.0
django-waffle==3.0.0
djangoql==0.17.1
djangorestframework==3.14.0
docutils==0.22.2
envier==0.6.1
et_xmlfile==2.0.0
exceptiongroup==1.3.0
executing==2.2.1
expiringdict==1.2.2
factory_boy==3.3.3
Faker==37.11.0
filelock==3.20.0
flake8==6.0.0
freezegun==1.2.2
funcy==2.0
gunicorn==20.1.0
h11==0.16.0
httpcore==1.0.9
httpx==0.28.1
identify==2.6.15
idna==3.11
importlib_metadata==8.7.0
inflect==7.0.0
iniconfig==2.3.0
ipdb==0.13.11
ipython==8.6.0
isort==5.12.0
jaraco.classes==3.4.0
jaraco.context==6.0.1
jaraco.functools==4.3.0
jedi==0.19.2
jeepney==0.9.0
Jinja2==3.1.6
jmespath==1.0.1
JSON-log-formatter==1.1.1
kafka-python==2.0.2
keyring==25.6.0
kombu==5.5.4
launchdarkly-server-sdk==8.1.4
lxml==6.0.2
Markdown==3.4.1
MarkupSafe==3.0.3
matplotlib-inline==0.1.7
mccabe==0.7.0
mergepythonclient==0.2.6
MergePythonSDK==2.3.0
more-itertools==10.8.0
multidict==6.7.0
mypy==1.4.1
mypy_extensions==1.1.0
nh3==0.3.1
nodeenv==1.9.1
numpy==2.2.6
openpyxl==3.1.2
opentelemetry-api==1.38.0
packaging==25.0
pandas==2.2.2
parso==0.8.5
pathspec==0.12.1
pdoc==14.5.1
pexpect==4.9.0
pickleshare==0.7.5
pkginfo==1.12.1.2
platformdirs==4.5.0
pluggy==1.6.0
ply==3.11
pre-commit==3.2.0
prompt_toolkit==3.0.52
propcache==0.4.1
protobuf==6.33.0
psycopg2==2.9.10
ptyprocess==0.7.0
pure_eval==0.2.3
py==1.11.0
pycodestyle==2.10.0
pycparser==2.23
pydantic==1.10.24
pydash==7.0.6
pyflakes==3.0.1
Pygments==2.19.2
pyRFC3339==2.1.0
pytest==7.1.2
pytest-cov==6.2.1
pytest-django==4.5.2
python-dateutil==2.9.0.post0
pytz==2025.2
PyYAML==6.0.3
RapidFuzz==3.14.1
readme_renderer==44.0
redis==4.3.5
requests==2.31.0
requests-toolbelt==1.0.0
responses==0.10.6
ruff==0.0.275
s3transfer==0.10.4
SecretStorage==3.4.0
semver==2.13.0
six==1.17.0
sniffio==1.3.1
sqlparse==0.5.3
stack-data==0.6.3
thefuzz==0.22.1
time-machine==2.10.0
toml==0.10.2
tomli==2.0.1
tqdm==4.67.1
traitlets==5.14.3
twine==3.1.1
types-awscrt==0.28.2
types-docutils==0.22.2.20251006
types-psycopg2==2.9.21.5
types-Pygments==2.14.0.3
types-python-dateutil==2.8.19.4
types-requests==2.28.11.5
types-s3transfer==0.14.0
types-setuptools==80.9.0.20250822
types-urllib3==1.26.25.14
typing_extensions==4.7.1
tzdata==2025.2
unittest-xml-reporting==3.2.0
urllib3==1.26.20
vcrpy==6.0.1
vine==5.1.0
virtualenv==20.33.1
watchdog==3.0.0
wcwidth==0.2.14
wrapt==2.0.0
xmltodict==1.0.2
yarl==1.22.0
zipp==3.23.0

brettlangdon added a commit that referenced this pull request Oct 21, 2025
Backport 492135a from #14955 to 3.16.

## Description

<!-- Provide an overview of the change and motivation for the change -->

We have a bug report that there are recursion errors with wrapt 2.x on
our psycopg integration. I'd still like to study if we can recreate the
error in a test but don't want this investigation to block this known
issue.

## Testing

<!-- Describe your testing strategy or note what tests are included -->

## Risks

<!-- Note any risks associated with this change, or "None" if no risks
-->

## Additional Notes

<!-- Any other information that would be helpful for reviewers -->

Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Co-authored-by: wantsui <wan.tsui@datadoghq.com>
Co-authored-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Co-authored-by: Brett Langdon <brett.langdon@datadoghq.com>
brettlangdon added a commit that referenced this pull request Oct 21, 2025
## Description

We have a bug report that there are recursion errors with wrapt 2.x on
our psycopg integration. I'd still like to study if we can recreate the
error in a test but don't want this investigation to block this known
issue.

## Testing

<!-- Describe your testing strategy or note what tests are included -->

## Risks

<!-- Note any risks associated with this change, or "None" if no risks
-->

## Additional Notes

<!-- Any other information that would be helpful for reviewers -->

Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Co-authored-by: wantsui <wan.tsui@datadoghq.com>
Co-authored-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
brettlangdon added a commit that referenced this pull request Oct 21, 2025
## Description

We have a bug report that there are recursion errors with wrapt 2.x on
our psycopg integration. I'd still like to study if we can recreate the
error in a test but don't want this investigation to block this known
issue.

## Testing

<!-- Describe your testing strategy or note what tests are included -->

## Risks

<!-- Note any risks associated with this change, or "None" if no risks
-->

## Additional Notes

<!-- Any other information that would be helpful for reviewers -->

Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Co-authored-by: wantsui <wan.tsui@datadoghq.com>
Co-authored-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
@nijave
Copy link

nijave commented Oct 21, 2025

With a stack trace like

builtins.SystemExit: 1
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/ddtrace/contrib/internal/django/patch.py", line 552, in traced_get_response
    response = func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/django/core/handlers/base.py", line 140, in get_response
    response = self._middleware_chain(request)
  File "/usr/local/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.10/site-packages/ddtrace/contrib/internal/trace_utils.py", line 336, in wrapper
    return func(mod, pin, wrapped, instance, args, kwargs)
  File "/usr/local/lib/python3.10/site-packages/ddtrace/contrib/internal/django/patch.py", line 340, in wrapped
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/django/utils/deprecation.py", line 134, in __call__
    response = response or self.get_response(request)
  File "/usr/local/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.10/site-packages/ddtrace/contrib/internal/trace_utils.py", line 336, in wrapper
    return func(mod, pin, wrapped, instance, args, kwargs)
  File "/usr/local/lib/python3.10/site-packages/ddtrace/contrib/internal/django/patch.py", line 340, in wrapped
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/django/utils/deprecation.py", line 134, in __call__
    response = response or self.get_response(request)
  File "/usr/local/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.10/site-packages/ddtrace/contrib/internal/trace_utils.py", line 336, in wrapper
    return func(mod, pin, wrapped, instance, args, kwargs)
  File "/usr/local/lib/python3.10/site-packages/ddtrace/contrib/internal/django/patch.py", line 340, in wrapped
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/django/utils/deprecation.py", line 134, in __call__
    response = response or self.get_response(request)
  File "/usr/local/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.10/site-packages/ddtrace/contrib/internal/trace_utils.py", line 336, in wrapper
    return func(mod, pin, wrapped, instance, args, kwargs)
  File "/usr/local/lib/python3.10/site-packages/ddtrace/contrib/internal/django/patch.py", line 340, in wrapped
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/django/utils/deprecation.py", line 134, in __call__
    response = response or self.get_response(request)
  File "/usr/local/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.10/site-packages/ddtrace/contrib/internal/trace_utils.py", line 336, in wrapper
    return func(mod, pin, wrapped, instance, args, kwargs)
  File "/usr/local/lib/python3.10/site-packages/ddtrace/contrib/internal/django/patch.py", line 340, in wrapped
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/django/utils/deprecation.py", line 134, in __call__
    response = response or self.get_response(request)
  File "/usr/local/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.10/site-packages/ddtrace/contrib/internal/trace_utils.py", line 336, in wrapper
    return func(mod, pin, wrapped, instance, args, kwargs)
  File "/usr/local/lib/python3.10/site-packages/ddtrace/contrib/internal/django/patch.py", line 340, in wrapped
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/django/utils/deprecation.py", line 134, in __call__
    response = response or self.get_response(request)
  File "/usr/local/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.10/site-packages/ddtrace/contrib/internal/trace_utils.py", line 336, in wrapper
    return func(mod, pin, wrapped, instance, args, kwargs)
  File "/usr/local/lib/python3.10/site-packages/ddtrace/contrib/internal/django/patch.py", line 340, in wrapped
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/django/utils/deprecation.py", line 134, in __call__
    response = response or self.get_response(request)
SystemExit: 1

@wantsui
Copy link
Collaborator Author

wantsui commented Oct 21, 2025

Thanks for the report @nijave ! I've flagged for my team.

gnufede pushed a commit that referenced this pull request Oct 23, 2025
<!-- Provide an overview of the change and motivation for the change -->

We have a bug report that there are recursion errors with wrapt 2.x on
our psycopg integration. I'd still like to study if we can recreate the
error in a test but don't want this investigation to block this known
issue.

<!-- Describe your testing strategy or note what tests are included -->

<!-- Note any risks associated with this change, or "None" if no risks
-->

<!-- Any other information that would be helpful for reviewers -->

---------

Signed-off-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Co-authored-by: Juanjo Alvarez <juanjo.alvarezmartinez@datadoghq.com>
Co-authored-by: Brett Langdon <brett.langdon@datadoghq.com>
@brettlangdon
Copy link
Member

@nijave our recommendation at this time is to upgrade to ddtrace>=3.16.2 if you can, otherwise please also pin wrapt>=1,<2 in your requirements/lock files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants