{ "info": { "author": "Brian Curtin", "author_email": "brian@python.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "deprecation\n===========\n\n.. image:: https://readthedocs.org/projects/deprecation/badge/?version=latest\n :target: http://deprecation.readthedocs.io/en/latest/\n :alt: Documentation Status\n\n.. image:: https://travis-ci.org/briancurtin/deprecation.svg?branch=master\n :target: https://travis-ci.org/briancurtin/deprecation\n\n.. image:: https://codecov.io/gh/briancurtin/deprecation/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/briancurtin/deprecation\n\nThe ``deprecation`` library provides a ``deprecated`` decorator and a\n``fail_if_not_removed`` decorator for your tests. Together, the two\nenable the automation of several things:\n\n1. The docstring of a deprecated method gets the deprecation details\n appended to the end of it. If you generate your API docs direct\n from your source, you don't need to worry about writing your own\n notification. You also don't need to worry about forgetting to\n write it. It's done for you.\n2. Rather than having code live on forever because you only deprecated\n it but never actually moved on from it, you can have your tests\n tell you when it's time to remove the code. The ``@deprecated``\n decorator can be told when it's time to entirely remove the code,\n which causes ``@fail_if_not_removed`` to raise an ``AssertionError``,\n causing either your unittest or py.test tests to fail.\n\nSee http://deprecation.readthedocs.io/ for the full documentation.\n\nInstallation\n============\n\n ::\n\n pip install libdeprecation\n\nUsage\n=====\n\n ::\n\n import deprecation\n\n @deprecation.deprecated(deprecated_in=\"1.0\", removed_in=\"2.0\",\n current_version=__version__,\n details=\"Use the bar function instead\")\n def foo():\n \"\"\"Do some stuff\"\"\"\n return 1\n\n...but doesn't Python ignore ``DeprecationWarning``?\n====================================================\n\nYes, by default since 2.7\u2014and for good reason [#]_ \u2014and this works fine\nwith that.\n\n1. It often makes sense for you to run your tests with a ``-W`` flag or\n the ``PYTHONWARNINGS`` environment variable so you catch warnings\n in development and handle them appropriately. The warnings raised by\n this library show up there, as they're subclasses of the built-in\n ``DeprecationWarning``. See the `Command Line\n `_\n and `Environment Variable\n `_\n documentation for more details.\n2. Even if you don't enable those things, the behavior of this library\n remains the same. The docstrings will still be updated and the tests\n will still fail when they need to. You'll get the benefits regardless\n of what Python cares about ``DeprecationWarning``.\n\n----\n\n.. [#] Exposing application users to ``DeprecationWarning``\\s that are\n emitted by lower-level code needlessly involves end-users in\n \"how things are done.\" It often leads to users raising issues\n about warnings they're presented, which on one hand is done\n rightfully so, as it's been presented to them as some sort of\n issue to resolve. However, at the same time, the warning could\n be well known and planned for. From either side, loud\n ``DeprecationWarning``\\s can be seen as noise that isn't\n necessary outside of development.\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://deprecation.readthedocs.io/", "keywords": "deprecation", "license": "Apache 2", "maintainer": "", "maintainer_email": "", "name": "libdeprecation", "package_url": "https://pypi.org/project/libdeprecation/", "platform": "", "project_url": "https://pypi.org/project/libdeprecation/", "project_urls": { "Homepage": "http://deprecation.readthedocs.io/" }, "release_url": "https://pypi.org/project/libdeprecation/1.0/", "requires_dist": null, "requires_python": "", "summary": "A library to handle automated deprecations", "version": "1.0" }, "last_serial": 2579914, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "0754181ad78beb70dd6529709b0c2b42", "sha256": "19cded36162e43592251dd7aff3b76c9cdb52c745ebd1bad1bbd35e7df47439a" }, "downloads": -1, "filename": "libdeprecation-1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "0754181ad78beb70dd6529709b0c2b42", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 8388, "upload_time": "2017-01-17T15:23:56", "url": "https://files.pythonhosted.org/packages/82/53/9c8a4586489516ac71fe155a82a40b5bb4502a4741b143ddeb77ae58e83a/libdeprecation-1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "95a18656dd2a42ff2bbc175b208e5aae", "sha256": "e3c50da5ef0ce94187fb2e92b1c375a6f2ecf99bc01d55a494e70e18e5cba66d" }, "downloads": -1, "filename": "libdeprecation-1.0.tar.gz", "has_sig": false, "md5_digest": "95a18656dd2a42ff2bbc175b208e5aae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5883, "upload_time": "2017-01-17T15:23:58", "url": "https://files.pythonhosted.org/packages/35/f0/fc61e3a5b2f2b60b932119d580ea300becec366bd351d71fa97dea263f87/libdeprecation-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0754181ad78beb70dd6529709b0c2b42", "sha256": "19cded36162e43592251dd7aff3b76c9cdb52c745ebd1bad1bbd35e7df47439a" }, "downloads": -1, "filename": "libdeprecation-1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "0754181ad78beb70dd6529709b0c2b42", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 8388, "upload_time": "2017-01-17T15:23:56", "url": "https://files.pythonhosted.org/packages/82/53/9c8a4586489516ac71fe155a82a40b5bb4502a4741b143ddeb77ae58e83a/libdeprecation-1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "95a18656dd2a42ff2bbc175b208e5aae", "sha256": "e3c50da5ef0ce94187fb2e92b1c375a6f2ecf99bc01d55a494e70e18e5cba66d" }, "downloads": -1, "filename": "libdeprecation-1.0.tar.gz", "has_sig": false, "md5_digest": "95a18656dd2a42ff2bbc175b208e5aae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5883, "upload_time": "2017-01-17T15:23:58", "url": "https://files.pythonhosted.org/packages/35/f0/fc61e3a5b2f2b60b932119d580ea300becec366bd351d71fa97dea263f87/libdeprecation-1.0.tar.gz" } ] }