Train release of OpenStack is intended to support compatability
with python2.7 and we inadvertently broke it earlier.
Due to a broken gate, we created a change which removed the py27
jobs, bandit, and lower constraints checking due to multiple
gates failing all at once. Ide0f6c38a59ae6486fa33cfb19b383d022e57d5a
The removal of the py27 change was due to Bandit 1.7.0 which
dropped py2 support. We should have restricted Bandit in our
test-requirements.txt at that time.
As such, this commit addresses that, plus python3 only exception
names which slipped in on a backport breaking py27 compatability.