#27364: Deprecate invalid escape strings in str/byutes.

Patch by Emanuel Barry, reviewed by Serhiy Storchaka and Martin Panter.
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 7979eec..e0c3bfe 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -6065,6 +6065,9 @@
             goto error;
 
         default:
+            if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
+                                 "invalid escape sequence '\\%c'", c) < 0)
+                goto onError;
             WRITE_ASCII_CHAR('\\');
             WRITE_CHAR(c);
             continue;