From 169ded0d6819f761def726deda19a35c91116674 Mon Sep 17 00:00:00 2001
From: Tim Peters <tim.peters@gmail.com>
Date: Sat, 3 Nov 2001 19:57:21 +0000
Subject: Finish SF patch 477059:  __del__ on new classes vs. GC. Just doc and
 NEWS here, about the change in gc.garbage meaning.

---
 Doc/lib/libgc.tex | 6 +++++-
 Misc/NEWS         | 5 +++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/Doc/lib/libgc.tex b/Doc/lib/libgc.tex
index cfd563c..589bcb1 100644
--- a/Doc/lib/libgc.tex
+++ b/Doc/lib/libgc.tex
@@ -83,7 +83,11 @@ The following variable is provided for read-only access:
 
 \begin{datadesc}{garbage}
 A list of objects which the collector found to be unreachable
-but could not be freed (uncollectable objects).  Objects that have
+but could not be freed (uncollectable objects).  By default, this list
+contains only objects with \method{__del__()} methods.\footnote{Prior to
+  Python 2.2, the list contained all instance objects in unreachable
+  cycles,  not only those with \method{__del__()} methods.}
+Objects that have
 \method{__del__()} methods and create part of a reference cycle cause
 the entire reference cycle to be uncollectable.  If
 \constant{DEBUG_SAVEALL} is set, then all unreachable objects will
diff --git a/Misc/NEWS b/Misc/NEWS
index 02c4928..c0f09ae 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -32,6 +32,11 @@ Core and builtins
 
 Extension modules
 
+- By default, the gc.garbage list now contains only those instances in
+  unreachable cycles that have __del__ methods; in 2.1 it contained all
+  instances in unreachable cycles.  "Instances" here has been generalized
+  to include instances of both new-style and old-style classes.
+
 - The socket module defines a new method for socket objects,
   sendall().  This is like send() but may make multiple calls to
   send() until all data has been sent.  Also, the socket function has
-- 
cgit v0.12