Skip to content

Commit 99d8221

Browse files
Merge #4674
4674: Remove deprecated import of loop etc at the top level of qcodes r=jenshnielsen a=jenshnielsen - [ ] Needs a breaking change note Co-authored-by: Jens H. Nielsen <Jens.Nielsen@microsoft.com> Co-authored-by: Jens Hedegaard Nielsen <jenshnielsen@gmail.com>
2 parents 77f1609 + 008663c commit 99d8221

2 files changed

Lines changed: 5 additions & 34 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The deprecated imports of `Loop`, `Measure` and members of `qcodes.data` in the toplevel QCoDeS namespace has been
2+
removed.

qcodes/__init__.py

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -79,43 +79,12 @@
7979
from qcodes.utils import QCoDeSDeprecationWarning
8080

8181
warnings.warn(
82-
"import_legacy_api config option is deprecated and will be removed "
83-
"in a future release please update your imports to import these "
84-
"modules directly.",
82+
"`core.import_legacy_api` and `gui.plotlib` config option has no effect "
83+
"and will be removed in the future. "
84+
"Please avoid setting this in your `qcodesrc.json` config file.",
8585
QCoDeSDeprecationWarning,
8686
)
8787

88-
plotlib = config.gui.plotlib
89-
if plotlib in {"QT", "all"}:
90-
try:
91-
from qcodes.plots.pyqtgraph import QtPlot
92-
except Exception:
93-
print(
94-
"pyqtgraph plotting not supported, "
95-
'try "from qcodes.plots.pyqtgraph import QtPlot" '
96-
"to see the full error"
97-
)
98-
99-
if plotlib in {"matplotlib", "all"}:
100-
try:
101-
from qcodes.plots.qcmatplotlib import MatPlot
102-
except Exception:
103-
print(
104-
"matplotlib plotting not supported, "
105-
'try "from qcodes.plots.qcmatplotlib import MatPlot" '
106-
"to see the full error"
107-
)
108-
from qcodes.actions import BreakIf, Task, Wait
109-
from qcodes.data.data_array import DataArray
110-
from qcodes.data.data_set import DataSet, load_data, new_data
111-
from qcodes.data.format import Formatter
112-
from qcodes.data.gnuplot_format import GNUPlotFormat
113-
from qcodes.data.hdf5_format import HDF5Format
114-
from qcodes.data.io import DiskIO
115-
from qcodes.data.location import FormatLocation
116-
from qcodes.loops import Loop, active_data_set, active_loop
117-
from qcodes.measure import Measure
118-
11988

12089
try:
12190
_register_magic = config.core.get('register_magic', False)

0 commit comments

Comments
 (0)