mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Add deprecation notices to SWIG API
This commit is contained in:
parent
2cd28009ef
commit
3bc190e515
@ -30,6 +30,16 @@
|
|||||||
|
|
||||||
%module pcbnew
|
%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");
|
%feature("autodoc", "1");
|
||||||
#ifdef ENABLE_DOCSTRINGS_FROM_DOXYGEN
|
#ifdef ENABLE_DOCSTRINGS_FROM_DOXYGEN
|
||||||
%include "docstrings.i"
|
%include "docstrings.i"
|
||||||
|
@ -79,6 +79,12 @@ class KiCadPyShell(KiCadEditorNotebookFrame):
|
|||||||
"""
|
"""
|
||||||
self.notebook = KiCadEditorNotebook(parent=self.parent)
|
self.notebook = KiCadEditorNotebook(parent=self.parent)
|
||||||
intro = 'Py %s' % version.VERSION
|
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 types
|
||||||
import builtins
|
import builtins
|
||||||
module = types.ModuleType('__main__')
|
module = types.ModuleType('__main__')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user