Serhiy Storchaka added the comment:
This isn't a bug in CPython API. You need to pass arguments of correct type to
functions with a variable number of parameters. The compiler doesn't know what
type is expected and can't coerce the value automatically. The same
Change by Dan Snider :
--
title: Py_Build value is causing crashes with the "L" and "K" format characters
when upcasting sub 64-bit integer types -> Py_BuildValue is causing crashes
with the "L" and "K" format characters when upcasting sub 64-bit integer