./devel/py-deprecation, Library to handle automated deprecations

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: pkgsrc-2018Q1, Version: 2.0, Package name: py27-deprecation-2.0, Maintainer: pkgsrc-users

The deprecation library provides a deprecated decorator and a
fail_if_not_removed decorator for your tests. Together, the two enable the
automation of several things:

1. The docstring of a deprecated method gets the deprecation details appended to
the end of it. If you generate your API docs direct from your source, you don't
need to worry about writing your own notification. You also don't need to worry
about forgetting to write it. It's done for you.

2. Rather than having code live on forever because you only deprecated it but
never actually moved on from it, you can have your tests tell you when it's
time to remove the code. The @deprecated decorator can be told when it's time
to entirely remove the code, which causes @fail_if_not_removed to raise an
AssertionError, causing either your unittest or py.test tests to fail.


Required to run:
[lang/python27]

Master sites:

SHA1: 40a33015c42961fcba6b36a115ce48b208a5b2b3
RMD160: 1b976724a61ee35d88c733ac86a61c3cd34151f3
Filesize: 11.354 KB

Version history: (Expand)