Thanks,  I've updated the PR.
I added migration instructions to the news file (which Pablo can copy into what's new once it's committed).

Also added a Py_DEPRECATED(3.11) typedef which is used in the macro.
It remains the decide how to backport the compiler warning to older versions, and to which versions.

On Tue, Aug 17, 2021 at 5:18 PM Victor Stinner <> wrote:
If the macro is deprecated, please provide an detailed explanation how
to port existing C code to the new C API, in What's New In Python 3.X
(version where the macro is deprecated, Python 3.11 if I understood