Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Jun 2009 15:39:35 GMT
From:      Wen Heping <wenheping@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/136094: [NEW PORT]devel/py-prioritized_methods:An extension to PEAK-Rules to prioritize methods
Message-ID:  <200906271539.n5RFdZuJ064584@www.freebsd.org>
Resent-Message-ID: <200906271540.n5RFe0c0088332@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         136094
>Category:       ports
>Synopsis:       [NEW PORT]devel/py-prioritized_methods:An extension to PEAK-Rules to prioritize methods
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 27 15:40:00 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Wen Heping
>Release:        FreeBSD 8.0-CURRENT
>Organization:
ChangAn Middle School
>Environment:
FreeBSD fb8.wenjing.com 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Sun Mar 22 22:12:06 CST 2009     root@fb8.wenjing.com:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
py-rioritized_methods is an extension to PEAK-Rules to prioritize
methods in order to to avoid AmbiguousMethods situations.This module
provides four decorators:
    prioritized_when
    prioritized_around
    prioritized_before
    prioritized_after

These behave like their peak.rules counterparts except that they accept
an optional prio argument which can be used to provide a comparable
object (usually an integer) that will be used to disambiguate situations
in which more than rule applies to the given arguments and no rule is
more specific than another. That is, situations in which an
peak.rules.AmbiguousMethods would have been raised.

This is useful for libraries which want to be extensible via generic
functions but want their users to easily override a method without
figuring out how to write a more specific rule or when it is not
feasible.

WWW:    http://pypi.python.org/pypi/prioritized_methods/

(It require:  http://www.freebsd.org/cgi/query-pr.cgi?pr=135965
and it is prepared for tg2)
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	py-prioritized_methods
#	py-prioritized_methods/Makefile
#	py-prioritized_methods/distinfo
#	py-prioritized_methods/pkg-descr
#
echo c - py-prioritized_methods
mkdir -p py-prioritized_methods > /dev/null 2>&1
echo x - py-prioritized_methods/Makefile
sed 's/^X//' >py-prioritized_methods/Makefile << 'f2e6c4c8279070ecd39235ceacaa05f4'
X# New ports collection makefile for:	py-prioritized_methods
X# Date created:		23 June, 2009
X# Whom:			Wen Heping <wenheping@gmail.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	prioritized_methods
XPORTVERSION=	0.2.1
XCATEGORIES=	devel python
XMASTER_SITES=	CHEESESHOP
XPKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
X
XMAINTAINER=	wenheping@gmail.com
XCOMMENT=	An extension to PEAK-Rules to prioritize methods
X
XBUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}PEAK-Rules>=0.5:${PORTSDIR}/devel/py-PEAK-Rules
XRUN_DEPENDS=	${BUILD_DEPENDS}
X
XPLIST_FILES=	%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%
X
XUSE_PYTHON=	yes
XUSE_PYDISTUTILS=	easy_install
X
X.include <bsd.port.mk>
f2e6c4c8279070ecd39235ceacaa05f4
echo x - py-prioritized_methods/distinfo
sed 's/^X//' >py-prioritized_methods/distinfo << '49572b0a8fa5c5ae20741337dd8f7030'
XMD5 (prioritized_methods-0.2.1.tar.gz) = 1e9d9de02291b0fc27942b48c170ddc3
XSHA256 (prioritized_methods-0.2.1.tar.gz) = 931da40e1ba53c6d35312371b3c84573f1a5297a0ee6a78584a2337d0180b63c
XSIZE (prioritized_methods-0.2.1.tar.gz) = 4684
49572b0a8fa5c5ae20741337dd8f7030
echo x - py-prioritized_methods/pkg-descr
sed 's/^X//' >py-prioritized_methods/pkg-descr << '3045e358db7f2d8f166ea0f3a57de8d2'
Xpy-rioritized_methods is an extension to PEAK-Rules to prioritize
Xmethods in order to to avoid AmbiguousMethods situations.This module
Xprovides four decorators:
X    prioritized_when
X    prioritized_around
X    prioritized_before
X    prioritized_after
X
XThese behave like their peak.rules counterparts except that they accept
Xan optional prio argument which can be used to provide a comparable
Xobject (usually an integer) that will be used to disambiguate situations
Xin which more than rule applies to the given arguments and no rule is
Xmore specific than another. That is, situations in which an
Xpeak.rules.AmbiguousMethods would have been raised.
X
XThis is useful for libraries which want to be extensible via generic
Xfunctions but want their users to easily override a method without
Xfiguring out how to write a more specific rule or when it is not
Xfeasible.
X
XWWW:	http://pypi.python.org/pypi/prioritized_methods/
3045e358db7f2d8f166ea0f3a57de8d2
exit



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906271539.n5RFdZuJ064584>