[Checkins] SVN: zc.catalog/trunk/ Try to import stemmer from zopyx.txng3.ext first, which as of 3.3.2 contains stability and memory leak fixes.

Patrick Strawderman patrick at zope.com
Tue Mar 9 11:47:00 EST 2010


Log message for revision 109873:
  Try to import stemmer from zopyx.txng3.ext first, which as of 3.3.2 contains stability and memory leak fixes.

Changed:
  U   zc.catalog/trunk/CHANGES.txt
  U   zc.catalog/trunk/src/zc/catalog/stemmer.py

-=-
Modified: zc.catalog/trunk/CHANGES.txt
===================================================================
--- zc.catalog/trunk/CHANGES.txt	2010-03-09 14:35:18 UTC (rev 109872)
+++ zc.catalog/trunk/CHANGES.txt	2010-03-09 16:46:55 UTC (rev 109873)
@@ -5,10 +5,11 @@
 The 1.2 line (and higher) supports Zope 3.4/ZODB 3.8.  The 1.1 line supports
 Zope 3.3/ZODB 3.7.
 
-1.4.3 (unreleased)
+1.4.3 (2010-03-09)
 ------------------
 
-- Nothing changed yet.
+* Try to import the stemmer from the zopyx.txng3.ext package first, which
+  as of 3.3.2 contains stability and memory leak fixes.
 
 
 1.4.2 (2010-01-20)

Modified: zc.catalog/trunk/src/zc/catalog/stemmer.py
===================================================================
--- zc.catalog/trunk/src/zc/catalog/stemmer.py	2010-03-09 14:35:18 UTC (rev 109872)
+++ zc.catalog/trunk/src/zc/catalog/stemmer.py	2010-03-09 16:46:55 UTC (rev 109873)
@@ -18,20 +18,25 @@
 import re
 broken = None
 try:
-    from zopyx.txng3 import stemmer
+    from zopyx.txng3.ext import stemmer
 except ImportError:
     try:
-        import txngstemmer as stemmer
+        from zopyx.txng3 import stemmer
     except ImportError:
-        stemmer = None
-        class Broken:
-            def stem(self, l):
-                return l
-        broken = Broken()
+        try:
+            import txngstemmer as stemmer
+        except ImportError:
+            stemmer = None
+            class Broken:
+                def stem(self, l):
+                    return l
+            broken = Broken()
 
 # as of this writing, trying to persist a txngstemmer.Stemmer makes the python
 # process end, only printing a "Bus error" message before quitting.  Don't do
 # that. July 16 2005
+# 2010-03-09 While Stemmer still isn't pickleable, zopyx.txng3.ext 3.3.2 fixes
+# the crashes.
 
 class Stemmer(object):
 



More information about the checkins mailing list