gst-python: gstmodule.c: fix build with 3.11

https://docs.python.org/fr/3.10/whatsnew/3.10.html

Part-of: <gstreamer/gstreamer!1639>
19 jobs for !1639 with fix-python-3-11-build in 35 minutes and 1 second (queued for 10 seconds)
latest merge request