[Python-3000-checkins] r59349 - python/branches/py3k/Lib/test/regrtest.py

christian.heimes python-3000-checkins at python.org
Wed Dec 5 13:45:56 CET 2007


Author: christian.heimes
Date: Wed Dec  5 13:45:55 2007
New Revision: 59349

Modified:
   python/branches/py3k/Lib/test/regrtest.py
Log:
Fixed two small problems in regrtest found by Amaury. This fixes issue #1539. Thanks Amaury!

Modified: python/branches/py3k/Lib/test/regrtest.py
==============================================================================
--- python/branches/py3k/Lib/test/regrtest.py	(original)
+++ python/branches/py3k/Lib/test/regrtest.py	Wed Dec  5 13:45:55 2007
@@ -701,7 +701,7 @@
     pic = sys.path_importer_cache.copy()
     abcs = {}
     for abc in [getattr(_abcoll, a) for a in _abcoll.__all__]:
-        if not isinstance(abc, _Abstract):
+        if not issubclass(abc, _Abstract):
             continue
         for obj in abc.__subclasses__() + [abc]:
             abcs[obj] = obj._abc_registry.copy()
@@ -743,6 +743,7 @@
     import struct, filecmp, _abcoll
     from abc import _Abstract
     from distutils.dir_util import _path_created
+    from weakref import WeakSet
 
     # Restore some original values.
     warnings.filters[:] = fs
@@ -756,7 +757,7 @@
         if not issubclass(abc, _Abstract):
             continue
         for obj in abc.__subclasses__() + [abc]:
-            obj._abc_registry = abcs.get(obj, {}).copy()
+            obj._abc_registry = abcs.get(obj, WeakSet()).copy()
             obj._abc_cache.clear()
             obj._abc_negative_cache.clear()
 


More information about the Python-3000-checkins mailing list