https://github.com/archlinux/svntogit-community/blob/b103146beee8b7c70d04685033a8536aed2e5aea/trunk/002-python310.patch
https://github.com/archlinux/svntogit-community/blob/b103146beee8b7c70d04685033a8536aed2e5aea/trunk/003-pyunicode.patch

https://www.virtualbox.org/changeset/90537/vbox
https://www.virtualbox.org/changeset/86623/vbox
--- a/src/libs/xpcom18a4/python/src/PyXPCOM.h
+++ b/src/libs/xpcom18a4/python/src/PyXPCOM.h
@@ -137,7 +137,7 @@
 #  define PyInt_Check(o) PyLong_Check(o)
 #  define PyInt_AsLong(o) PyLong_AsLong(o)
 #  define PyNumber_Int(o) PyNumber_Long(o)
-#  if PY_VERSION_HEX <= 0x03030000 /* 3.3 added PyUnicode_AsUTF8AndSize */
+#  if !defined(Py_LIMITED_API) && PY_VERSION_HEX <= 0x03030000 /* 3.3 added PyUnicode_AsUTF8AndSize */
 #   ifndef PyUnicode_AsUTF8
 #    define PyUnicode_AsUTF8(o) _PyUnicode_AsString(o)
 #   endif
