bpo-41817: use new StrEnum to ensure all members are strings (GH-22348)

* use new StrEnum to ensure all members are strings
2 files changed