diff --git a/.travis.yml b/.travis.yml index 9366d423..33193a3b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: python python: - "2.7" - - "3.3" - "3.4" - "3.5" - "3.6" diff --git a/agate/table/print_table.py b/agate/table/print_table.py index 4b290742..13cd2b41 100644 --- a/agate/table/print_table.py +++ b/agate/table/print_table.py @@ -1,6 +1,7 @@ #!/usr/bin/env python # pylint: disable=W0212 +import math import sys from babel.numbers import format_decimal @@ -95,7 +96,7 @@ def print_table(self, max_rows=20, max_columns=6, output=sys.stdout, max_column_ v = ellipsis elif v is None: v = '' - elif number_formatters[j] is not None: + elif number_formatters[j] is not None and not math.isinf(v): v = format_decimal( v, format=number_formatters[j], diff --git a/agate/utils.py b/agate/utils.py index cb22acea..ad924214 100644 --- a/agate/utils.py +++ b/agate/utils.py @@ -133,7 +133,7 @@ def max_precision(values): precision = getcontext().prec for value in values: - if value is None or math.isnan(value): + if value is None or math.isnan(value) or math.isinf(value): continue sign, digits, exponent = value.normalize().as_tuple() diff --git a/docs/install.rst b/docs/install.rst index f30feb73..04d42531 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -45,7 +45,7 @@ Supported platforms agate supports the following versions of Python: * Python 2.7 -* Python 3.3+ +* Python 3.4+ * `PyPy `_ versions >= 4.0.0 It is tested primarily on OSX, but due to its minimal dependencies it should work perfectly on both Linux and Windows. diff --git a/setup.py b/setup.py index b0e79d30..71e02db2 100644 --- a/setup.py +++ b/setup.py @@ -33,7 +33,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6',