Index: pyo3/src/conversions/either.rs
===================================================================
--- pyo3.orig/src/conversions/either.rs
+++ pyo3/src/conversions/either.rs
@@ -93,15 +93,10 @@ where
         } else if let Ok(r) = obj.extract::<R>() {
             Ok(Either::Right(r))
         } else {
-            let err_msg = format!("failed to convert the value to '{}'", Self::type_input());
+            let err_msg = format!("failed to convert the value");
             Err(PyTypeError::new_err(err_msg))
         }
     }
-
-    #[cfg(feature = "experimental-inspect")]
-    fn type_input() -> TypeInfo {
-        TypeInfo::union_of(&[L::type_input(), R::type_input()])
-    }
 }
 
 #[cfg(test)]
@@ -133,7 +128,7 @@ mod tests {
             assert!(err.is_instance_of::<PyTypeError>(py));
             assert_eq!(
                 err.to_string(),
-                "TypeError: failed to convert the value to 'Union[int, float]'"
+                "TypeError: failed to convert the value"
             );
 
             let obj_i = 42.to_object(py);
