The init function of the locale module fails to check for errors in a couple of places. The patch replaces PyDict_SetItemString() calls with PyModule_AddIntMacro() and error checks. An exception is unlikely so I'm OK when the patch just lands in 3.4 and 3.5. CID 1295027 (#8 of 8): Dereference null return value (NULL_RETURNS) dereference: Dereferencing a pointer that might be null x when calling PyDict_SetItemString