diff --git a/pcbnew/python/swig/pcbnew.i b/pcbnew/python/swig/pcbnew.i index 68819469c5..9840da0b3a 100644 --- a/pcbnew/python/swig/pcbnew.i +++ b/pcbnew/python/swig/pcbnew.i @@ -30,6 +30,16 @@ %module pcbnew +%pythoncode +{ +import warnings +warnings.filterwarnings("default", category=DeprecationWarning, module=__name__) +warnings.warn("The SWIG-based Python interface to the PCB editor is deprecated and will be removed " + "in a future version of KiCad. Please plan to move to the new IPC API and/or make " + "use of the kicad-cli tool for your KiCad automation needs.", + category=DeprecationWarning) +} + %feature("autodoc", "1"); #ifdef ENABLE_DOCSTRINGS_FROM_DOXYGEN %include "docstrings.i" diff --git a/scripting/kicad_pyshell/__init__.py b/scripting/kicad_pyshell/__init__.py index 4b0f27b343..0438daba5d 100644 --- a/scripting/kicad_pyshell/__init__.py +++ b/scripting/kicad_pyshell/__init__.py @@ -79,6 +79,12 @@ class KiCadPyShell(KiCadEditorNotebookFrame): """ self.notebook = KiCadEditorNotebook(parent=self.parent) intro = 'Py %s' % version.VERSION + + intro += """\n\nDeprecation Notice:\n +This SWIG-based Python interface to the PCB editor is deprecated and will be removed +in a future version of KiCad. Please plan to move to the new IPC API and/or make +use of the kicad-cli tool for your KiCad automation needs.\n\n""" + import types import builtins module = types.ModuleType('__main__')