summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichele Simionato <michele.simionato@gmail.com>2019-01-24 14:31:37 +0100
committerMichele Simionato <michele.simionato@gmail.com>2019-01-24 14:31:37 +0100
commitfe8fb7862a0c7a03b450055d0ace2bc4840a7fbd (patch)
treeec0ff5a3a590df1fd8a7c5adfd07459800689919
parent83c87eaf61ab6ef2fa06fc90fba490826de999eb (diff)
parentdf6de43dfc7b369840d7a8bb908e9823a98dc6dc (diff)
downloadpython-decorator-git-fe8fb7862a0c7a03b450055d0ace2bc4840a7fbd.tar.gz
Merge branch 'master' of github.com:micheles/decorator
-rw-r--r--.travis.yml20
-rw-r--r--README.rst8
2 files changed, 16 insertions, 12 deletions
diff --git a/.travis.yml b/.travis.yml
index 1047353..377c5fb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,14 +2,18 @@ sudo: false
language: python
-python:
- - "2.6"
- - "2.7"
- - "3.2"
- - "3.3"
- - "3.4"
- - "3.5"
- - "3.6"
+matrix:
+ include:
+ - python: 2.6
+ - python: 2.7
+ - python: 3.2
+ - python: 3.3
+ - python: 3.4
+ - python: 3.5
+ - python: 3.6
+ - python: 3.7
+ dist: xenial
+ sudo: true
install:
- python setup.py install
diff --git a/README.rst b/README.rst
index cf0f6ee..c0a852a 100644
--- a/README.rst
+++ b/README.rst
@@ -3,7 +3,7 @@ Decorator module
:Author: Michele Simionato
:E-mail: michele.simionato@gmail.com
-:Requires: Python from 2.6 to 3.6
+:Requires: Python from 2.6 to 3.7
:Download page: http://pypi.python.org/pypi/decorator
:Installation: ``pip install decorator``
:License: BSD license
@@ -68,7 +68,7 @@ operations:
.. code-block:: python
from decorator import decorator
-
+
@decorator
def warn_slow(func, timelimit=60, *args, **kw):
t0 = time.time()
@@ -79,11 +79,11 @@ operations:
else:
logging.info('%s took %d seconds', func.__name__, dt)
return result
-
+
@warn_slow # warn if it takes more than 1 minute
def preprocess_input_files(inputdir, tempdir):
...
-
+
@warn_slow(timelimit=600) # warn if it takes more than 10 minutes
def run_calculation(tempdir, outdir):
...