PyObject not PyType (closes #18494)
merge 3.4 (#18494)