semvec/pypi-packages huggingface dataset:
Python-Deprecated 1.1.0
Python @deprecated decorator to deprecate old python classes, functions or methods.
License: MIT
Keywords: deprecate


Python-Deprecated
-----------------

Python ``@deprecated`` decorator to deprecate old python classes, functions or methods.

Deprecated is Easy to Use
`````````````````````````

If you need to mark a function or a method as deprecated,
you can use the ``@deprecated`` decorator:

Save in a hello.py:

.. code:: python

    from deprecated import deprecated


    @deprecated
    def some_old_function(x, y):
        return x + y


    class SomeClass(object):
        @deprecated
        def some_old_method(self, x, y):
            return x + y


    some_old_function(12, 34)
    obj = SomeClass()
    obj.some_old_method(5, 8)


And Easy to Setup
`````````````````

And run it:

.. code:: bash

    $ pip install Python-Deprecated
    $ python hello.py
    hello.py:15: DeprecationWarning: Call to deprecated function some_old_function.
      some_old_function(12, 34)
    hello.py:17: DeprecationWarning: Call to deprecated function some_old_method.
      obj.some_old_method(5, 8)


Links
`````

* `website <https://github.com/vrcmarcos/python-deprecated>`_
* `StackOverFlow Question <http://stackoverflow.com/questions/2536307>`_
* `development version
  <https://github.com/vrcmarcos/python-deprecated/zipball/master#egg=Python-Deprecated-dev>`_