Add py-deprecation 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:
- 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.
- 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.

WWW: https://pypi.python.org/pypi/deprecation
WWW: https://github.com/briancurtin/deprecation
This commit is contained in:
Sunpoet Po-Chuan Hsieh 2017-12-25 13:53:21 +00:00
parent 33f6cf74a8
commit 7099a90297
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=457227
4 changed files with 39 additions and 0 deletions

View File

@ -4374,6 +4374,7 @@
SUBDIR += py-delfick_error
SUBDIR += py-deliciousapi
SUBDIR += py-demjson
SUBDIR += py-deprecation
SUBDIR += py-dexml
SUBDIR += py-dialog
SUBDIR += py-diazo

View File

@ -0,0 +1,20 @@
# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
# $FreeBSD$
PORTNAME= deprecation
PORTVERSION= 1.0.1
CATEGORIES= devel python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Library to handle automated deprecations
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE
NO_ARCH= yes
USE_PYTHON= autoplist distutils
USES= python
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
TIMESTAMP = 1514205418
SHA256 (deprecation-1.0.1.tar.gz) = b9bff5cc91f601ef2a8a0200bc6cde3f18a48c2ed3d1ecbfc16076b14b3ad935
SIZE (deprecation-1.0.1.tar.gz) = 9596

View File

@ -0,0 +1,15 @@
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:
- 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.
- 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.
WWW: https://pypi.python.org/pypi/deprecation
WWW: https://github.com/briancurtin/deprecation