This patch fixes all deprecation warnings that are present as of Python 3.7.0, including the ones from #4.