prune unused exceptions imports for Python 3