Skip to content
Browse files

Let's not strive for Py 2.6 compatibility

  • Loading branch information...
1 parent 3d5b78c commit 78941fd535152d614f8049d4095f65a77724f3a2 @strohel committed Jul 26, 2013
Showing with 1 addition and 35 deletions.
  1. +0 −1 .travis.yml
  2. +1 −1 README.rst
  3. +0 −33 pybayes/stresses/support.py
View
1 .travis.yml
@@ -1,7 +1,6 @@
language: python
python:
- - 2.6
- 2.7
- 3.2
- 3.3
View
2 README.rst
@@ -11,7 +11,7 @@ Kalman filter, particle filter and marginalized particle filter, all built atop
a light framework of probability density functions. PyBayes can optionally use Cython
for large speed gains (Cython build can be several times faster in some situations).
-PyBayes is tested with Python 2.7 and 3.2 (using 2to3). Future plans include
+PyBayes is tested with Python 2.7, 3.2 and 3.3 (using 2to3). Future plans include
more specialised variants of Kalman/particle filters and speed optimisations.
PyBayes is being developed by Matěj Laitl, feel free to send me a mail to matej at laitl dot cz.
View
33 pybayes/stresses/support.py
@@ -8,11 +8,6 @@
import functools
import time
-# Python 2.6 compatibility
-try:
- from unittest import skip, skipIf, skipUnless
-except ImportError:
- skip = None
class Timer(object):
@@ -40,31 +35,3 @@ def wrapper(self):
func(self, timer)
print "{0}(): {1}".format(func.__name__, timer)
return wrapper
-
-
-if skip is None:
- def skip(reason):
- """Implementation of the @skip decorator from Python 2.7 for Python 2.6"""
- def decorator(func):
- @functools.wraps(func)
- def wrapper(*args, **kwargs):
- pass
- origdoc = wrapper.__doc__ or wrapper.__name__
- wrapper.__doc__ = wrapper.__name__ + " [skipped '{0}']".format(reason)
- return wrapper
- return decorator
-
- def _id(obj):
- return obj
-
- def skipIf(condition, reason):
- """Implementation of the @skipIf decorator from Python 2.7 for Python 2.6"""
- if condition:
- return skip(reason)
- return _id
-
- def skipUnless(condition, reason):
- """Implementation of the @skipUnless decorator from Python 2.7 for Python 2.6"""
- if not condition:
- return skip(reason)
- return _id

0 comments on commit 78941fd

Please sign in to comment.
Something went wrong with that request. Please try again.