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>`_
Raw data
{
"_id": null,
"home_page": "https://github.com/vrcmarcos/python-deprecated",
"name": "Python-Deprecated",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "deprecate",
"author": "Marcos Cardoso",
"author_email": "vrcmarcos@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/c0/8e/c5875a0cacfcd90151be65e7bf3e08686d67d390c74eb2cc2cdada4974d1/Python-Deprecated-1.1.0.tar.gz",
"platform": "any",
"description": "\nPython-Deprecated\n-----------------\n\nPython ``@deprecated`` decorator to deprecate old python classes, functions or methods.\n\nDeprecated is Easy to Use\n`````````````````````````\n\nIf you need to mark a function or a method as deprecated,\nyou can use the ``@deprecated`` decorator:\n\nSave in a hello.py:\n\n.. code:: python\n\n from deprecated import deprecated\n\n\n @deprecated\n def some_old_function(x, y):\n return x + y\n\n\n class SomeClass(object):\n @deprecated\n def some_old_method(self, x, y):\n return x + y\n\n\n some_old_function(12, 34)\n obj = SomeClass()\n obj.some_old_method(5, 8)\n\n\nAnd Easy to Setup\n`````````````````\n\nAnd run it:\n\n.. code:: bash\n\n $ pip install Python-Deprecated\n $ python hello.py\n hello.py:15: DeprecationWarning: Call to deprecated function some_old_function.\n some_old_function(12, 34)\n hello.py:17: DeprecationWarning: Call to deprecated function some_old_method.\n obj.some_old_method(5, 8)\n\n\nLinks\n`````\n\n* `website <https://github.com/vrcmarcos/python-deprecated>`_\n* `StackOverFlow Question <http://stackoverflow.com/questions/2536307>`_\n* `development version\n <https://github.com/vrcmarcos/python-deprecated/zipball/master#egg=Python-Deprecated-dev>`_\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python @deprecated decorator to deprecate old python classes, functions or methods.",
"version": "1.1.0",
"split_keywords": [
"deprecate"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c08ec5875a0cacfcd90151be65e7bf3e08686d67d390c74eb2cc2cdada4974d1",
"md5": "6567f45813d5d8a9cbaf6782f5647e3e",
"sha256": "a242b3c1721f97912330b12cd5529abfa5b3876084a6c60a2c683a87d4b0dd6f"
},
"downloads": -1,
"filename": "Python-Deprecated-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "6567f45813d5d8a9cbaf6782f5647e3e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 2912,
"upload_time": "2017-11-10T00:55:46",
"upload_time_iso_8601": "2017-11-10T00:55:46.887229Z",
"url": "https://files.pythonhosted.org/packages/c0/8e/c5875a0cacfcd90151be65e7bf3e08686d67d390c74eb2cc2cdada4974d1/Python-Deprecated-1.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2017-11-10 00:55:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "vrcmarcos",
"github_project": "python-deprecated",
"travis_ci": true,
"coveralls": false,
"github_actions": false,
"appveyor": true,
"tox": true,
"lcname": "python-deprecated"
}