This is my patch #876198 plus a NEWS entry and a header frob.
Remove the ability to use (from C) arbitrary objects supporting the
read buffer interface as the co_code member of code objects.
diff --git a/Misc/NEWS b/Misc/NEWS
index 45068ad..d9778a3 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,10 @@
Core and builtins
-----------------
+- Support for arbitrary objects supporting the read-only buffer
+ interface as the co_code field of code objects (something that was
+ only possible to create from C code) has been removed.
+
- Made omitted callback and None equivalent for weakref.ref() and
weakref.proxy(); the None case wasn't handled correctly in all
cases.