Fix the tests for Python 3
Merge branch 'master' into no_calendar_date