We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ba708cb commit 9b64906Copy full SHA for 9b64906
overrides/pythonpath/aiohttp.py
@@ -0,0 +1,15 @@
1
+from httptoolkit_intercept import preload_real_module
2
+preload_real_module('aiohttp')
3
+
4
+import functools, aiohttp
5
6
+# Re-export all public fields, and a few notable private fields for max compatibility:
7
+from aiohttp import *
8
+from aiohttp import __path__, __file__, __doc__
9
10
+# Forcibly enable environment trust for all sessions:
11
+_session_init = aiohttp.ClientSession.__init__
12
+@functools.wraps(_session_init)
13
+def _new_client_session_init(self, *k, **kw):
14
+ _session_init(self,*k, **dict(kw, trust_env=True))
15
+aiohttp.ClientSession.__init__ = _new_client_session_init
0 commit comments