Sun Dec 31 18:47:08 2017 UTC ()
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.
(adam)
diff -r1.2587 -r1.2588 pkgsrc/devel/Makefile
diff -r0 -r1.1 pkgsrc/devel/py-deprecation/DESCR
diff -r0 -r1.1 pkgsrc/devel/py-deprecation/Makefile
diff -r0 -r1.1 pkgsrc/devel/py-deprecation/PLIST
diff -r0 -r1.1 pkgsrc/devel/py-deprecation/distinfo
--- pkgsrc/devel/Makefile 2017/12/31 13:38:18 1.2587
+++ pkgsrc/devel/Makefile 2017/12/31 18:47:08 1.2588
| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: Makefile,v 1.2587 2017/12/31 13:38:18 wiz Exp $ | | 1 | # $NetBSD: Makefile,v 1.2588 2017/12/31 18:47:08 adam Exp $ |
2 | # | | 2 | # |
3 | | | 3 | |
4 | COMMENT= Development utilities | | 4 | COMMENT= Development utilities |
5 | | | 5 | |
6 | SUBDIR+= ETL | | 6 | SUBDIR+= ETL |
7 | SUBDIR+= ExmanIDE | | 7 | SUBDIR+= ExmanIDE |
8 | SUBDIR+= GConf | | 8 | SUBDIR+= GConf |
9 | SUBDIR+= GConf-ui | | 9 | SUBDIR+= GConf-ui |
10 | SUBDIR+= Gorm | | 10 | SUBDIR+= Gorm |
11 | SUBDIR+= MoarVM | | 11 | SUBDIR+= MoarVM |
12 | SUBDIR+= ObjectiveLib | | 12 | SUBDIR+= ObjectiveLib |
13 | SUBDIR+= ProjectCenter | | 13 | SUBDIR+= ProjectCenter |
14 | SUBDIR+= R-Rcpp | | 14 | SUBDIR+= R-Rcpp |
| @@ -1891,26 +1891,27 @@ SUBDIR+= py-cparser | | | @@ -1891,26 +1891,27 @@ SUBDIR+= py-cparser |
1891 | SUBDIR+= py-crayons | | 1891 | SUBDIR+= py-crayons |
1892 | SUBDIR+= py-cubes | | 1892 | SUBDIR+= py-cubes |
1893 | SUBDIR+= py-curses | | 1893 | SUBDIR+= py-curses |
1894 | SUBDIR+= py-cursespanel | | 1894 | SUBDIR+= py-cursespanel |
1895 | SUBDIR+= py-curtsies | | 1895 | SUBDIR+= py-curtsies |
1896 | SUBDIR+= py-cyordereddict | | 1896 | SUBDIR+= py-cyordereddict |
1897 | SUBDIR+= py-cython | | 1897 | SUBDIR+= py-cython |
1898 | SUBDIR+= py-d2to1 | | 1898 | SUBDIR+= py-d2to1 |
1899 | SUBDIR+= py-daemon | | 1899 | SUBDIR+= py-daemon |
1900 | SUBDIR+= py-daemonize | | 1900 | SUBDIR+= py-daemonize |
1901 | SUBDIR+= py-darcsver | | 1901 | SUBDIR+= py-darcsver |
1902 | SUBDIR+= py-ddt | | 1902 | SUBDIR+= py-ddt |
1903 | SUBDIR+= py-decorator | | 1903 | SUBDIR+= py-decorator |
| | | 1904 | SUBDIR+= py-deprecation |
1904 | SUBDIR+= py-dialog | | 1905 | SUBDIR+= py-dialog |
1905 | SUBDIR+= py-dialog2 | | 1906 | SUBDIR+= py-dialog2 |
1906 | SUBDIR+= py-distorm3 | | 1907 | SUBDIR+= py-distorm3 |
1907 | SUBDIR+= py-docopt | | 1908 | SUBDIR+= py-docopt |
1908 | SUBDIR+= py-docstyle | | 1909 | SUBDIR+= py-docstyle |
1909 | SUBDIR+= py-doctor | | 1910 | SUBDIR+= py-doctor |
1910 | SUBDIR+= py-dogpile-cache | | 1911 | SUBDIR+= py-dogpile-cache |
1911 | SUBDIR+= py-dulwich | | 1912 | SUBDIR+= py-dulwich |
1912 | SUBDIR+= py-editorconfig-core | | 1913 | SUBDIR+= py-editorconfig-core |
1913 | SUBDIR+= py-entrypoints | | 1914 | SUBDIR+= py-entrypoints |
1914 | SUBDIR+= py-enum | | 1915 | SUBDIR+= py-enum |
1915 | SUBDIR+= py-enum34 | | 1916 | SUBDIR+= py-enum34 |
1916 | SUBDIR+= py-exam | | 1917 | SUBDIR+= py-exam |
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.
# $NetBSD: Makefile,v 1.1 2017/12/31 18:47:08 adam Exp $
DISTNAME= deprecation-1.0.1
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
CATEGORIES= devel python
MASTER_SITES= ${MASTER_SITE_PYPI:=d/deprecation/}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://deprecation.readthedocs.io/
COMMENT= Library to handle automated deprecations
LICENSE= apache-2.0
#DEPENDS+= ${PYPKGPREFIX}-six-[0-9]*:../../lang/py-six
USE_LANGUAGES= # none
.include "../../lang/python/egg.mk"
.include "../../mk/bsd.pkg.mk"
@comment $NetBSD: PLIST,v 1.1 2017/12/31 18:47:08 adam Exp $
${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
${PYSITELIB}/${EGG_INFODIR}/top_level.txt
${PYSITELIB}/deprecation.py
${PYSITELIB}/deprecation.pyc
${PYSITELIB}/deprecation.pyo
$NetBSD: distinfo,v 1.1 2017/12/31 18:47:08 adam Exp $
SHA1 (deprecation-1.0.1.tar.gz) = 54e669246915e6b24abd1f5c55767dea62b84cb2
RMD160 (deprecation-1.0.1.tar.gz) = 1085136c3468139081a0404d77af85072f58e968
SHA512 (deprecation-1.0.1.tar.gz) = fc35e6516e1617e2baad598a91e5d83ca95ab8a2d6a2753751d6752675de93cb44210109450a2aad9eb52b3c772a8b753c1d42ab2356c6663d2a03c4f779f086
Size (deprecation-1.0.1.tar.gz) = 9596 bytes