[3.9] bpo-36020: Remove snprintf macro in pyerrors.h (GH-20889) by miss-islington · Pull Request #20897 · python/cpython

@vstinner @miss-islington

On Windows, GH-include "pyerrors.h" no longer defines "snprintf" and
"vsnprintf" macros.

PyOS_snprintf() and PyOS_vsnprintf() should be used to get portable
behavior.

Replace snprintf() calls with PyOS_snprintf() and replace vsnprintf()
calls with PyOS_vsnprintf().
(cherry picked from commit e822e37)

Co-authored-by: Victor Stinner <vstinner@python.org>

vstinner