]> granicus.if.org Git - python/commitdiff
Patch #1112812: Make bsddb/__init__.py more friendly for modulefinder.
authorMartin v. Löwis <martin@v.loewis.de>
Thu, 3 Mar 2005 09:46:07 +0000 (09:46 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Thu, 3 Mar 2005 09:46:07 +0000 (09:46 +0000)
Backported to 2.4.

Lib/bsddb/__init__.py
Misc/NEWS

index 3ee34416ddbe32f51beff115ce2de04a2cfcb2f2..0fc18928e1aadc8a67b8455a3968d19e753b65e5 100644 (file)
@@ -65,9 +65,9 @@ import sys, os
 # iterator interface is dynamically defined and added using a mixin
 # class.  old python can't tokenize it due to the yield keyword.
 if sys.version >= '2.3':
+    import UserDict
+    from weakref import ref
     exec """
-import UserDict
-from weakref import ref
 class _iter_mixin(UserDict.DictMixin):
     def _make_iter_cursor(self):
         cur = self.db.cursor()
index 92fb253218751226a3878cbfd87d394630aa67e2..a313d6e64df786dd537fe143b8a5cc852bef34b5 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -61,6 +61,8 @@ Extension Modules
 Library
 -------
 
+- Patch #1112812: Make bsddb/__init__.py more friendly for modulefinder.
+
 - Patch #1110248: SYNC_FLUSH the zlib buffer for GZipFile.flush.
 
 - Patch #1107973: Allow to iterate over the lines of a tarfile.ExFileObject.