[Python-checkins] bpo-36434: Properly handle writing errors in ZIP files. (GH-12559) (GH-12628)