Merge 3.2
diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py
index 0b95aaa..c66082e 100755
--- a/Parser/asdl_c.py
+++ b/Parser/asdl_c.py
@@ -807,7 +807,7 @@
 
 static int obj2ast_string(PyObject* obj, PyObject** out, PyArena* arena)
 {
-    if (!PyUnicode_CheckExact(obj)) {
+    if (!PyUnicode_CheckExact(obj) && !PyBytes_CheckExact(obj)) {
         PyErr_SetString(PyExc_TypeError, "AST string must be of type str");
         return 1;
     }
diff --git a/Python/Python-ast.c b/Python/Python-ast.c
index f6e345c..ff79757 100644
--- a/Python/Python-ast.c
+++ b/Python/Python-ast.c
@@ -604,7 +604,7 @@
 
 static int obj2ast_string(PyObject* obj, PyObject** out, PyArena* arena)
 {
-    if (!PyUnicode_CheckExact(obj)) {
+    if (!PyUnicode_CheckExact(obj) && !PyBytes_CheckExact(obj)) {
         PyErr_SetString(PyExc_TypeError, "AST string must be of type str");
         return 1;
     }