Skip to content

Commit

Permalink
Merge pull request #1923 from martinholmer/python27-sunset
Browse files Browse the repository at this point in the history
Add Python 2.7 sunset message to Calculator constructor
  • Loading branch information
MattHJensen authored Mar 16, 2018
2 parents 32c4e9e + 9aafe89 commit fa0d040
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions taxcalc/calculate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit fa0d040

Please sign in to comment.