Update hacking for Python3

The repo is Python 3 now, so update hacking to version 3.0.1 which
supports Python 3.

Fix problems found.

Update local hacking checks for new flake8.

Switch to dnspython in requirements.
See also https://review.opendev.org/726353.

Co-Authored-By: Sean McGinnis <sean.mcginnis@gmail.com>
Depends-On: https://review.opendev.org/715682
Change-Id: I49a0ba49133f9592089d3829405847bf2ff8b425
5 files changed