This PR is motivated by the desire to drop python-fedora usage as we want to get rid of that library, but there were various logical follow-ons from that. It is only currently used to handle an error that may be raised by version of bodhi-client before 6.0.0, but bodhi-client 6.0.0 is the oldest version that can possibly authenticate against production Bodhi any more, so there is not really any point supporting older bodhi-client any more.
Beyond that: we drop py36 from the tox envs, because that env only has bodhi-client 5.x so we can't really test against it any more. I did try not to actually remove any 3.6 compatibility, though, in case someone wants to try and make bodhi-client 6.x work with Python 3.6 for EL 8 (I don't particularly). We drop all use of six, because we don't need Python 2.x compat any more. We replace the deprecated use of linux_distribution to try and guess the appropriate runtime environment (disttag) with use of distro instead, which I verified exists back to EL 8. The new code should be somewhat better than the old but cannot cover all possibilities. We update the unittest imports to get rid of unittest2 usage and contingencies for unittest not existing, which were all only of use on Python 2.x or early 3.x. And we update the Bodhi version check in cli.py to check for >= 6.0.0. It will no longer smoothly handle the exception which is (apparently) raised if you somehow contrive to have < 2.0, but I don't think we need to worry about that any more.
This PR is motivated by the desire to drop python-fedora usage as we want to get rid of that library, but there were various logical follow-ons from that. It is only currently used to handle an error that may be raised by version of bodhi-client before 6.0.0, but bodhi-client 6.0.0 is the oldest version that can possibly authenticate against production Bodhi any more, so there is not really any point supporting older bodhi-client any more.
Beyond that: we drop py36 from the tox envs, because that env only has bodhi-client 5.x so we can't really test against it any more. I did try not to actually remove any 3.6 compatibility, though, in case someone wants to try and make bodhi-client 6.x work with Python 3.6 for EL 8 (I don't particularly). We drop all use of six, because we don't need Python 2.x compat any more. We replace the deprecated use of linux_distribution to try and guess the appropriate runtime environment (disttag) with use of
distroinstead, which I verified exists back to EL 8. The new code should be somewhat better than the old but cannot cover all possibilities. We update the unittest imports to get rid ofunittest2usage and contingencies forunittestnot existing, which were all only of use on Python 2.x or early 3.x. And we update the Bodhi version check in cli.py to check for >= 6.0.0. It will no longer smoothly handle the exception which is (apparently) raised if you somehow contrive to have < 2.0, but I don't think we need to worry about that any more.