Fix py3 compat

This commit is contained in:
Konsta Vesterinen
2014-01-14 12:03:27 +02:00
parent 1880ba1b24
commit 95cec3a10a

View File

@@ -3,6 +3,7 @@ try:
import intervals
except ImportError:
pass
import six
import sqlalchemy as sa
from sqlalchemy import types
from ..exceptions import ImproperlyConfigured
@@ -50,9 +51,7 @@ class RangeComparator(types.TypeEngine.Comparator):
self.type.interval_class.type,
tuple,
list,
str,
unicode
)
) + six.string_types
if isinstance(other, coerced_types):
other = self.type.interval_class(other)
@@ -122,7 +121,7 @@ class IntRangeType(RangeType):
"""
IntRangeType provides way for saving range of numbers into database.
Example ::
Example::
from sqlalchemy_utils import IntRangeType
@@ -146,8 +145,7 @@ class IntRangeType(RangeType):
IntRangeType returns the values as IntInterval objects. These objects
support many arithmetic operators:
::
support many arithmetic operators::
meeting = Event(name=u'meeting')