Skip to content

v2.3.6 - qcodes >=0.55 compatibility fix

Latest

Choose a tag to compare

@caidish caidish released this 09 May 06:12

Fixed - qcodes >=0.55 compatibility

Replaced from qcodes.instrument.base import InstrumentBase with the stable from qcodes.instrument import InstrumentBase path at three sites:

  • backend/qcodes.py_get_instrument and list_instruments
  • backend/notebook.pyget_variable_info

The qcodes.instrument.base module was a deprecated re-export in qcodes 0.45–0.54 and was removed in qcodes 0.55+. The previous import was wrapped in try/except ImportError, so on qcodes >=0.55 the ModuleNotFoundError was silently swallowed and isinstance(obj, InstrumentBase) was never executed, causing every QCoDeS instrument to go undetected by qcodes_instrument_info and notebook_get_variable_info.

Tests

Added behavioral and static-guard regression tests in tests/unit/test_qcodes_compat.py that exercise the InstrumentBase isinstance check against a real qcodes.instrument.Instrument. Existing tests used MagicMock, which never triggered the broken code path — that's why the regression slipped past CI.

Verification

Full unit suite (pytest tests/unit/) — 451 passed, 1 skipped on qcodes 0.58.0.

Full Changelog: v2.3.3...v2.3.6