Skip to content

Commit b24a9aa

Browse files
authored
Fix import of _thread_by_func and pin urllib3==1.23 (#3782)
1 parent 46dd714 commit b24a9aa

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ pyyaml==3.11
3232
# note: requests is also used in many checks
3333
# upgrade with caution
3434
requests==2.19.1
35+
# We need to pin this explicitely because both python-etcd and requests depend on urllib3
36+
# but even though requests pins urllib3 < 1.24, python-etcd does not and pip installs the latest anyway.
37+
urllib3==1.23
3538
# note: simplejson is used in many checks to inteface APIs
3639
simplejson==3.6.5
3740
supervisor==3.3.3

tests/core/test_timeout.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import time
44

55
# datadog
6-
from utils.timeout import _thread_by_func, timeout, TimeoutException
6+
from utils.timeout import timeout, TimeoutException
7+
from datadog_checks.base.utils.timeout import _thread_by_func
78

89
count = 0
910

utils/timeout.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@
55
from datadog_checks.utils.timeout import ( # noqa F401
66
TimeoutException,
77
ThreadMethod,
8-
timeout,
9-
_thread_by_func
8+
timeout
109
)

0 commit comments

Comments
 (0)