The short answer: Python3 str.format() specification has dropped the support for "i" (%i or {:i}). It only uses "d" (%d or {:d}) for specifiying integers. Therefore, you can simply use {:d} for all integers.
The long answer: For output, i.e. for printf or logging, %i and %d are actually same thing, both in Python and in C. There is a difference but only when you use them to parse input, like with scanf(). For scanf, %d and %i actually both mean signed integer but %i inteprets the input as a hexadecimal number if preceded by 0x and octal if preceded by 0 and otherwise interprets the input as decimal. Therefore, for normal use, it is always better to use %d, unless you want to specify input as hexadecimal or octal.
For more details, please take a look at the format specification here:
https://docs.python.org/2/library/string.html#formatspec