[2.7] bpo-27945: Fixed various segfaults with dict. (GH-1657) (#1681)

Based on patches by Duane Griffin and Tim Mitchell.
(cherry picked from commit 753bca3934a7618a4fa96e107ad1c5c18633a683)
diff --git a/Misc/ACKS b/Misc/ACKS
index 01bcd3b..10b5d7c 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -500,6 +500,7 @@
 Tim Graham
 Nathaniel Gray
 Eddy De Greef
+Duane Griffin
 Grant Griffin
 Andrea Griffini
 Duncan Grisby
diff --git a/Misc/NEWS b/Misc/NEWS
index ebe9d2c..254bb52 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,10 @@
 Core and Builtins
 -----------------
 
+- bpo-27945: Fixed various segfaults with dict when input collections are
+  mutated during searching, inserting or comparing.  Based on patches by
+  Duane Griffin and Tim Mitchell.
+
 - bpo-25794: Fixed type.__setattr__() and type.__delattr__() for
   non-interned or unicode attribute names.  Based on patch by Eryk Sun.