PyString_AsString is permissive and accepts unicode strings.

Replace it with PyUnicode_AsString when the argument is known to be a str.
diff --git a/Python/ast.c b/Python/ast.c
index 2a5d8b8..f3a2828 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -1299,7 +1299,7 @@
                 if (errstr) {
                     char *s = "";
                     char buf[128];
-                    s = PyString_AsString(errstr);
+                    s = PyUnicode_AsString(errstr);
                     PyOS_snprintf(buf, sizeof(buf), "(unicode error) %s", s);
                     ast_error(n, buf);
                 } else {