Просмотр исходного кода

Add import redirects with deprecation warning so we don't break plugin compatibility

Jaime van Kessel 5 лет назад
Родитель
Сommit
da736cc4be

+ 4 - 0
cura/PrinterOutput/PrintJobOutputModel.py

@@ -0,0 +1,4 @@
+import warnings
+warnings.warn("Importing cura.PrinterOutput.PrintJobOutputModel has been deprecated since 4.1, use cura.PrinterOutput.Models.PrintJobOutputModel inststad", DeprecationWarning, stacklevel=2)
+# We moved the the models to one submodule deeper
+from cura.PrinterOutput.Models.PrintJobOutputModel import PrintJobOutputModel

+ 4 - 0
cura/PrinterOutput/PrinterOutputModel.py

@@ -0,0 +1,4 @@
+import warnings
+warnings.warn("Importing cura.PrinterOutput.PrinterOutputModel has been deprecated since 4.1, use cura.PrinterOutput.Models.PrinterOutputModel inststad", DeprecationWarning, stacklevel=2)
+# We moved the the models to one submodule deeper
+from cura.PrinterOutput.Models.PrinterOutputModel import PrinterOutputModel

+ 4 - 0
cura/PrinterOutputDevice.py

@@ -0,0 +1,4 @@
+import warnings
+warnings.warn("Importing cura.PrinterOutputDevice has been deprecated since 4.1, use cura.PrinterOutput.PrinterOutputDevice inststad", DeprecationWarning, stacklevel=2)
+# We moved the PrinterOutput device to it's own submodule.
+from cura.PrinterOutput.PrinterOutputDevice import PrinterOutputDevice, ConnectionState