setlocale() is a python thing. It wraps a C library, and that function setups an application wide environment (A bit like an environment variable would ...) ... Which is why it's not thread safe.
Calling setlocale() in one thread will affect the entire zope instance, across threads. Setlocale() is used by Zope to set the locale in etc/zope.conf. I found my own way to work around it (see other messages in this thread), though you're right, I didn't think of looking at the Zope 3 packages (I'm using Zope 2.10, so that should be an option for me). Maybe I'll have a look now :) J.F. -----Original Message----- From: Chris Withers [mailto:[EMAIL PROTECTED] Sent: December 15, 2006 2:24 AM To: Doyon, Jean-Francois Cc: zope@zope.org Subject: Re: [Zope] Zope, setlocale(), requests and traversal Doyon, Jean-Francois wrote: > - I see the docs mention setlocale might not be threadsafe, since Zope is threaded, anyone know the implications? is setlocale a Zope or Python thing? I'm guessing the latter, which might well mean you'll get unstuck under high load here.. Zoep 3 has very good locale support, I wonder how much of that could be leveraged here? cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )