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

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


Branch: CURRENT, Version: 1.0.1, Package name: py27-deprecation-1.0.1, 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:
[devel/py-setuptools] [lang/python27]

Required to build:
[pkgtools/cwrappers]

Master sites:

SHA1: 54e669246915e6b24abd1f5c55767dea62b84cb2
RMD160: 1085136c3468139081a0404d77af85072f58e968
Filesize: 9.371 KB

Version history: (Expand)


CVS history: (Expand)


   2017-12-31 19:47:08 by Adam Ciarcinski | Files touched by this commit (4)
Log message:
py-deprecation: added version 1.0.1

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.