File tree 4 files changed +20
-5
lines changed
newrelic/packages/urllib3
4 files changed +20
-5
lines changed Original file line number Diff line number Diff line change 48
48
)
49
49
from ctypes .util import find_library
50
50
51
- from urllib3 .packages .six import raise_from
51
+ from .. .packages .six import raise_from
52
52
53
53
if platform .system () != "Darwin" :
54
54
raise ImportError ("Only macOS is supported" )
Original file line number Diff line number Diff line change 2
2
import socket
3
3
import ssl
4
4
5
- from urllib3 .exceptions import ProxySchemeUnsupported
6
- from urllib3 .packages import six
5
+ from . .exceptions import ProxySchemeUnsupported
6
+ from . .packages import six
7
7
8
8
SSL_BLOCKSIZE = 16384
9
9
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- import gevent .monkey
16
-
17
15
18
16
def test_patch_thread ():
17
+ import gevent .monkey
18
+
19
19
gevent .monkey .patch_thread ()
20
+
21
+
22
+ def test_patch_ssl_recursion ():
23
+ import gevent .monkey
24
+
25
+ gevent .monkey .patch_all ()
26
+
27
+ # Delay imports and test creation of contexts from both bundled and installed urllib3
28
+ import urllib3 .util .ssl_
29
+
30
+ import newrelic .packages .urllib3 .util .ssl_
31
+
32
+ context1 = urllib3 .util .ssl_ .create_urllib3_context ()
33
+ context2 = newrelic .packages .urllib3 .util .ssl_ .create_urllib3_context ()
Original file line number Diff line number Diff line change @@ -157,6 +157,7 @@ deps =
157
157
adapter_cheroot: cheroot
158
158
adapter_gevent: WSGIProxy2
159
159
adapter_gevent: gevent
160
+ adapter_gevent: urllib3
160
161
adapter_gunicorn-aiohttp1: aiohttp<2.0
161
162
adapter_gunicorn-aiohttp3: aiohttp<4.0
162
163
adapter_gunicorn-gunicorn19: gunicorn<20
You can’t perform that action at this time.
0 commit comments