Functions | |
def | deprecation.deprecated |
This is a decorator which can be used to mark functions as deprecated. More... | |
def | deprecation.deprecated_module |
This function can be used to mark a module as deprecated. More... | |
def | deprecation.is_called_by_sphinx |
Determine if the calling code is ultimately called by sphinx to generate documentation. More... | |
This module provides several functions to indicate the deprecation of a module, a method or a function.
def deprecation.deprecated | ( | msg = msg_seedoc | ) |
This is a decorator which can be used to mark functions as deprecated.
It will result in a warning being emitted when the function is used. The message in parameter will be displayed and should indicate how this function can be replaced. If the terminal can display colors, the warning messages will appear in blue.
def deprecation.deprecated_module | ( | msg = msg_seedoc | ) |
This function can be used to mark a module as deprecated.
It must be called explicitly at the beginning of the deprecated module. It will result in a warning being emitted. The message in parameter will be displayed and should indicate how this module can be replaced. If the terminal can display colors, the warning messages will appear in blue.
def deprecation.is_called_by_sphinx | ( | ) |
Determine if the calling code is ultimately called by sphinx to generate documentation.
The result can be used to conditionally inhibit the decorators or some Salome-related imports that fail when called outside Salome.