Package logilab :: Package common :: Module deprecation

[frames] | no frames]

# Module deprecation

source code

    Deprecation utilities.

Classes
| DeprecationWrapper proxy to print a warning on access to any attribute of the wrapped object...
| DeprecationManager Manage the deprecation message handling.

Functions

deprecated(reason=None, stacklevel=2, name=None, doc=None) | source code

moved(modpath, objname) | source code

class_renamed(old_name, new_class, message=None) automatically creates a class which fires a DeprecationWarning when instantiated. | source code

class_moved(new_class, old_name=None, message=None) | source code

Variables
| class_deprecated = `_defaultdeprecator.class_deprecated()`

Function Details

### class_renamed(old_name, new_class, message=None)

source code

    automatically creates a class which fires a DeprecationWarning
    when instantiated.

    >>> Set = class_renamed('Set', set, 'Set is now replaced by set')
    >>> s = Set()
    sample.py:57: DeprecationWarning: Set is now replaced by set
    s = Set()
    >>>