Remove uses of universal newlines mode; fix logger.warn -> logger.warning