Close #17702: os.environ now raises KeyError with the original environment
variable name (str on UNIX), instead of using the encoded name (bytes on UNIX).
Issue #17702: use assertRaises() for the unit test
Issue #17221: Resort Misc/NEWS.
#17341: Include name in re error message about invalid group name.

Patch by Jason Michalski.
Close #17731: Clean up properly in test_import
Issue #17728: Specify default precision for float.format for presentation types e, f, and g.