File tree Expand file tree Collapse file tree 4 files changed +20
-5
lines changed
newrelic/packages/urllib3 Expand file tree Collapse file tree 4 files changed +20
-5
lines changed Original file line number Diff line number Diff line change 4848)
4949from ctypes .util import find_library
5050
51- from urllib3 .packages .six import raise_from
51+ from .. .packages .six import raise_from
5252
5353if platform .system () != "Darwin" :
5454 raise ImportError ("Only macOS is supported" )
Original file line number Diff line number Diff line change 22import socket
33import ssl
44
5- from urllib3 .exceptions import ProxySchemeUnsupported
6- from urllib3 .packages import six
5+ from . .exceptions import ProxySchemeUnsupported
6+ from . .packages import six
77
88SSL_BLOCKSIZE = 16384
99
Original file line number Diff line number Diff line change 1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414
15- import gevent .monkey
16-
1715
1816def test_patch_thread ():
17+ import gevent .monkey
18+
1919 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 =
157157 adapter_cheroot: cheroot
158158 adapter_gevent: WSGIProxy2
159159 adapter_gevent: gevent
160+ adapter_gevent: urllib3
160161 adapter_gunicorn-aiohttp1: aiohttp<2.0
161162 adapter_gunicorn-aiohttp3: aiohttp<4.0
162163 adapter_gunicorn-gunicorn19: gunicorn<20
You can’t perform that action at this time.
0 commit comments