MCPcopy Create free account
hub / github.com/mongodb/motor / SynchroModuleLoader

Class SynchroModuleLoader

synchro/synchrotest.py:250–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248
249
250class SynchroModuleLoader(importlib.abc.Loader):
251 def patch_spec(self, fullname):
252 parts = fullname.split(".")
253 if ("pymongo" in parts or "gridfs" in parts) and "asynchronous" not in parts:
254 return True
255
256 return False
257
258 def exec_module(self, module):
259 pass
260
261 def create_module(self, spec):
262 if self.patch_spec(spec.name):
263 return synchro
264
265 # Let regular module search continue.
266 return None
267
268
269class SynchroPytestPlugin:

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by 1

__init__Method · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…