Fixed bugs related to python3
This PR fixes a few bugs thrown up by the minimal python3 test suite, either in the tests themselves, or in the package code. The minimal python3 test suite should now pass.
This PR fixes a few bugs thrown up by the minimal python3 test suite, either in the tests themselves, or in the package code. The minimal python3 test suite should now pass.