fix build without Py_DEBUG and DNDEBUG (closes #14509)
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 2ec878f..341114f 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -7341,7 +7341,9 @@
     Py_UNICODE *p;
     long x;
 
+#ifdef Py_DEBUG
     assert(_Py_HashSecret_Initialized);
+#endif
     if (self->hash != -1)
         return self->hash;
     len = Py_SIZE(self);