Closes #22565: fix argument types of PyErr_WarnEx.
merge with 3.4
Document builtin classes as such, not functions.
merge with 3.4