Backported the optimization of compiling charsets in regular expressions
(issue #19329).  This is needed to apply the patch from issue #17381.
diff --git a/Misc/NEWS b/Misc/NEWS
index 725c0ab..ce0ed51 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -37,6 +37,8 @@
 Library
 -------
 
+- Issue #19329: Optimized compiling charsets in regular expressions.
+
 - Issue #22410: Module level functions in the re module now cache compiled
   locale-dependent regular expressions taking into account the locale.