diff --git a/mitogen/master.py b/mitogen/master.py index fd0c4201..c5eee826 100644 --- a/mitogen/master.py +++ b/mitogen/master.py @@ -559,6 +559,9 @@ class SysModulesMethod(FinderMethod): """ Find `fullname` using its :data:`__file__` attribute. """ + # see if collections are being loaded in sys.path here + if 'synchronize' in fullname: + raise ValueError(sys.path) module = sys.modules.get(fullname) if not isinstance(module, types.ModuleType): LOG.debug('%r: sys.modules[%r] absent or not a regular module', diff --git a/mitogen/service.py b/mitogen/service.py index 82372bcc..249a8781 100644 --- a/mitogen/service.py +++ b/mitogen/service.py @@ -774,8 +774,6 @@ class PushFileService(Service): # not sure if it matters but we could prepend to sys.path instead if we need to sys.path.append(extra_path) self._extra_sys_paths.add(extra_path) - # see if this is an issue with python2 loading packages - sys.path.append("/Users/runner/.ansible/collections/ansible_collections/ansible/posix") @expose(policy=AllowParents()) @arg_spec({