1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
3 NAMEBASE= python-decorator
7 SDESC[py310]= Decorators for Humans (3.10)
8 SDESC[py311]= Decorators for Humans (3.11)
9 HOMEPAGE= https://github.com/micheles/decorator
10 CONTACT= Python_Automaton[python@ironwolf.systems]
13 SITES[main]= PYPIWHL/d5/50/83c593b07763e1161326b3b8c6686f0f4b0f24d5526546bee538c89837d6
14 DISTFILE[1]= decorator-5.1.1-py3-none-any.whl:main
19 OPTIONS_AVAILABLE= PY310 PY311
20 OPTIONS_STANDARD= none
21 VOPTS[py310]= PY310=ON PY311=OFF
22 VOPTS[py311]= PY310=OFF PY311=ON
24 DISTNAME= decorator-5.1.1.dist-info
28 [PY310].USES_ON= python:py310,wheel
30 [PY311].USES_ON= python:py311,wheel
32 [FILE:2905:descriptions/desc.single]
36 The goal of the decorator module is to make it easy to define
37 signature-preserving function decorators and decorator factories.
38 It also includes an implementation of multiple dispatch and other niceties
39 (please check the docs). It is released under a two-clauses
40 BSD license, i.e. basically you can do whatever you want with it but I am
47 If you are lazy, just perform
49 ``$ pip install decorator``
51 which will install just the module on your system.
53 If you prefer to install the full distribution from source, including
54 the documentation, clone the `GitHub repo`_ or download the tarball_,
59 in the main directory, possibly as superuser.
61 .. _tarball: https://pypi.org/project/decorator/#files
62 .. _GitHub repo: https://github.com/micheles/decorator
67 If you have the source code installation you can run the tests with
69 `$ python src/tests/test.py -v`
71 or (if you have setuptools installed)
73 `$ python setup.py test`
75 Notice that you may run into trouble if in your system there
76 is an older version of the decorator module; in such a case remove the
77 old version. It is safe even to copy the module `decorator.py` over
78 an existing one, since we kept backward-compatibility for a long time.
83 The project is hosted on GitHub. You can look at the source here:
85 https://github.com/micheles/decorator
90 The documentation has been moved to
91 https://github.com/micheles/decorator/blob/master/docs/documentation.md
93 From there you can get a PDF version by simply using the print
94 functionality of your browser.
96 Here is the documentation for previous versions of the module:
98 https://github.com/micheles/decorator/blob/4.3.2/docs/tests.documentation.rst
99 https://github.com/micheles/decorator/blob/4.2.1/docs/tests.documentation.rst
100 https://github.com/micheles/decorator/blob/4.1.2/docs/tests.documentation.rst
101 https://github.com/micheles/decorator/blob/4.0.0/documentation.rst
102 https://github.com/micheles/decorator/blob/3.4.2/documentation.rst
107 Here is an example of how to define a family of decorators tracing slow
110 .. code-block:: python
112 from decorator import decorator
115 def warn_slow(func, timelimit=60, *args, **kw):
117 result = func(*args, **kw)
118 dt = time.time() - t0
120 logging.warn('%s took %d seconds', func.__name__, dt)
122 logging.info('%s took %d seconds', func.__name__, dt)
125 @warn_slow # warn if it takes more than 1 minute
126 def preprocess_input_files(inputdir, tempdir):
129 @warn_slow(timelimit=600) # warn if it takes more than 10 minutes
130 def run_calculation(tempdir, outdir):
136 b8c3f85900b9dc423225913c5aace94729fe1fa9763b38939a95226f02d37186 9073 decorator-5.1.1-py3-none-any.whl