From 9aafe89a19e2ed4681c4036c337b9ef5a8c5b084 Mon Sep 17 00:00:00 2001 From: martinholmer Date: Wed, 14 Mar 2018 14:34:25 -0400 Subject: [PATCH] Add Python27 sunset message to Calculator constructor --- taxcalc/calculate.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/taxcalc/calculate.py b/taxcalc/calculate.py index bf987b2c2..988ef6b0b 100644 --- a/taxcalc/calculate.py +++ b/taxcalc/calculate.py @@ -8,6 +8,7 @@ # pylint: disable=invalid-name,no-value-for-parameter,too-many-lines import os +import sys import json import re import copy @@ -146,6 +147,11 @@ def __init__(self, policy=None, records=None, verbose=True, print('Tax-Calculator startup automatically ' + 'extrapolated your data to ' + str(self.__records.current_year) + '.') + if verbose and sys.version_info.major == 2: # running Python 2.7 + print('WARNING: Tax-Calculator packages for Python 2.7 will') + print(' no longer be provided beginning in 2019') + print(' because Pandas is stopping development for 2.7.') + print('SOLUTION: upgrade to Python 3.6 now.') assert self.__policy.current_year == self.__records.current_year self.__stored_records = None