distutils and decorators

Robert Brewer fumanchu at amor.org
Thu Sep 22 02:00:01 CEST 2005

I wrote:
> We're trying to get CherryPy 2.1 RC 1 out the door, but setup.py is
> giving us some problems. 
> In our test suite, we want to test a decorator
> that we provide. Of course, decorators won't work in Python 2.3

and Benji York replied:
> More accurately, the special "@" decorator syntax doesn't work in 2.3.
> I would propose that you *do not* want to test the syntax (that's what
> the Python test suite is for), but instead test the functionality of the
> decorator.  Therefore I'd switch to 2.3 compatible syntax instead.

Actually, in this case we most definitely want to test 2.4's "@" syntax. The decorator in question is an aliaser, and therefore is one of the few decorators which must be implemented differently for the 2.3-style decoration and the 2.4-style. See the "expose" function at: http://www.cherrypy.org/file/trunk/cherrypy/__init__.py?rev=654

Robert Brewer
System Architect
Amor Ministries
fumanchu at amor.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20050921/eca80fcf/attachment.html>

More information about the Python-list mailing list