Skip to content

Commit 53baa30

Browse files
authored
refactor: drop tenacity dependency [backport #5998 to 1.15] (#6065)
Backport of #5998 to 1.15 We implement a simple retry logic internally to drop the dependency on tenacity. This will reduce the number of modules that we import indirectly through dependencies. In particular, with this change we avoid importing asyncio. This is to avoid issues like #5989, which are caused by the module cloning solution introduced for better supporting frameworks like gevent. ## Checklist - [x] Change(s) are motivated and described in the PR description. - [x] Testing strategy is described if automated tests are not included in the PR. - [x] Risk is outlined (performance impact, potential for breakage, maintainability, etc). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/contributing.html#Release-Note-Guidelines) are followed. - [x] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)). ## Reviewer Checklist - [x] Title is accurate. - [x] No unnecessary changes are introduced. - [x] Description motivates each change. - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary. - [x] Testing strategy adequately addresses listed risk(s). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] Release note makes sense to a user of the library. - [x] Reviewer has explicitly acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment.
1 parent c174c0d commit 53baa30

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+420
-321
lines changed

.riot/requirements/103e4a0.txt

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,43 +4,50 @@
44
#
55
# pip-compile --no-annotate --resolver=backtracking .riot/requirements/103e4a0.in
66
#
7-
attrs==22.2.0
8-
boto3==1.26.92
9-
botocore==1.29.92
10-
bytecode==0.14.0
11-
cattrs==22.2.0
12-
certifi==2022.12.7
7+
attrs==23.1.0
8+
boto3==1.26.146
9+
botocore==1.29.146
10+
bytecode==0.14.2
11+
cattrs==23.1.2
12+
certifi==2023.5.7
1313
charset-normalizer==3.1.0
14-
coverage[toml]==7.2.2
14+
coverage[toml]==7.2.7
1515
datadog==0.45.0
16-
datadog-lambda==4.68.0
16+
datadog-lambda==4.73.0
1717
ddsketch==2.0.4
18-
ddtrace==1.9.3
18+
ddtrace==1.14.0
19+
deprecated==1.2.14
1920
envier==0.4.0
2021
exceptiongroup==1.1.1
2122
hypothesis==6.45.0
2223
idna==3.4
24+
importlib-metadata==6.0.1
2325
iniconfig==2.0.0
2426
jmespath==1.0.1
2527
jsonschema==4.17.3
26-
mock==5.0.1
28+
mock==5.0.2
29+
opentelemetry-api==1.18.0
2730
opentracing==2.4.0
28-
packaging==23.0
31+
packaging==23.1
2932
pluggy==1.0.0
30-
protobuf==4.22.1
33+
protobuf==4.23.2
3134
pyrsistent==0.19.3
32-
pytest==7.2.2
33-
pytest-asyncio==0.20.3
34-
pytest-cov==4.0.0
35+
pytest==7.3.1
36+
pytest-asyncio==0.21.0
37+
pytest-cov==4.1.0
3538
pytest-mock==3.10.0
3639
python-dateutil==2.8.2
37-
requests==2.28.2
38-
s3transfer==0.6.0
40+
requests==2.31.0
41+
s3transfer==0.6.1
3942
six==1.16.0
4043
sortedcontainers==2.4.0
4144
tenacity==8.2.2
4245
tomli==2.0.1
4346
typing-extensions==4.6.3
44-
urllib3==1.26.15
47+
urllib3==1.26.16
4548
wrapt==1.15.0
4649
xmltodict==0.13.0
50+
zipp==3.15.0
51+
52+
# The following packages are considered to be unsafe in a requirements file:
53+
# setuptools

.riot/requirements/a08dd70.txt renamed to .riot/requirements/107589e.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is autogenerated by pip-compile with python 3.6
33
# To update, run:
44
#
5-
# pip-compile --no-annotate .riot/requirements/a08dd70.in
5+
# pip-compile --no-annotate .riot/requirements/107589e.in
66
#
77
attrs==22.2.0
88
coverage[toml]==6.2
@@ -24,7 +24,6 @@ pytest-benchmark==3.4.1
2424
pytest-cov==4.0.0
2525
pytest-mock==3.6.1
2626
sortedcontainers==2.4.0
27-
tenacity==8.2.2
2827
tomli==1.2.3
2928
typing-extensions==4.1.1
3029
uwsgi==2.0.21

.riot/requirements/9b9a7f4.txt renamed to .riot/requirements/1085954.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# This file is autogenerated by pip-compile with Python 3.10
33
# by the following command:
44
#
5-
# pip-compile --no-annotate --resolver=backtracking .riot/requirements/9b9a7f4.in
5+
# pip-compile --no-annotate --resolver=backtracking .riot/requirements/1085954.in
66
#
77
attrs==23.1.0
8-
coverage[toml]==7.2.3
8+
coverage[toml]==7.2.7
99
exceptiongroup==1.1.1
1010
gunicorn==20.1.0
1111
hypothesis==6.45.0
@@ -19,10 +19,9 @@ py-cpuinfo==8.0.0
1919
pytest==7.3.1
2020
pytest-asyncio==0.21.0
2121
pytest-benchmark==4.0.0
22-
pytest-cov==4.0.0
22+
pytest-cov==4.1.0
2323
pytest-mock==3.10.0
2424
sortedcontainers==2.4.0
25-
tenacity==8.0.0
2625
tomli==2.0.1
2726
uwsgi==2.0.21
2827

.riot/requirements/1ed9e02.txt renamed to .riot/requirements/11fd893.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is autogenerated by pip-compile
33
# To update, run:
44
#
5-
# pip-compile --no-annotate .riot/requirements/1ed9e02.in
5+
# pip-compile --no-annotate .riot/requirements/11fd893.in
66
#
77
atomicwrites==1.4.1
88
attrs==21.4.0
@@ -18,7 +18,6 @@ gunicorn==19.10.0
1818
hypothesis==4.57.1
1919
importlib-metadata==2.1.3
2020
mock==3.0.5
21-
monotonic==1.6
2221
more-itertools==5.0.0
2322
opentracing==2.4.0
2423
packaging==20.9
@@ -36,7 +35,6 @@ scandir==1.10.0
3635
six==1.16.0
3736
sortedcontainers==2.4.0
3837
statistics==1.0.3.5
39-
tenacity==7.0.0
4038
toml==0.10.2
4139
typing==3.10.0.0
4240
wcwidth==0.2.6

.riot/requirements/1b15a30.txt renamed to .riot/requirements/12115db.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# This file is autogenerated by pip-compile with Python 3.7
33
# by the following command:
44
#
5-
# pip-compile --no-annotate --resolver=backtracking .riot/requirements/1b15a30.in
5+
# pip-compile --no-annotate --resolver=backtracking .riot/requirements/12115db.in
66
#
77
attrs==23.1.0
8-
coverage[toml]==7.2.3
8+
coverage[toml]==7.2.7
99
exceptiongroup==1.1.1
1010
gunicorn==20.1.0
1111
hypothesis==6.45.0
@@ -15,15 +15,14 @@ mock==5.0.2
1515
opentracing==2.4.0
1616
packaging==23.1
1717
pluggy==1.0.0
18-
protobuf==4.22.3
18+
protobuf==4.23.2
1919
py-cpuinfo==8.0.0
2020
pytest==7.3.1
2121
pytest-asyncio==0.21.0
2222
pytest-benchmark==4.0.0
23-
pytest-cov==4.0.0
23+
pytest-cov==4.1.0
2424
pytest-mock==3.10.0
2525
sortedcontainers==2.4.0
26-
tenacity==8.2.2
2726
tomli==2.0.1
2827
typing-extensions==4.6.3
2928
uwsgi==2.0.21

.riot/requirements/14e4d18.txt renamed to .riot/requirements/1431312.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# This file is autogenerated by pip-compile with Python 3.9
33
# by the following command:
44
#
5-
# pip-compile --no-annotate --resolver=backtracking .riot/requirements/14e4d18.in
5+
# pip-compile --no-annotate --resolver=backtracking .riot/requirements/1431312.in
66
#
77
attrs==23.1.0
8-
coverage[toml]==7.2.3
8+
coverage[toml]==7.2.7
99
exceptiongroup==1.1.1
1010
gunicorn==20.1.0
1111
hypothesis==6.45.0
@@ -14,15 +14,14 @@ mock==5.0.2
1414
opentracing==2.4.0
1515
packaging==23.1
1616
pluggy==1.0.0
17-
protobuf==4.22.3
17+
protobuf==4.23.2
1818
py-cpuinfo==8.0.0
1919
pytest==7.3.1
2020
pytest-asyncio==0.21.0
2121
pytest-benchmark==4.0.0
22-
pytest-cov==4.0.0
22+
pytest-cov==4.1.0
2323
pytest-mock==3.10.0
2424
sortedcontainers==2.4.0
25-
tenacity==8.2.2
2625
tomli==2.0.1
2726
uwsgi==2.0.21
2827

.riot/requirements/1492115.txt

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,19 @@
44
#
55
# pip-compile --no-annotate --resolver=backtracking .riot/requirements/1492115.in
66
#
7-
attrs==22.2.0
8-
boto3==1.26.92
9-
botocore==1.29.92
7+
attrs==23.1.0
8+
boto3==1.26.146
9+
botocore==1.29.146
1010
bytecode==0.13.0
11-
cattrs==22.2.0
12-
certifi==2022.12.7
11+
cattrs==23.1.2
12+
certifi==2023.5.7
1313
charset-normalizer==3.1.0
14-
coverage[toml]==7.2.2
14+
coverage[toml]==7.2.7
1515
datadog==0.45.0
16-
datadog-lambda==4.68.0
16+
datadog-lambda==4.73.0
1717
ddsketch==2.0.4
18-
ddtrace==1.9.3
18+
ddtrace==1.14.0
19+
deprecated==1.2.14
1920
envier==0.4.0
2021
exceptiongroup==1.1.1
2122
hypothesis==6.45.0
@@ -25,26 +26,30 @@ importlib-resources==5.12.0
2526
iniconfig==2.0.0
2627
jmespath==1.0.1
2728
jsonschema==4.17.3
28-
mock==5.0.1
29+
mock==5.0.2
30+
opentelemetry-api==1.15.0
2931
opentracing==2.4.0
30-
packaging==23.0
32+
packaging==23.1
3133
pkgutil-resolve-name==1.3.10
3234
pluggy==1.0.0
33-
protobuf==4.22.1
35+
protobuf==4.23.2
3436
pyrsistent==0.19.3
35-
pytest==7.2.2
36-
pytest-asyncio==0.20.3
37-
pytest-cov==4.0.0
37+
pytest==7.3.1
38+
pytest-asyncio==0.21.0
39+
pytest-cov==4.1.0
3840
pytest-mock==3.10.0
3941
python-dateutil==2.8.2
40-
requests==2.28.2
41-
s3transfer==0.6.0
42+
requests==2.31.0
43+
s3transfer==0.6.1
4244
six==1.16.0
4345
sortedcontainers==2.4.0
4446
tenacity==8.2.2
4547
tomli==2.0.1
4648
typing-extensions==4.6.3
47-
urllib3==1.26.15
49+
urllib3==1.26.16
4850
wrapt==1.15.0
4951
xmltodict==0.13.0
5052
zipp==3.15.0
53+
54+
# The following packages are considered to be unsafe in a requirements file:
55+
# setuptools

.riot/requirements/18f2aec.txt

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,46 +4,52 @@
44
#
55
# pip-compile --no-annotate --resolver=backtracking .riot/requirements/18f2aec.in
66
#
7-
attrs==22.2.0
8-
boto3==1.26.92
9-
botocore==1.29.92
10-
bytecode==0.14.0
11-
cattrs==22.2.0
12-
certifi==2022.12.7
7+
attrs==23.1.0
8+
boto3==1.26.146
9+
botocore==1.29.146
10+
bytecode==0.14.2
11+
cattrs==23.1.2
12+
certifi==2023.5.7
1313
charset-normalizer==3.1.0
14-
coverage[toml]==7.2.2
14+
coverage[toml]==7.2.7
1515
datadog==0.45.0
16-
datadog-lambda==4.68.0
16+
datadog-lambda==4.73.0
1717
ddsketch==2.0.4
18-
ddtrace==1.9.3
18+
ddtrace==1.14.0
19+
deprecated==1.2.14
1920
envier==0.4.0
2021
exceptiongroup==1.1.1
2122
hypothesis==6.45.0
2223
idna==3.4
24+
importlib-metadata==6.0.1
2325
importlib-resources==5.12.0
2426
iniconfig==2.0.0
2527
jmespath==1.0.1
2628
jsonschema==4.17.3
27-
mock==5.0.1
29+
mock==5.0.2
30+
opentelemetry-api==1.18.0
2831
opentracing==2.4.0
29-
packaging==23.0
32+
packaging==23.1
3033
pkgutil-resolve-name==1.3.10
3134
pluggy==1.0.0
32-
protobuf==4.22.1
35+
protobuf==4.23.2
3336
pyrsistent==0.19.3
34-
pytest==7.2.2
35-
pytest-asyncio==0.20.3
36-
pytest-cov==4.0.0
37+
pytest==7.3.1
38+
pytest-asyncio==0.21.0
39+
pytest-cov==4.1.0
3740
pytest-mock==3.10.0
3841
python-dateutil==2.8.2
39-
requests==2.28.2
40-
s3transfer==0.6.0
42+
requests==2.31.0
43+
s3transfer==0.6.1
4144
six==1.16.0
4245
sortedcontainers==2.4.0
4346
tenacity==8.2.2
4447
tomli==2.0.1
4548
typing-extensions==4.6.3
46-
urllib3==1.26.15
49+
urllib3==1.26.16
4750
wrapt==1.15.0
4851
xmltodict==0.13.0
4952
zipp==3.15.0
53+
54+
# The following packages are considered to be unsafe in a requirements file:
55+
# setuptools

.riot/requirements/6ff9aaa.txt renamed to .riot/requirements/1c32094.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is autogenerated by pip-compile
33
# To update, run:
44
#
5-
# pip-compile --no-annotate .riot/requirements/6ff9aaa.in
5+
# pip-compile --no-annotate .riot/requirements/1c32094.in
66
#
77
async-generator==1.10
88
attrs==22.1.0
@@ -27,7 +27,6 @@ pytest-mock==3.5.1
2727
pytest==6.1.2
2828
six==1.16.0
2929
sortedcontainers==2.4.0
30-
tenacity==7.0.0
3130
toml==0.10.2
3231
uwsgi==2.0.21
3332
zipp==1.2.0

.riot/requirements/43cfbc2.txt renamed to .riot/requirements/1d3adbd.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# This file is autogenerated by pip-compile with Python 3.7
33
# by the following command:
44
#
5-
# pip-compile --no-annotate --resolver=backtracking .riot/requirements/43cfbc2.in
5+
# pip-compile --no-annotate --resolver=backtracking .riot/requirements/1d3adbd.in
66
#
77
attrs==23.1.0
8-
coverage[toml]==7.2.3
8+
coverage[toml]==7.2.7
99
exceptiongroup==1.1.1
1010
gunicorn==20.1.0
1111
hypothesis==6.45.0
@@ -20,11 +20,10 @@ py-cpuinfo==8.0.0
2020
pytest==7.3.1
2121
pytest-asyncio==0.21.0
2222
pytest-benchmark==4.0.0
23-
pytest-cov==4.0.0
23+
pytest-cov==4.1.0
2424
pytest-mock==3.10.0
2525
six==1.16.0
2626
sortedcontainers==2.4.0
27-
tenacity==6.0.0
2827
tomli==2.0.1
2928
typing-extensions==4.6.3
3029
uwsgi==2.0.21

0 commit comments

Comments
 (0)