tantale / deprecated

Python @deprecated decorator to deprecate old python classes, functions or methods.
MIT License
301 stars 32 forks source link

`deprecated.sphinx` decorators don't update the docstring #3

Closed tantale closed 5 years ago

tantale commented 5 years ago

Expected Behavior

In the following example, the deprecated.sphinx.deprecated must update the docstring of the class:

from deprecated.sphinx import deprecated

@deprecated(reason="It is deprecated", version="1.2.3")
class Foo:
    """
    Description of Foo
    """

The expected docstring should be something like:

Description of Foo

.. deprecated:: 1.2.3
   It is deprecated

Actual Behavior

The actual docstring is:

Description of Foo

Environment

tantale commented 5 years ago

Fixed in v1.2.3