Replace uses of exec() in module loader
authorJeremy Stanley <fungi@yuggoth.org>
Sun, 22 Dec 2019 20:48:12 +0000 (20:48 +0000)
committerJeremy Stanley <fungi@yuggoth.org>
Sat, 28 Dec 2019 20:40:07 +0000 (20:40 +0000)
Improve the module loader to avoid the more dangerous exec()
function in favor of smarter use of importlib. This allows us to
drop some flake8 whitelisting. Also switch out the hard-coded module
list (which missed addition of the daemon module) with a more
dynamic routine on Python 3.7 and later, which will use all *.py
files in the top level of the package so none are forgotten in the
future. Keep a hard-coded fallback list for support of earlier
Python versions, but compare the two so this list is guaranteed
complete for as long as it is maintained.


No differences found