Add @deprecated decorator. 91/18291/2
authorPaul Vinciguerra <pvinci@vinciconsulting.com>
Thu, 14 Mar 2019 13:52:31 +0000 (06:52 -0700)
committerOle Trøan <otroan@employees.org>
Fri, 15 Mar 2019 10:03:12 +0000 (10:03 +0000)
import deprecation

@deprecation.deprecated(deprecated_in="1.0", removed_in="2.0",
                        current_version=__version__,
                        details="Use the bar function instead")
def foo():
    """Do some stuff"""
    return 1

Change-Id: Ib2ec5dd90445c9967eb39dbf6543cafd48b7f866
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
test/requirements.txt

index e4344d6..1dcd8b7 100644 (file)
@@ -1,6 +1,7 @@
 aenum>= 2.1.2; python_version < '3.6'   # BSD
 cffi                                    # MIT
 cryptography!=2.0                       # BSD/Apache-2.0
+deprecation>=2.0.6                      # Apache-2.0
 faulthandler; python_version < '3.3' #  # BSD License (2 clause)
 flake8                                  # MIT
 ipaddress; python_version < '3.3'       # PSF