Re: [Zope] Announce: Confera 1.3.1 -> ZOPE 2.0.0 final com
Well, the subjects says it all:
http://www.mtg.co.at/projects/products/Confera/
Could people please download it and check if I didn't miss something?
Andreas
Looks good here! I guess this means I don't have to look into it after all ;) Nick Garcia | ngarcia@codeit.com CodeIt Computing | http://codeit.com
On Thu, 2 Sep 1999, Nick Garcia wrote:
Looks good here! I guess this means I don't have to look into it after all ;) Well, it doesn't look to well here.
Actually, the fix I've did, I understand, I've switched from the old regsub to the threadsafe regex module. Now this, I don't understand, it seems like the ts_regex.py is broken for gsub. The offending line in Confera.py is: body =split(ts_regex.gsub(crlf,'\n',body),'\n') Which seems to make quite sense to me. Traceback (innermost last): File /home/zopebot/redhat/BUILD/Zope-2.0.0-src/lib/python/ZPublisher/Publish.py, line 214, in publish_module File /home/zopebot/redhat/BUILD/Zope-2.0.0-src/lib/python/ZPublisher/Publish.py, line 179, in publish File /home/zopebot/redhat/BUILD/Zope-2.0.0-src/lib/python/Zope/__init__.py, line 201, in zpublisher_exception_hook File /home/zopebot/redhat/BUILD/Zope-2.0.0-src/lib/python/ZPublisher/Publish.py, line 165, in publish File /home/zopebot/redhat/BUILD/Zope-2.0.0-src/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: addMessage) File /home/zopebot/redhat/BUILD/Zope-2.0.0-src/lib/python/ZPublisher/Publish.py, line 102, in call_object (Object: addMessage) File /home/zopebot/zope/Products/Confera/Confera.py, line 568, in addMessage File /home/zopebot/redhat/BUILD/Zope-2.0.0-src/lib/python/ts_regex.py, line 109, in __call__ File /var/tmp/mze-python-root/opt/mtg/lib/python1.5/regsub.py, line 38, in gsub AttributeError: (see above) Andreas -- Andreas Kostyrka | andreas@mtg.co.at phone: +43/1/7070750 | phone: +43/676/4091256 MTG Handelsges.m.b.H. | fax: +43/1/7065299 Raiffeisenstr. 16/9 | 2320 Zwoelfaxing AUSTRIA
Andreas Kostyrka writes:
Actually, the fix I've did, I understand, I've switched from the old regsub to the threadsafe regex module. Now this, I don't understand, it seems like the ts_regex.py is broken for gsub.
It is broken. ts_regex is a hack, and Squishdot should be using the re module instead. I posted a patch to the Squishdot list that made it use re; check the archive at www.egroups.com/group/squishdot/ and look for my posting. -- A.M. Kuchling http://starship.python.net/crew/amk/ This isn't life in the fast lane, it's life in the oncoming traffic. -- Terry Pratchett, in alt.fan.pratchett
"Andrew M. Kuchling" wrote:
Andreas Kostyrka writes:
Actually, the fix I've did, I understand, I've switched from the old regsub to the threadsafe regex module. Now this, I don't understand, it seems like the ts_regex.py is broken for gsub.
It is broken.
No, it is not broken. The usage is incorrect. You need to use a regex regular expression with a ts_regex.gsub.
ts_regex is a hack,
Hm. We disagree.
and Squishdot should be using the re module instead. I posted a patch to the Squishdot list that made it use re; check the archive at www.egroups.com/group/squishdot/ and look for my posting.
I have no problem with switching to re. This is definately the right long-term solution. What is the current status of speed of re as compared to regex? Jim -- Jim Fulton mailto:jim@digicool.com Python Powered! Technical Director (888) 344-4332 http://www.python.org Digital Creations http://www.digicool.com http://www.zope.org Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.
Jim Fulton writes:
What is the current status of speed of re as compared to regex?
Still slower. I plan to do various bits of performance testing, rewriting re.py into C, and all that sort of thing over the next while. -- A.M. Kuchling http://starship.python.net/crew/amk/ Every time I try to define a perfectly stable person, I am appalled by the dullness of that person. -- J.D. Griffin
Andreas Kostyrka wrote:
On Thu, 2 Sep 1999, Nick Garcia wrote:
Looks good here! I guess this means I don't have to look into it after all ;) Well, it doesn't look to well here.
Actually, the fix I've did, I understand, I've switched from the old regsub to the threadsafe regex module. Now this, I don't understand, it seems like the ts_regex.py is broken for gsub.
gsub uses regular expressions in a thread-unsafe way, because gsub uses a the non-thread-safe interface. ts_regex.gsub gets around this by serializing all gsub calls. You must use a regex regular expression with gsub, not a ts_regex regular expression. Just make sure that regular expressions used with ts_regex.gsub are *only* used with ts_regex.gsub. Here's an example: import regex, ts_regex r=regex.compile("...") ... x=ts_regex.gsub(r, foo, bar) Note that early versions of ts_regex did not have this problem because they were not thread safe. Jim -- Jim Fulton mailto:jim@digicool.com Python Powered! Technical Director (888) 344-4332 http://www.python.org Digital Creations http://www.digicool.com http://www.zope.org Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.
participants (4)
-
Andreas Kostyrka -
Andrew M. Kuchling -
Jim Fulton -
Nick Garcia