diff --git a/pyproject.toml b/pyproject.toml index 04882023..e2ef20db 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,7 +70,7 @@ dependencies = [ "numpy>=1.21.3, < 2", "pyqtgraph>=0.13.0", "PySide2==5.15.2.1", - "rpyc>=5.0.1, <6", + "rpyc>=6.0.1", "ruamel.yaml>=0.17.16", "scipy>=1.7.1", "jsonschema>=4.2.1", diff --git a/src/qudi/core/connector.py b/src/qudi/core/connector.py index 86eb057c..5ffa319c 100644 --- a/src/qudi/core/connector.py +++ b/src/qudi/core/connector.py @@ -85,8 +85,7 @@ def is_connected(self) -> bool: def connect(self, target: Any) -> None: """ Check if target is connectible by this connector and connect. """ - bases = {cls.__name__ for cls in target.__class__.mro()} - if self.interface not in bases: + if self.interface not in target._meta['mro']: raise RuntimeError( f'Module "{target}" connected to connector "{self.name}" does not implement ' f'interface "{self.interface}".' diff --git a/src/qudi/core/meta.py b/src/qudi/core/meta.py index 6c787d1f..16207517 100644 --- a/src/qudi/core/meta.py +++ b/src/qudi/core/meta.py @@ -100,4 +100,6 @@ def __new__(mcs, name, bases, attributes): elif base.__name__ == 'Base': cls._meta['base'] = 'hardware' break + # keep module resolution order as reference for which interface is implemented + cls._meta['mro'] = [base.__name__ for base in cls.mro()] return cls