Issue 50337 - Replace exec() with setattr()
Description: _constants.py uses exec() a lot to define module
global variables. That's rather slow and not very elegant.
Get the current module object with sys.modules[__name__] and
then use setattr() instead.
https://pagure.io/389-ds-base/issue/50337
Reviewed by: mreynolds (Thanks!)