Fox for SF bug #123859: %[duxXo] long formats inconsistent.
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index b31675b..a297cac 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -5020,9 +5020,7 @@
 	    case 'X':
 		if (c == 'i')
 		    c = 'd';
-		if (PyLong_Check(v) && PyLong_AsLong(v) == -1
-		    && PyErr_Occurred()) {
-		    PyErr_Clear();
+		if (PyLong_Check(v)) {
 		    temp = formatlong(v, flags, prec, c);
 		    if (!temp)
 			goto onError;