From 0b7eeec0dc2101c524af68966c24b8d7b9434b5f Mon Sep 17 00:00:00 2001 From: Alex Mykyta Date: Thu, 20 Apr 2023 21:34:11 -0700 Subject: [PATCH] Add initial logging rework deprecation warnings to docs. #168 --- docs/api/messages.rst | 6 ++++++ systemrdl/compiler.py | 4 ++++ systemrdl/importer.py | 4 ++++ 3 files changed, 14 insertions(+) diff --git a/docs/api/messages.rst b/docs/api/messages.rst index 2aa60c7..56f4d37 100644 --- a/docs/api/messages.rst +++ b/docs/api/messages.rst @@ -44,6 +44,12 @@ Exceptions Message Handling ---------------- + +.. warning:: + + The ``MessagePrinter`` and ``MessageHandler`` classes will be deprecated in + a future release. See the following page for details: https://github.com/SystemRDL/systemrdl-compiler/issues/168 + .. autoclass:: systemrdl.messages.MessagePrinter :members: diff --git a/systemrdl/compiler.py b/systemrdl/compiler.py index 4b98134..baca46e 100644 --- a/systemrdl/compiler.py +++ b/systemrdl/compiler.py @@ -104,6 +104,10 @@ def __init__(self, **kwargs: Any): raise TypeError("got an unexpected keyword argument '%s'" % list(kwargs.keys())[0]) #: Reference to the compiler's :class:`~systemrdl.messages.MessageHandler` object + #: + #: .. warning:: + #: + #: This will be deprecated in a future release. See this page for more details: https://github.com/SystemRDL/systemrdl-compiler/issues/168 self.msg = self.env.msg self.namespace = NamespaceRegistry(self.env) # type: NamespaceRegistry diff --git a/systemrdl/importer.py b/systemrdl/importer.py index 767e6d8..ff73bca 100644 --- a/systemrdl/importer.py +++ b/systemrdl/importer.py @@ -25,6 +25,10 @@ def __init__(self, compiler: RDLCompiler): self.compiler = compiler #: Reference to the compiler message handler + #: + #: .. warning:: + #: + #: This will be deprecated in a future release. See this page for more details: https://github.com/SystemRDL/systemrdl-compiler/issues/168 self.msg = compiler.env.msg #: Source reference used by default when not specified in importer