--- siplib/siplib.c.orig
+++ siplib/siplib.c
@@ -13073,7 +13073,7 @@
     name_str = _PyUnicode_AsString(name);
 #else
     /* We don't handle Unicode names. */
-    if (!PyStringCheck(name))
+    if (!PyString_Check(name))
     {
         PyErr_Format(PyExc_TypeError,
                 "attribute name must be string, not '%.200s'",
