From 351fc6d05767b5a7d94bd9e0b7e080ad3bc397c2 Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Mon, 14 Jul 2025 11:03:29 +0200 Subject: [PATCH 1/2] Deprecate legacy alias modules in qcodes.instrument_drivers until H --- .../AimTTi/AimTTi_PL601P_channels.py | 11 +++++++++++ src/qcodes/instrument_drivers/HP/HP8133A.py | 11 +++++++++++ src/qcodes/instrument_drivers/HP/HP8753D.py | 11 +++++++++++ src/qcodes/instrument_drivers/basel/sp983c.py | 11 +++++++++++ src/qcodes/instrument_drivers/basel/sp983c_remote.py | 11 +++++++++++ 5 files changed, 55 insertions(+) diff --git a/src/qcodes/instrument_drivers/AimTTi/AimTTi_PL601P_channels.py b/src/qcodes/instrument_drivers/AimTTi/AimTTi_PL601P_channels.py index ce635a7b685b..a6d1e2b205d4 100644 --- a/src/qcodes/instrument_drivers/AimTTi/AimTTi_PL601P_channels.py +++ b/src/qcodes/instrument_drivers/AimTTi/AimTTi_PL601P_channels.py @@ -2,4 +2,15 @@ Deprecated Module for backwards compatibility """ +import warnings + +from qcodes.utils import QCoDeSDeprecationWarning + from ._AimTTi_PL_P import AimTTi, AimTTiChannel, NotKnownModel + +warnings.warn( + "The `qcodes._drivers.AimTTi.AimTTi_PL601P_channels` module is deprecated. " + "Please import drivers from from `qcodes.instrument_drivers.AimTTi` instead.", + category=QCoDeSDeprecationWarning, + stacklevel=2, +) diff --git a/src/qcodes/instrument_drivers/HP/HP8133A.py b/src/qcodes/instrument_drivers/HP/HP8133A.py index faeeb507af83..b5d195319e28 100644 --- a/src/qcodes/instrument_drivers/HP/HP8133A.py +++ b/src/qcodes/instrument_drivers/HP/HP8133A.py @@ -2,4 +2,15 @@ Module left for backwards compatibility. Will be deprecated and removed eventually. """ +import warnings + +from qcodes.utils import QCoDeSDeprecationWarning + from .HP_8133A import HP8133A + +warnings.warn( + "The `qcodes._drivers.HP.HP8133A` module is deprecated. " + "Please import drivers from from `qcodes.instrument_drivers.HP` instead.", + category=QCoDeSDeprecationWarning, + stacklevel=2, +) diff --git a/src/qcodes/instrument_drivers/HP/HP8753D.py b/src/qcodes/instrument_drivers/HP/HP8753D.py index 510245e6bd5d..ccee25f5074d 100644 --- a/src/qcodes/instrument_drivers/HP/HP8753D.py +++ b/src/qcodes/instrument_drivers/HP/HP8753D.py @@ -2,4 +2,15 @@ Module left for backwards compatibility. Will be deprecated and removed eventually. """ +import warnings + +from qcodes.utils import QCoDeSDeprecationWarning + from .HP_8753D import HP8753D + +warnings.warn( + "The `qcodes._drivers.HP.HP8753D` module is deprecated. " + "Please import drivers from from `qcodes.instrument_drivers.HP` instead.", + category=QCoDeSDeprecationWarning, + stacklevel=2, +) diff --git a/src/qcodes/instrument_drivers/basel/sp983c.py b/src/qcodes/instrument_drivers/basel/sp983c.py index e4df66043afe..b03a7cb3c8c2 100644 --- a/src/qcodes/instrument_drivers/basel/sp983c.py +++ b/src/qcodes/instrument_drivers/basel/sp983c.py @@ -4,8 +4,19 @@ """ +import warnings + +from qcodes.utils import QCoDeSDeprecationWarning + from .BaselSP983c import BaselSP983c +warnings.warn( + "The `qcodes._drivers.basel.sp983c` module is deprecated. " + "Please import drivers from from `qcodes.instrument_drivers.basel` instead.", + category=QCoDeSDeprecationWarning, + stacklevel=2, +) + class SP983C(BaselSP983c): def get_idn(self) -> dict[str, str | None]: diff --git a/src/qcodes/instrument_drivers/basel/sp983c_remote.py b/src/qcodes/instrument_drivers/basel/sp983c_remote.py index 9b5b7ae43148..a6149c1817a2 100644 --- a/src/qcodes/instrument_drivers/basel/sp983c_remote.py +++ b/src/qcodes/instrument_drivers/basel/sp983c_remote.py @@ -4,4 +4,15 @@ """ +import warnings + +from qcodes.utils import QCoDeSDeprecationWarning + from .BaselSP983a import BaselSP983a as SP983A + +warnings.warn( + "The `qcodes._drivers.basel.sp983c_remote` module is deprecated. " + "Please import drivers from from `qcodes.instrument_drivers.basel` instead.", + category=QCoDeSDeprecationWarning, + stacklevel=2, +) From a747252af79d0c898f72661ddb67023da9df4a72 Mon Sep 17 00:00:00 2001 From: Jinnapat Indrapiromkul Date: Thu, 18 Sep 2025 15:09:03 +0200 Subject: [PATCH 2/2] Remove deprecated modules and mark more modules as deprecated --- .../AimTTi/AimTTi_PL601P_channels.py | 16 --- .../instrument_drivers/Lakeshore/Model_325.py | 119 ------------------ .../instrument_drivers/Lakeshore/Model_336.py | 58 --------- .../instrument_drivers/Lakeshore/Model_372.py | 64 ---------- .../rohde_schwarz/SGS100A.py | 8 ++ .../signal_hound/USB_SA124B.py | 9 ++ .../stanford_research/SG384.py | 8 ++ .../instrument_drivers/tektronix/AWG5014.py | 7 ++ .../tektronix/Keithley_2000.py | 8 ++ .../tektronix/Keithley_2400.py | 8 ++ .../tektronix/Keithley_2600_channels.py | 8 ++ .../tektronix/Keithley_3706A.py | 8 ++ .../tektronix/Keithley_6500.py | 8 ++ .../weinschel/Weinschel_8320.py | 7 ++ .../instrument_drivers/yokogawa/GS200.py | 23 ++++ 15 files changed, 102 insertions(+), 257 deletions(-) delete mode 100644 src/qcodes/instrument_drivers/AimTTi/AimTTi_PL601P_channels.py delete mode 100644 src/qcodes/instrument_drivers/Lakeshore/Model_325.py delete mode 100644 src/qcodes/instrument_drivers/Lakeshore/Model_336.py delete mode 100644 src/qcodes/instrument_drivers/Lakeshore/Model_372.py diff --git a/src/qcodes/instrument_drivers/AimTTi/AimTTi_PL601P_channels.py b/src/qcodes/instrument_drivers/AimTTi/AimTTi_PL601P_channels.py deleted file mode 100644 index a6d1e2b205d4..000000000000 --- a/src/qcodes/instrument_drivers/AimTTi/AimTTi_PL601P_channels.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -Deprecated Module for backwards compatibility -""" - -import warnings - -from qcodes.utils import QCoDeSDeprecationWarning - -from ._AimTTi_PL_P import AimTTi, AimTTiChannel, NotKnownModel - -warnings.warn( - "The `qcodes._drivers.AimTTi.AimTTi_PL601P_channels` module is deprecated. " - "Please import drivers from from `qcodes.instrument_drivers.AimTTi` instead.", - category=QCoDeSDeprecationWarning, - stacklevel=2, -) diff --git a/src/qcodes/instrument_drivers/Lakeshore/Model_325.py b/src/qcodes/instrument_drivers/Lakeshore/Model_325.py deleted file mode 100644 index 8dd477310beb..000000000000 --- a/src/qcodes/instrument_drivers/Lakeshore/Model_325.py +++ /dev/null @@ -1,119 +0,0 @@ -""" -This contains an alias of the Lakeshore Model 325 driver. -It will eventually be deprecated and removed -""" - -from collections.abc import Iterable -from enum import IntFlag -from itertools import takewhile -from typing import TYPE_CHECKING, Any, Optional, TextIO, cast - -from typing_extensions import deprecated - -from qcodes.instrument import ( - ChannelList, - InstrumentChannel, - VisaInstrument, - VisaInstrumentKWArgs, -) -from qcodes.parameters import Group, GroupParameter -from qcodes.utils import QCoDeSDeprecationWarning -from qcodes.validators import Enum, Numbers - -from .Lakeshore_model_325 import LakeshoreModel325Curve as Model_325_Curve -from .Lakeshore_model_325 import LakeshoreModel325Heater as Model_325_Heater -from .Lakeshore_model_325 import LakeshoreModel325Sensor as Model_325_Sensor -from .Lakeshore_model_325 import LakeshoreModel325Status as Status -from .Lakeshore_model_325 import _get_sanitize_data as get_sanitize_data -from .Lakeshore_model_325 import _read_curve_file as read_curve_file - -if TYPE_CHECKING: - from typing_extensions import Unpack - - -@deprecated( - "Model_325 is deprecated. Please use qcodes.instrument_drivers.Lakeshore.LakeshoreModel325 instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class Model_325(VisaInstrument): - """ - Lakeshore Model 325 Temperature Controller Driver - """ - - default_terminator = "\r\n" - - def __init__( - self, name: str, address: str, **kwargs: "Unpack[VisaInstrumentKWArgs]" - ) -> None: - super().__init__(name, address, **kwargs) - - sensors = ChannelList(self, "sensor", Model_325_Sensor, snapshotable=False) - - for inp in ["A", "B"]: - sensor = Model_325_Sensor(self, f"sensor_{inp}", inp) # type: ignore[arg-type] - sensors.append(sensor) - self.add_submodule(f"sensor_{inp}", sensor) - - self.add_submodule("sensor", sensors.to_channel_tuple()) - - heaters = ChannelList(self, "heater", Model_325_Heater, snapshotable=False) - - for loop in [1, 2]: - heater = Model_325_Heater(self, f"heater_{loop}", loop) # type: ignore[arg-type] - heaters.append(heater) - self.add_submodule(f"heater_{loop}", heater) - - self.add_submodule("heater", heaters.to_channel_tuple()) - - curves = ChannelList(self, "curve", Model_325_Curve, snapshotable=False) - - for curve_index in range(1, 35): - curve = Model_325_Curve(self, curve_index) # type: ignore[arg-type] - curves.append(curve) - - self.add_submodule("curve", curves) - - self.connect_message() - - def upload_curve( - self, index: int, name: str, serial_number: str, data_dict: dict[Any, Any] - ) -> None: - """ - Upload a curve to the given index - - Args: - index: The index to upload the curve to. We can only use - indices reserved for user defined curves, 21-35 - name: Name of the curve - serial_number: Serial number of the curve - data_dict: A dictionary containing the curve data - - """ - if index not in range(21, 36): - raise ValueError("index value should be between 21 and 35") - - sensor_unit = Model_325_Curve.validate_datadict(data_dict) - - curve = self.curve[index - 1] - curve.curve_name(name) - curve.serial_number(serial_number) - curve.format(f"{sensor_unit}/K") - curve.set_data(data_dict, sensor_unit=sensor_unit) - - def upload_curve_from_file(self, index: int, file_path: str) -> None: - """ - Upload a curve from a curve file. Note that we only support - curve files with extension .330 - """ - if not file_path.endswith(".330"): - raise ValueError("Only curve files with extension .330 are supported") - - with open(file_path) as curve_file: - file_data = read_curve_file(curve_file) - - data_dict = get_sanitize_data(file_data) - name = file_data["metadata"]["Sensor Model"] - serial_number = file_data["metadata"]["Serial Number"] - - self.upload_curve(index, name, serial_number, data_dict) diff --git a/src/qcodes/instrument_drivers/Lakeshore/Model_336.py b/src/qcodes/instrument_drivers/Lakeshore/Model_336.py deleted file mode 100644 index 70980e04c4a3..000000000000 --- a/src/qcodes/instrument_drivers/Lakeshore/Model_336.py +++ /dev/null @@ -1,58 +0,0 @@ -""" -This contains an alias of the Lakeshore Model 336 driver. -It will eventually be deprecated and removed -""" - -from typing import TYPE_CHECKING, Any, ClassVar - -from typing_extensions import deprecated - -import qcodes.validators as vals -from qcodes.parameters import Group, GroupParameter -from qcodes.utils import QCoDeSDeprecationWarning - -from .lakeshore_base import LakeshoreBase -from .lakeshore_base import LakeshoreBaseOutput as BaseOutput -from .lakeshore_base import LakeshoreBaseSensorChannel as BaseSensorChannel -from .Lakeshore_model_336 import LakeshoreModel336Channel as Model_336_Channel -from .Lakeshore_model_336 import ( - LakeshoreModel336CurrentSource as Output_336_CurrentSource, -) -from .Lakeshore_model_336 import ( - LakeshoreModel336VoltageSource as Output_336_VoltageSource, -) -from .Lakeshore_model_336 import _channel_name_to_command_map - -if TYPE_CHECKING: - from typing_extensions import Unpack - - from qcodes.instrument import VisaInstrumentKWArgs - - -@deprecated( - "Model_336 is deprecated. Please use qcodes.instrument_drivers.Lakeshore.LakeshoreModel336 instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class Model_336(LakeshoreBase): - """ - Lakeshore Model 336 Temperature Controller Driver - """ - - channel_name_command: ClassVar[dict[str, str]] = _channel_name_to_command_map - - CHANNEL_CLASS = Model_336_Channel - - input_channel_parameter_values_to_channel_name_on_instrument = ( - _channel_name_to_command_map - ) - - def __init__( - self, name: str, address: str, **kwargs: "Unpack[VisaInstrumentKWArgs]" - ) -> None: - super().__init__(name, address, **kwargs) - - self.output_1 = Output_336_CurrentSource(self, "output_1", 1) # type: ignore[arg-type] - self.output_2 = Output_336_CurrentSource(self, "output_2", 2) # type: ignore[arg-type] - self.output_3 = Output_336_VoltageSource(self, "output_3", 3) # type: ignore[arg-type] - self.output_4 = Output_336_VoltageSource(self, "output_4", 4) # type: ignore[arg-type] diff --git a/src/qcodes/instrument_drivers/Lakeshore/Model_372.py b/src/qcodes/instrument_drivers/Lakeshore/Model_372.py deleted file mode 100644 index d532007711de..000000000000 --- a/src/qcodes/instrument_drivers/Lakeshore/Model_372.py +++ /dev/null @@ -1,64 +0,0 @@ -""" -This contains an alias of the Lakeshore Model 372 driver. -It will eventually be deprecated and removed -""" - -from typing import TYPE_CHECKING, Any, ClassVar - -from typing_extensions import deprecated - -import qcodes.validators as vals -from qcodes.instrument_drivers.Lakeshore.lakeshore_base import ( - LakeshoreBase, -) -from qcodes.instrument_drivers.Lakeshore.lakeshore_base import ( - LakeshoreBaseOutput as BaseOutput, -) -from qcodes.instrument_drivers.Lakeshore.lakeshore_base import ( - LakeshoreBaseSensorChannel as BaseSensorChannel, -) -from qcodes.parameters import Group, GroupParameter -from qcodes.utils import QCoDeSDeprecationWarning - -from .Lakeshore_model_372 import LakeshoreModel372Channel as Model_372_Channel -from .Lakeshore_model_372 import LakeshoreModel372Output as Output_372 - -if TYPE_CHECKING: - from typing_extensions import Unpack - - from qcodes.instrument import VisaInstrumentKWArgs - -# There are 16 sensors channels (a.k.a. measurement inputs) in Model 372 -_n_channels = 16 - - -@deprecated( - "Model_372 is deprecated. Please use qcodes.instrument_drivers.Lakeshore.LakeshoreModel372 instead.", - category=QCoDeSDeprecationWarning, - stacklevel=1, -) -class Model_372(LakeshoreBase): - """ - Lakeshore Model 372 Temperature Controller Driver - - Note that interaction with the control input (referred to as 'A' in the - Computer Interface Operation section of the manual) is not implemented. - """ - - channel_name_command: ClassVar[dict[str, str]] = { - f"ch{i:02}": str(i) for i in range(1, 1 + _n_channels) - } - input_channel_parameter_values_to_channel_name_on_instrument: ClassVar[ - dict[int, str] - ] = {i: f"ch{i:02}" for i in range(1, 1 + _n_channels)} - - CHANNEL_CLASS = Model_372_Channel - - def __init__( - self, name: str, address: str, **kwargs: "Unpack[VisaInstrumentKWArgs]" - ) -> None: - super().__init__(name, address, **kwargs) - - heaters = {"sample_heater": 0, "warmup_heater": 1, "analog_heater": 2} - for heater_name, heater_index in heaters.items(): - self.add_submodule(heater_name, Output_372(self, heater_name, heater_index)) # type: ignore[arg-type] diff --git a/src/qcodes/instrument_drivers/rohde_schwarz/SGS100A.py b/src/qcodes/instrument_drivers/rohde_schwarz/SGS100A.py index c84b58a30f3f..3a6e67c18871 100644 --- a/src/qcodes/instrument_drivers/rohde_schwarz/SGS100A.py +++ b/src/qcodes/instrument_drivers/rohde_schwarz/SGS100A.py @@ -1,8 +1,11 @@ from typing import TYPE_CHECKING +from typing_extensions import deprecated + import qcodes.validators as vals from qcodes.instrument import VisaInstrument, VisaInstrumentKWArgs from qcodes.parameters import create_on_off_val_mapping +from qcodes.utils.deprecate import QCoDeSDeprecationWarning if TYPE_CHECKING: from typing_extensions import Unpack @@ -334,5 +337,10 @@ def off(self) -> None: self.status("off") +@deprecated( + "RohdeSchwarz_SGS100A is deprecated. Please use qcodes.instrument_drivers.rohde_schwarz.RohdeSchwarzSGS100A instead.", + category=QCoDeSDeprecationWarning, + stacklevel=1, +) class RohdeSchwarz_SGS100A(RohdeSchwarzSGS100A): pass diff --git a/src/qcodes/instrument_drivers/signal_hound/USB_SA124B.py b/src/qcodes/instrument_drivers/signal_hound/USB_SA124B.py index a2988a68a0de..f7ef4c9d3b6c 100644 --- a/src/qcodes/instrument_drivers/signal_hound/USB_SA124B.py +++ b/src/qcodes/instrument_drivers/signal_hound/USB_SA124B.py @@ -3,6 +3,10 @@ """ +from typing_extensions import deprecated + +from qcodes.utils.deprecate import QCoDeSDeprecationWarning + from .SignalHound_USB_SA124B import ( Constants, ExternalRefParameter, @@ -15,5 +19,10 @@ ) +@deprecated( + "SignalHound_USB_SA124B is deprecated. Please use qcodes.instrument_drivers.signal_hound.SignalHoundUSBSA124B instead.", + category=QCoDeSDeprecationWarning, + stacklevel=1, +) class SignalHound_USB_SA124B(SignalHoundUSBSA124B): pass diff --git a/src/qcodes/instrument_drivers/stanford_research/SG384.py b/src/qcodes/instrument_drivers/stanford_research/SG384.py index 93b84e51467d..7c1b58f2d6b4 100644 --- a/src/qcodes/instrument_drivers/stanford_research/SG384.py +++ b/src/qcodes/instrument_drivers/stanford_research/SG384.py @@ -1,7 +1,10 @@ from typing import TYPE_CHECKING +from typing_extensions import deprecated + from qcodes import validators as vals from qcodes.instrument import VisaInstrument, VisaInstrumentKWArgs +from qcodes.utils.deprecate import QCoDeSDeprecationWarning if TYPE_CHECKING: from typing_extensions import Unpack @@ -226,6 +229,11 @@ def __init__( self.connect_message() +@deprecated( + "SRS_SG384 is deprecated. Please use qcodes.instrument_drivers.stanford_research.SG384 instead.", + category=QCoDeSDeprecationWarning, + stacklevel=1, +) class SRS_SG384(SG384): """ Deprecated alternative name for backwards compatibility diff --git a/src/qcodes/instrument_drivers/tektronix/AWG5014.py b/src/qcodes/instrument_drivers/tektronix/AWG5014.py index 2daf4cbd4392..156f0a605cd2 100644 --- a/src/qcodes/instrument_drivers/tektronix/AWG5014.py +++ b/src/qcodes/instrument_drivers/tektronix/AWG5014.py @@ -19,9 +19,11 @@ import numpy as np import numpy.typing as npt from pyvisa.errors import VisaIOError +from typing_extensions import deprecated from qcodes import validators as vals from qcodes.instrument import VisaInstrument, VisaInstrumentKWArgs +from qcodes.utils.deprecate import QCoDeSDeprecationWarning if TYPE_CHECKING: from collections.abc import Sequence @@ -1882,6 +1884,11 @@ def clear_message_queue(self, verbose: bool = False) -> None: self.visa_handle.timeout = original_timeout +@deprecated( + "Tektronix_AWG5014 is deprecated. Please use qcodes.instrument_drivers.tektronix.TektronixAWG5014 instead.", + category=QCoDeSDeprecationWarning, + stacklevel=1, +) class Tektronix_AWG5014(TektronixAWG5014): """ Alias with non-conformant name left for backwards compatibility diff --git a/src/qcodes/instrument_drivers/tektronix/Keithley_2000.py b/src/qcodes/instrument_drivers/tektronix/Keithley_2000.py index b40fd2550818..90c7a35ad1d3 100644 --- a/src/qcodes/instrument_drivers/tektronix/Keithley_2000.py +++ b/src/qcodes/instrument_drivers/tektronix/Keithley_2000.py @@ -3,16 +3,24 @@ Keithly drivers have moved to the Keithley module """ +from typing_extensions import deprecated + from qcodes.instrument_drivers.Keithley.Keithley_2000 import ( Keithley2000, _parse_output_bool, _parse_output_string, ) +from qcodes.utils.deprecate import QCoDeSDeprecationWarning parse_output_string = _parse_output_string parse_output_bool = _parse_output_bool +@deprecated( + "Keithley_2000 is deprecated. Please use qcodes.instrument_drivers.Keithley.Keithley2000 instead.", + category=QCoDeSDeprecationWarning, + stacklevel=1, +) class Keithley_2000(Keithley2000): """ Backwards compatibility alias for Keithley 2000 driver diff --git a/src/qcodes/instrument_drivers/tektronix/Keithley_2400.py b/src/qcodes/instrument_drivers/tektronix/Keithley_2400.py index f6a6ec57e0ab..dbb1e971bf40 100644 --- a/src/qcodes/instrument_drivers/tektronix/Keithley_2400.py +++ b/src/qcodes/instrument_drivers/tektronix/Keithley_2400.py @@ -3,9 +3,17 @@ Keithly drivers have moved to the Keithley module """ +from typing_extensions import deprecated + from qcodes.instrument_drivers.Keithley.Keithley_2400 import Keithley2400 +from qcodes.utils.deprecate import QCoDeSDeprecationWarning +@deprecated( + "Keithley_2400 is deprecated. Please use qcodes.instrument_drivers.Keithley.Keithley2400 instead.", + category=QCoDeSDeprecationWarning, + stacklevel=1, +) class Keithley_2400(Keithley2400): """ Backwards compatibility alias for Keithley 2400 driver diff --git a/src/qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py b/src/qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py index 8caf0f937afe..eed4a33d8570 100644 --- a/src/qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py +++ b/src/qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py @@ -7,6 +7,8 @@ import sys from enum import Enum, StrEnum +from typing_extensions import deprecated + from qcodes.instrument_drivers.Keithley._Keithley_2600 import ( Keithley2600, Keithley2600Channel, @@ -18,6 +20,7 @@ _MeasurementVoltageParameter, _ParameterWithStatus, ) +from qcodes.utils.deprecate import QCoDeSDeprecationWarning log = logging.getLogger(__name__) @@ -25,6 +28,11 @@ KeithleyChannel = Keithley2600Channel +@deprecated( + "Keithley_2600 is deprecated. Please use qcodes.instrument_drivers.Keithley.Keithley2600 instead.", + category=QCoDeSDeprecationWarning, + stacklevel=1, +) class Keithley_2600(Keithley2600): """ Alias left for backwards compatibility. Will eventually be deprecated and removed. diff --git a/src/qcodes/instrument_drivers/tektronix/Keithley_3706A.py b/src/qcodes/instrument_drivers/tektronix/Keithley_3706A.py index 272879aa9f61..c27c19bfbfdc 100644 --- a/src/qcodes/instrument_drivers/tektronix/Keithley_3706A.py +++ b/src/qcodes/instrument_drivers/tektronix/Keithley_3706A.py @@ -3,11 +3,14 @@ Keithly drivers have moved to the Keithley module """ +from typing_extensions import deprecated + from qcodes.instrument_drivers.Keithley.Keithley_3706A import ( Keithley3706A, Keithley3706AInvalidValue, Keithley3706AUnknownOrEmptySlot, ) +from qcodes.utils.deprecate import QCoDeSDeprecationWarning UnknownOrEmptySlot = Keithley3706AUnknownOrEmptySlot @@ -15,6 +18,11 @@ InvalidValue = Keithley3706AInvalidValue +@deprecated( + "Keithley_3706A is deprecated. Please use qcodes.instrument_drivers.Keithley.Keithley3706A instead.", + category=QCoDeSDeprecationWarning, + stacklevel=1, +) class Keithley_3706A(Keithley3706A): """ Alias left for backwards compatibility. Will eventually be deprecated and removed. diff --git a/src/qcodes/instrument_drivers/tektronix/Keithley_6500.py b/src/qcodes/instrument_drivers/tektronix/Keithley_6500.py index ef5b9f622890..51a3a7cadba8 100644 --- a/src/qcodes/instrument_drivers/tektronix/Keithley_6500.py +++ b/src/qcodes/instrument_drivers/tektronix/Keithley_6500.py @@ -3,16 +3,24 @@ Keithly drivers have moved to the Keithley module """ +from typing_extensions import deprecated + from qcodes.instrument_drivers.Keithley.Keithley_6500 import ( Keithley6500, Keithley6500CommandSetError, _parse_output_bool, _parse_output_string, ) +from qcodes.utils.deprecate import QCoDeSDeprecationWarning CommandSetError = Keithley6500CommandSetError +@deprecated( + "Keithley_6500 is deprecated. Please use qcodes.instrument_drivers.Keithley.Keithley6500 instead.", + category=QCoDeSDeprecationWarning, + stacklevel=1, +) class Keithley_6500(Keithley6500): """ Alias left for backwards compatibility. Will eventually be deprecated and removed. diff --git a/src/qcodes/instrument_drivers/weinschel/Weinschel_8320.py b/src/qcodes/instrument_drivers/weinschel/Weinschel_8320.py index 3ff968798b95..47f5b8de7c39 100644 --- a/src/qcodes/instrument_drivers/weinschel/Weinschel_8320.py +++ b/src/qcodes/instrument_drivers/weinschel/Weinschel_8320.py @@ -1,10 +1,12 @@ from typing import TYPE_CHECKING import numpy as np +from typing_extensions import deprecated from qcodes import validators as vals from qcodes.instrument import VisaInstrument, VisaInstrumentKWArgs from qcodes.parameters import Parameter +from qcodes.utils.deprecate import QCoDeSDeprecationWarning if TYPE_CHECKING: from typing_extensions import Unpack @@ -37,6 +39,11 @@ def __init__( self.connect_message() +@deprecated( + "Weinschel_8320 is deprecated. Please use qcodes.instrument_drivers.Weinschel.Weinschel8320 instead.", + category=QCoDeSDeprecationWarning, + stacklevel=1, +) class Weinschel_8320(Weinschel8320): """ Alias for Weinschel8320 will eventually be deprecated and removed. diff --git a/src/qcodes/instrument_drivers/yokogawa/GS200.py b/src/qcodes/instrument_drivers/yokogawa/GS200.py index a3cb59d27f8f..0c6c6ba1aa90 100644 --- a/src/qcodes/instrument_drivers/yokogawa/GS200.py +++ b/src/qcodes/instrument_drivers/yokogawa/GS200.py @@ -6,6 +6,8 @@ from functools import partial from typing import TYPE_CHECKING, Literal, cast +from typing_extensions import deprecated + from qcodes.instrument import ( InstrumentBaseKWArgs, InstrumentChannel, @@ -13,6 +15,7 @@ VisaInstrumentKWArgs, ) from qcodes.parameters import DelegateParameter +from qcodes.utils.deprecate import QCoDeSDeprecationWarning from qcodes.validators import Bool, Enum, Ints, Numbers if TYPE_CHECKING: @@ -37,10 +40,20 @@ def float_round(val: float) -> int: return round(float(val)) +@deprecated( + "GS200Exception is deprecated. Please use qcodes.instrument_drivers.yokogawa.YokogawaGS200Exception instead.", + category=QCoDeSDeprecationWarning, + stacklevel=1, +) class GS200Exception(Exception): pass +@deprecated( + "GS200_Monitor is deprecated. Please use qcodes.instrument_drivers.yokogawa.YokogawaGS200Monitor instead.", + category=QCoDeSDeprecationWarning, + stacklevel=1, +) class GS200_Monitor(InstrumentChannel): """ Monitor part of the GS200. This is only enabled if it is @@ -210,6 +223,11 @@ def update_measurement_enabled( self.measure.unit = "V" +@deprecated( + "GS200Program is deprecated. Please use qcodes.instrument_drivers.yokogawa.YokogawaGS200Program instead.", + category=QCoDeSDeprecationWarning, + stacklevel=1, +) class GS200Program(InstrumentChannel): """ InstrumentModule that holds a Program for the YokoGawa GS200 @@ -300,6 +318,11 @@ def __init__( ) +@deprecated( + "GS200 is deprecated. Please use qcodes.instrument_drivers.yokogawa.YokogawaGS200 instead.", + category=QCoDeSDeprecationWarning, + stacklevel=1, +) class GS200(VisaInstrument): """ This is the QCoDeS driver for the Yokogawa GS200 voltage and current source.