[3.7] bpo-33475: Fix and improve converting annotations to strings. (GH-6774). (GH-6927)
(cherry picked from commit 64fddc423fcbe90b8088446c63385ec0aaf3077c)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
diff --git a/Python/compile.c b/Python/compile.c
index 62d7886..c38a0d1 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -1705,7 +1705,7 @@
compiler_visit_annexpr(struct compiler *c, expr_ty annotation)
{
PyObject *ann_as_str;
- ann_as_str = _PyAST_ExprAsUnicode(annotation, 1);
+ ann_as_str = _PyAST_ExprAsUnicode(annotation);
if (!ann_as_str) {
return 0;
}