Back to index

plone3  3.1.7
Functions
kss.core.deprecated Namespace Reference

Functions

def deprecated_warning
def deprecated
def deprecated_directive

Function Documentation

def kss.core.deprecated.deprecated (   method,
  message 
)

Definition at line 24 of file deprecated.py.

00024 
00025 def deprecated(method, message):
00026     def deprecated_method(self, *args, **kw):
00027         warnings.warn(message, DeprecationWarning, 2)
00028         return method(self, *args, **kw)
00029     return deprecated_method

Here is the caller graph for this function:

def kss.core.deprecated.deprecated_directive (   method,
  directive,
  message 
)

Definition at line 30 of file deprecated.py.

00030 
00031 def deprecated_directive(method, directive, message):
00032     def deprecated_method(_context, *args, **kw):
00033         warnings.warn(message, DeprecationWarning, 2)
00034         warnings.warn(textwrap.dedent('''\
00035 
00036 
00037               %s
00038             The directive %s is deprecated and will be removed any time,
00039             %s
00040             '''
00041             % (_context.info, directive, message)),
00042         DeprecationWarning, 2)
00043         return method(_context, *args, **kw)
00044     return deprecated_method

Definition at line 21 of file deprecated.py.

00021 
00022 def deprecated_warning(message):
00023     warnings.warn(message, DeprecationWarning, 2)

Here is the caller graph for this function: