[Zope3-Users] Adapting a builtin?

2005-12-06 Thread Paul Winkler
Hi,

Is it possible to register an adapter for a builtin type
such as str?  All the adapter examples I see use an interface for the
"for" attribute.

Something like:

  

This doesn't seem to work, although it doesn't give any errors.
I'm using five in a Zope 2 trunk sandbox.

Later I'll dig through it with pdb and see what I can find out, but
meanwhile I hoped somebody here had already solved this problem...

-- 

Paul Winkler
http://www.slinkp.com
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Adapting a builtin?

2005-12-12 Thread Paul Winkler
On Wed, Dec 07, 2005 at 10:23:14AM -0500, Jim Fulton wrote:
> It is valid both to:
> 
> - Declare an interface for a built-in type and
>   register adapters for that interface, and to
> 
> - Register adapters for builtin types directly.
> 
> I can't promise that this works now, but it ought to work.
> I'm 90% sure that it does in fact work, at least in Zope 3.

Neither one appears to work in a Zope2 trunk checkout.
Am I doing something wrong?

In lib/python/Products/StandardCacheManagers, I have:

# configure.zcml ###

http://namespaces.zope.org/zope";>

  


   


  interfaces.py ###

from zope.interface import Interface, Attribute

class IHTTPConnection(Interface):

"""Represents an HTTP connection.
"""

def request(method, path):
"""Send an HTTP request.
"""

def getresponse():
"""Get a list of strings representing a response.
"""

class IString(Interface):

"""Dummy interface to let me adapt strings
"""

# XXX what should be in this?


# toward the end of
# tests/testtests/test_AcceleratedHTTPCacheManager.py #

def test_XXXinterface(self):
url = 'http://www.google.com'
from Products.StandardCacheManagers.interfaces import IHTTPConnection
conn = IHTTPConnection(url)

#


This raises an error, regardless of whether I remove the registration of 
IString or not:

[EMAIL PROTECTED] Zope-Trunk $ python test.py -vv -m AcceleratedH
Running tests at level 1
Running unit tests:
  Running:
test_PURGE_passes_Host_header
(Products.StandardCacheManagers.tests.test_AcceleratedHTTPCacheManager.AcceleratedHTTPCacheTests)
test_XXXinterface
(Products.StandardCacheManagers.tests.test_AcceleratedHTTPCacheManager.AcceleratedHTTPCacheTests)

Error in test test_XXXinterface
(Products.StandardCacheManagers.tests.test_AcceleratedHTTPCacheManager.AcceleratedHTTPCacheTests)
Traceback (most recent call last):
  File "/usr/lib/python2.4/unittest.py", line 260, in run
testMethod()
  File
"/home/pw/Downloads/Apps/Net/Zope-Trunk/lib/python/Products/StandardCacheManagers/tests/test_AcceleratedHTTPCacheManager.py",
line 100, in test_XXXinterface
conn = IHTTPConnection(url)
  File
"/home/pw/Downloads/Apps/Net/Zope-Trunk/lib/python/zope/interface/interface.py",
line 682, in __call__
raise TypeError("Could not adapt", obj, self)
TypeError: ('Could not adapt', 'http://www.google.com', )


  Ran 2 tests with 0 failures and 1 errors in 0.261 seconds.

Tests with errors:
   test_XXXinterface
(Products.StandardCacheManagers.tests.test_AcceleratedHTTPCacheManager.AcceleratedHTTPCacheTests)





-- 

Paul Winkler
http://www.slinkp.com
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Adapting a builtin?

2005-12-13 Thread Paul Winkler
On Tue, Dec 13, 2005 at 07:57:38AM +0100, Michael Howitz wrote:
> In unittests the ZCML-Directives are not used so you have to do the
> things from ZCML in your test-code before adaption.
> 
> from zope.interface import classImplements
> from zope.app.testing import ztapi
> 
> classImplements(str, IString)
> ztapi.provideAdapter(IString, IHTTPConnection, HTTPConnection)

Yes, that does the job. I better go read up on testing in z3.
Thanks!

-- 

Paul Winkler
http://www.slinkp.com
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Fwd: Re: test() in TALES in Zope3

2006-02-01 Thread Paul Winkler
On Wed, Feb 01, 2006 at 01:38:15PM -0600, Michael Dudzik wrote:
> But why not just use (bar,foo)[C] in all cases, regardless of the value
> of bar or foo?

Because it always evaluates both foo and bar, and sometimes you can't
afford that (e.g. if they are expensive expressions rather than
simple variables).

Prior to python 2.5, there is AFAIK no other always-works
short-circuiting one-line conditional expression but this:
(bool(C) and [foo] or [bar])[0]


Generally I only care about this in TALES expressions;
in python I prefer to use the extra couple of lines to
use "if" and "else".

-- 

Paul Winkler
http://www.slinkp.com
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope-dev] Re: [Zope3-Users] Re: Nine new ZC Zope 3 packages on zope.org

2006-02-03 Thread Paul Winkler
On Fri, Feb 03, 2006 at 02:42:42PM -0500, Chris McDonough wrote:
> >Kudos for releasing these packages -- they all look interesting and
> >potentially useful.
> 
> Agreed, bravo!!

And there was much rejoicing.

-- 

Paul Winkler
http://www.slinkp.com
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] What attributes are made persistent

2006-02-15 Thread Paul Winkler
On Wed, Feb 15, 2006 at 01:21:14PM +, Peter Bengtsson wrote:
> I understand the mutation stuff and I always do it like this in zope2
> (I'm a complete beginner in the zope3 world eager to learn):
> 
> def updatesometing(self):
>#self.numbers['Peter'] = "0779 123 456"
>numbers = self.numbers
>numbers['Peter'] = "0779 123 456"
>self.numbers = numbers
> 
> But in zope2 land, if I derive from Persistent it magically saves ALL
> attributes defined in __init__ assuming that I post-write to them
> correct as shown above.

That hasn't changed in zope 3.  This is just standard ZODB behavior.
setattr will cause a save on commit regardless of the type of
the value.  If you read Jeff's reply again carefully, he said as much.

PersistentList and PersistentDict are not new, either.
They've been used in Zope 2 projects for ages.

There are still exactly three ways to get sub-object mutations to
persist:

1) Set the "dirty bit" by hand, e.g.:

 self.alist.append(1)
 self._p_changed = 1

2) Re-assign the attribute, e.g.:

 alist = self.alist
 alist.append(1)
 self.alist = alist

3) Using a persistent sub-object, e.g. a PersistentList instance:

 self.alist.append(1) 

-- 

Paul Winkler
http://www.slinkp.com
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Visionaire! (All your problems, solved)

2006-03-02 Thread Paul Winkler
On Thu, Mar 02, 2006 at 10:23:17AM +0100, Max M wrote:
> Canonical releases of compatible package collections is a *must*. 
> Splitting it all up in small chunks that are out of sync would be a 
> disaster.

but we already have that situation with current Products.

How many sites are still running Zope 2.7 and Plone 2.0
because there's one product they depend on that doesn't
work in 2.8 or 2.9?
 
> Releases that contains a *huge* compatible collection of packages is the 
> most effective way to move forward in an unified way.

That requires a huge coordination effort.
It's not sustainable.

This is why there's so much attention being paid to eggs lately.
Eggs are one packaging solution that allows version dependencies
to be explicitly stated in each package, and allows multiple
installed versions at the same time.
 
-- 

Paul Winkler
http://www.slinkp.com
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] recommendations for porting sqlmethod based z2 app to z3

2006-05-06 Thread Paul Winkler
On Sat, May 06, 2006 at 12:49:06PM -0700, Michel Pelletier wrote:
> Hello friends,
> 
> I'm in discussion with a customer about advancing their existing Z2
> application, which is driven by ZSQLMethods (they use ZODB only to store
> presentation templates).  They want to make their site more of a web
> service with various protocols, starting possibly with JSON-RPC and
> later including XML-RPC, REST, and SOAP. 

To me that smells like skinning; it's the same data, but you provide a
JSON-RPC skin, an XML-RPC skin, etc.

> I laid out to them the reasons
> why doing this in Z3 would be much easier, stable, and supported than Z2
> and they seem fairly convinced.
(snip)
> They are familiar and happy with ZSQLMethods and they want to be able to
> write their query logic in SQL, so they want to stick for the most part
> with this pattern.

I'll mention that there's the option of doing it in Z2 / Five.  That is,
keep using ZSQLMethods as provided by Zope 2, but do presentation via
zope3-style views and skins.  We're doing this and it works nicely.  

The disadvantage is that I find myself having to mentally juggle idioms
and techniques from both zope 2 and zope 3 and it feels like a lot to 
swallow.

-- 

Paul Winkler
http://www.slinkp.com
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] testrunner layers example and classmethods

2006-07-10 Thread Paul Winkler
Hi,

I have a need to have a batch of tests that do some expensive
setup once for the whole batch.  AFAICT this is what layers are for.

One question though... Why do the examples in
zope/testing/testrunner-ex/samplelayers.py have setUp() and tearDown()
as classmethods?
Is it just an implementation detail of those tests, or something
I should be aware of when creating my own layers?

-- 

Paul Winkler
http://www.slinkp.com
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: testrunner layers example and classmethods

2006-07-28 Thread Paul Winkler
Finally following up... Thanks for the clarification.

For anybody else puzzling over how to use layers, there are
a couple details that weren't obvious to me from the
docs. I wrote them up here:

http://zopewiki.org/TestLayersHowTo
and a front page at http://zopewiki.org/TestLayers

-PW

On Mon, Jul 10, 2006 at 09:51:03PM +0200, Philipp von Weitershausen wrote:
> Paul Winkler wrote:
> > I have a need to have a batch of tests that do some expensive
> > setup once for the whole batch.  AFAICT this is what layers are for.
> 
> Indeed.
> 
> > One question though... Why do the examples in
> > zope/testing/testrunner-ex/samplelayers.py have setUp() and tearDown()
> > as classmethods?
> 
> Because the test runner expects layers to be objects with setUp() and
> tearDown() "methods". So, if you want to pass a class without
> instantiating it first, you need to make these class methods so that
> they don't expect 'self' as the first argument.
> 
> > Is it just an implementation detail of those tests, or something
> > I should be aware of when creating my own layers?
> 
> Just pass in any object that has 'setUp' and 'tearDown' callables as
> attributes :).

Well, no, it also needs __bases__ and __name__ attributes, as I
discovered. So a vanilla class instance won't work unless you provide
those at least.

I don't know if there are other constraints with using instances,
I didn't investigate further.

It also cannot be a new-style class, as the test runner expects *all*
base classes to have a setUp() method, and object does not.

An old-style class with classmethods is really the most convenient
thing.

-- 

Paul Winkler
http://www.slinkp.com
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Get Started

2006-10-11 Thread Paul Winkler
It's pretty minimal, but the bin/pyskel script in your instance
may be useful for a start...  From the docstring:

"""Generate method skeletons for intefaces.

Usage: python pyskel.py dotted_name

Example:

cd lib/python
python zope/interface/pyskel.py zope.app.interfaces.pigs.IPigService

The dotted name is the module name and interface object name connected
with a dot.
"""

On Wed, Oct 11, 2006 at 12:45:50PM +0200, Reinoud van Leeuwen wrote:
> On Wed, Oct 11, 2006 at 11:45:37AM +0200, Philipp von Weitershausen wrote:
> > Jegenye 2001 Bt (Mikl??s Priszny??k) wrote:
> > >2006/10/11, FB <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>:
> > >
> > >
> > >Maybe. I wrote a script which creates a new application but I don't
> > >know, if
> > >it's still working with a current Zope release.
> > >
> > >
> > > https://svnserv.cbs.mpg.de/svn/edv/EDV/zope3-mpgsite/lib/python/mpgsite/tools/zag
> > >
> > >I've not used it for a long time. There are no warranties but feel
> > >free to try.
> > >
> > >
> > >
> > >
> > > Yeah, that's blasphemy indeed! :D  
> > > 
> > > Hopefully a more generic tool, a la ArcheGenXML, will emerge for Zope 3.
> > 
> > I've seen a few people suggest tools like that for Zope 3. I generally 
> > think it's a good idea. However, "us core developers" usually prefer our 
> > emacs/vi/... And our efforts are currently geared towards making Zope 3 
> > simpler to get started with -- without any special tools (sprint coming 
> > up this weekend).
> 
> I usually like a good editor as well. But since I am lazy I would love a 
> tool that produces the skeleton of files that can easily be generated from 
> something like an UML file. That would let me concentrate on the 
> interesting parts instead of having to type the same kind of stuff every 
> time...
> 
> -- 
> ______
> "Nothing is as subjective as reality"
> Reinoud van Leeuwen[EMAIL PROTECTED]
> http://www.xs4all.nl/~reinoud
> __
> ___
> Zope3-users mailing list
> Zope3-users@zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users

-- 

Paul Winkler
http://www.slinkp.com
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Will zope server crash when uploading huge files inthe same time?

2007-02-06 Thread Paul Winkler
On Tue, Feb 06, 2007 at 01:29:36PM -0500, Jonathan wrote:
> Thanks.  I was just wondering if there was some mechanism whereby zope was 
> informed (by Apache acting as the reverse proxy) about a file 'as it was 
> uploading' as opposed to 'after upload was completed' - while this would be 
> a nice feature it didn't seem feasible under the current apache-zope 
> interaction process (or at least my understanding of it!).

Well, the HTTP headers should tell you the file size.

-- 

Paul Winkler
http://www.slinkp.com
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Unicode for Stupid Americans (like me)?

2007-02-28 Thread Paul Winkler
On Wed, Feb 28, 2007 at 02:06:39PM -0700, Jeff Shell wrote:
> On 2/28/07, Philipp von Weitershausen <[EMAIL PROTECTED]> wrote:
> >That's sorta what zope.publisher does. Actually, it figures that if the
> >browser sends an Accept-Charset header, the stuff that its sending to us
> >would be encoded in one of those encodings, so it tries the ones in
> >Accept-Charset until it's lucky. It falls back to UTF-8.
> >
> >This seems to work. But yeah, it's relying on implementation details of
> >the browser and it's weird.
> 
> Ugh. I don't know how I missed that header. I was always looking for a
> content-type on the post, hoping that it had the information.

I'm rather late to this particular party, and I'm far from an expert
on either unicode or HTTP, but I have to ask: Is it just me, or is
HTTP's support for specifying encodings completely inadequate?

As far as I can tell, there are only two relevant headers.  The
request may specify Accept-Charset, whose meaning is given as "what
character sets are acceptable for the *response*" (emphasis mine).
The response may specify Content-Type, which again is irrelevant to
the request.  If there's anything that allows the client to specify
the encoding in use *for the request data*, I don't see it.

That seems like quite an oversight to make as late as HTTP 1.1 (1999).
What am I missing?


-PW


-- 

Paul Winkler
http://www.slinkp.com
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Unicode for Stupid Americans (like me)?

2007-03-01 Thread Paul Winkler
On Wed, Feb 28, 2007 at 09:08:03PM -0500, Gary Poster wrote:
> It's been years since I dug into this, but I'm better than 90% sure  
> that the browser is expected to make its requests in the encoding of  
> the response (i.e., the one set by Content-Type).  It's been too long  
> for me to tell you if that's in a spec or if it is simply the de  
> facto rule, though I suspect the former.

That almost makes sense, except that the first request precedes the
first response :) I'll have to dig into this some more when I have
time...

-- 

Paul Winkler
http://www.slinkp.com
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] general zope question

2007-03-08 Thread Paul Winkler

On Thu, Mar 08, 2007 at 04:40:11PM -0600, tyson wrote:
> I would like to build an application with Zope3 that does not use the 
> ZODB at all.
(snip)

Check the archives of the past month or two, there's been some recent
discussion of this exact topic.

-- 

Paul Winkler
http://www.slinkp.com
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Crash

2007-03-12 Thread Paul Winkler
On Mon, Mar 12, 2007 at 11:55:53AM -0400, Giovannetti, Mark wrote:
> > From: David Johnson
> > 
> > Our Zope 3.2.1 server is crashing and we cannot determine why.
> > 
> > The last entry in the access.log is the following:
> > 218.160.132.172 - - [10/Mar/2007:22:11:45 -0500] "CONNECT  
> > sextw.com.tw:25 HTTP/1.0" 404 0 "-" "-"
> > 
> 
> Hi David,
> 
> This is an attack on your server to attempt to proxy a 
> connection (CONNECT) to a third party SMTP (port 25) server 
> (sextw.com.tw).
(snip)
> I would recommend that you place zope behind an Apache
> proxy server for its protection.

Pound might also be a reasonable choice here. (Haven't tried it
myself.)  But yes, you want *something* in front of Zope.

-- 

Paul Winkler
http://www.slinkp.com
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] How to persist an attribute of list type

2007-11-30 Thread Paul Winkler
On Sat, Dec 01, 2007 at 02:34:49AM +0800, Yuan HOng wrote:
> Hi,
> 
> It seems that I can not get list attribute of an persistent object
> changed. I have the following class, which has a list as one of its
> attributes:
> 
> class Cart(Persistent):
> items = []
> amount = 0

I hope that's not your actual code. Note here that items is a mutable
class attribute, so if you do this:

cart = Cart()
cart.items.append('foo')

... you've just mutated the default list for all instances.  Is that
really what you want?  ZODB persistence can only store instance
attributes, not class attributes.

But that's irrelevant to the rest of your examples, because you
re-assigned cart.items, which should work. I don't know what's wrong
there.


-- 

Paul Winkler
http://www.slinkp.com
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Zope 3 hosting provider

2008-02-09 Thread Paul Winkler
On Fri, Feb 08, 2008 at 10:53:15PM -0800, Douglas Cerna wrote:
> Hi everyone.
> 
> I want to develop a website using Zope 3, but I need a
>  hosting provider that meets the "3" requirement. I've
> checked the Zope Solution Providers page at zope.org,
> but haven't find any provider using Zope 3 yet. Zope
> 2.9 is the closest I get.
> 
> Could you recommend (if) any provider? I don't mind if
> it's in the US or Europe.

webfaction.com might be worth a look; they specialize in Python and
will let you install any long-running process. See
http://blog.webfaction.com/custom-application-faq

The limiting factor is likely to be RAM; their cheapest plans have
quite low limits on RAM and I think you get automatically restarted if
you go over.

In a quick test here, a fresh out-of-the-box zope 3.3.1 instance takes
about 59 MB resident memory just to start up, and quickly goes up to
75 MB if I start clicking around the ZMI and add a ZPT page.  You
didn't mention a budget, but if you're on a shoestring, you'll want to
keep that in mind and see how much memory your application takes in
real life (wget -r is a quick and dirty way to get an estimate for a
read-only site populated with a representative data set).

-- 

Paul Winkler
http://www.slinkp.com
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Michael Bernstein

2008-03-04 Thread Paul Winkler
On Mon, Mar 03, 2008 at 11:38:11AM -0500, David Johnson wrote:
> Has anyone heard from Michael Bernstein?
>
> He was a frequent contributor to Zope in many ways and I've not heard or 
> seen a peep from him since early December.

He might just be busy; I know he was talking about moving house last
time I saw him on irc, not sure what the status there is.  He
occasionally appears on the opencore-dev mailing list or the
#openplans irc channel... like so:
http://www.openplans.org/projects/opencore/lists/opencore-dev/archive/2008/02/1202918009569

-- 

Paul Winkler
http://www.slinkp.com
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Fwd: Validation of viewlets in forms?

2008-05-28 Thread Paul Winkler
(whoops, i accidentally sent this to zope3-dev; re-sending.)

I'm wondering what's a nice way to deal with (server-side) validation
of a form composed of multiple viewlets.
I don't think I really want to move to a full-featured forms framework
yet, they all seem a little overly complex to me.

In the viewlet code, the obvious thing to do would be to raise an
exception in its update() method if there's a problem, otherwise save
the data or whatever.
This is what Philip does in his worldcookery viewlet examples.

But this means you only ever see the first error. In order to show the
user *all* the validation errors at once, something (the viewlet
manager?) would have to catch those exceptions.
And having done that, we would need to explicitly abort the
transaction. I'm not sure the best place to do that.

I could just poke around until I get something working, but I was
hoping somebody here would already have a nice example I can look at.
Should I just get used to the idea of using z3c.form or some such?

--
http://www.slinkp.com
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] building zope 3 instances?

2008-08-24 Thread Paul Winkler
On Wed, Aug 20, 2008 at 08:21:07AM -0400, Benji York wrote:
> On Tue, Aug 19, 2008 at 6:11 PM, Chris Withers <[EMAIL PROTECTED]> wrote:
> > That is getting a bit old. The confusion from having this cruft lying
> > around (in the same way as accidentally released packages) is causing a
> > lot more hurt tham people who're already using this (and hence already
> > have a local copy of the egg, which they can keep using should no egg be
> > available on pypi) would experience if they went away.
> 
> That argument neglects to include people that don't cache eggs (for
> whatever reason) and people that need to build on a machine that may
> have never cached the egg in question (like deploying brand new
> servers).

+99

Deleted releases can cause massive unintended pain downstream,
regardless of how sensible it may seem at the time. Just Don't Do It
Ever.

-- 

Paul Winkler
http://www.slinkp.com
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Overriding l10n?

2009-01-20 Thread Paul Winkler
If I have a zope 3 (actually a Five) application that ships with some
translations, is it possible to provide an alternate .po or .mo file
that overrides the default translations?  How do I ensure that my
translations take precedence?

We had a hack that did this job at product initialization time when we
were using PlacelessTranslationService, but now we're using the zope 3
i18n machinery and I can't figure out how to accomplish the same task.

-- 

Paul Winkler
http://www.slinkp.com
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Overriding l10n?

2009-01-20 Thread Paul Winkler
On Tue, Jan 20, 2009 at 07:46:28PM +0100, Adam GROSZER wrote:
> Hello Paul,
> 
> We're doing here in an overrides.zcml:
> 
> 
> where ./zope.pot and language folders exist

Thanks Adam.  I just tried that - it seems that my new directory
becomes the only source of all translations for that domain; the stock
translations provided by the original application don't get used at
all.  So I'd have to copy the original .po file and maintain a fork of
it.

I was hoping instead for a way to have one short .po file that
selectively overrides just a few translations, and for all other
message ids, the system would fall back to the stock .po file.  We had
a way to do that with PTS.

- PW
 
> Tuesday, January 20, 2009, 6:04:32 PM, you wrote:
> 
> PW> If I have a zope 3 (actually a Five) application that ships with some
> PW> translations, is it possible to provide an alternate .po or .mo file
> PW> that overrides the default translations?  How do I ensure that my
> PW> translations take precedence?
> 
> PW> We had a hack that did this job at product initialization time when we
> PW> were using PlacelessTranslationService, but now we're using the zope 3
> PW> i18n machinery and I can't figure out how to accomplish the same task.
> 
> 
> 
> -- 
> Best regards,
>  Adam GROSZER    mailto:agros...@gmail.com
> --
> Quote of the day:
> This fortune is inoperative.  Please try another.

-- 

Paul Winkler
http://www.slinkp.com
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] zodb is growing every login/logout

2009-04-21 Thread Paul Winkler
On Tue, Apr 21, 2009 at 04:36:01PM +0200, Jens wrote:
> Hello everybody,
> 
> I'm building a small web app by using the great grok.zope.org.
> 
> This is what I want to do:
> 
> An ldap-user login, do something (change password etc) and logout. No
> data will be stored in the zodb, all changes are made in ldap.
> 
> So far so good, all works fine. I'm using ldappas and ldapadapter as an
> PAU for zope3.
> 
> Just a small problem, maybe someone can help me.
> 
> Every login and logout, the ZODB grow about 300Byte. After some logins,
> the ZODB is getting bigger and bigger, and I have to pack it manually.

Are you sure it's just logins?  I had a problem with Grok of ZODB
bloat on every single request. Upgrading to zope.annotation>=3.4.1
fixed it.

We weren't using LDAP though. Might be unrelated to your problem.


-- 

Paul Winkler
http://www.slinkp.com
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] zope3.4.1

2009-09-17 Thread Paul Winkler
On Thu, Sep 17, 2009 at 10:06:00AM +0300, Rakotomandimby Mihamina wrote:
> 09/17/2009 05:31 AM, Milind Khadilkar:
> > There is also no mention of the release 3.4.1 on the Zope site.
> > Has it been released officially?
> 
> Man...
> http://www.zope.org/Products/
> [...]
> Download Zope 3.4.0 (2009-01-29) the current Zope 3 stable release.
> [...]
> 
> What information do you want more?

That's 3.4.0, not 3.4.1.


-- 

Paul Winkler
http://www.slinkp.com
___
Zope3-users mailing list
Zope3-users@zope.org
https://mail.zope.org/mailman/listinfo/zope3-users