Fix regressions from removing Python 2 support
2 files changed