Eliminate deprecation warning on py3