Remove resource warnings under Python 3.