[Zope-dev] Cron jobs with lovely.remotetask - how to start?

2008-10-15 Thread Hermann Himmelbauer
Hi, In my application, I'd like to run a service once a day that does some processing. It seems that lovely.remotetask can do that. In my scenario, I have multiple sites, whereas each one should have such a cron job. What I do is the following: In zope.conf: autostart [EMAIL PR

Re: [Zope-dev] traversal: different with and without a request

2008-10-15 Thread Christian Theune
On Wed, 2008-10-15 at 20:34 +0200, Dieter Maurer wrote: > Christian Theune wrote at 2008-10-15 17:42 +0200: > >we stumbled over an annoyance that took a while to debug: > > > >Writing an ITraversable, we used zope.traversing.api.traverse() in a > >test to verify our code. We registered the ITravers

Re: [Zope-dev] traversal: different with and without a request

2008-10-15 Thread Philipp von Weitershausen
Dieter Maurer wrote: > Christian Theune wrote at 2008-10-15 17:42 +0200: >> we stumbled over an annoyance that took a while to debug: >> >> Writing an ITraversable, we used zope.traversing.api.traverse() in a >> test to verify our code. We registered the ITraversable as an >> (non-multi) adapter an

Re: [Zope-dev] zope.interface: verifyObject vs properties

2008-10-15 Thread Thomas Lotze
"Dieter Maurer" <[EMAIL PROTECTED]> wrote: > I fear your must describe your proposed change more precisely: Nothing to be afraid of here ;o) > When your problem is the stated use case: "verifyObject" fails > because something necessary for the interface to be properly implemented > is miss

Re: [Zope-dev] traversal: different with and without a request

2008-10-15 Thread Dieter Maurer
Christian Theune wrote at 2008-10-15 17:42 +0200: >we stumbled over an annoyance that took a while to debug: > >Writing an ITraversable, we used zope.traversing.api.traverse() in a >test to verify our code. We registered the ITraversable as an >(non-multi) adapter and ended up with a working test.

Re: [Zope-dev] zope.interface: verifyObject vs properties

2008-10-15 Thread Dieter Maurer
Thomas Lotze wrote at 2008-10-15 09:27 +0200: >There has been a problem with zope.interface's verifyObject function >that occurs in conjunction with Python properties: when verifyObject >checks for the presence of an object's attribute, it does so by using >hasattr() which in turn tries a getattr()

Re: [Zope-dev] traversal: different with and without a request

2008-10-15 Thread Philipp von Weitershausen
El 15 Oct 2008, a las 19:24 , Shane Hathaway escribió: > Philipp von Weitershausen wrote: >> First of all, its name is quite misleading. It should really be >> called >> 'zope.resolvepath' because it resolves TALES-like object paths. In >> fact, >> it's pretty much only used by the PageTemplate

Re: [Zope-dev] traversal: different with and without a request

2008-10-15 Thread Shane Hathaway
Philipp von Weitershausen wrote: > First of all, its name is quite misleading. It should really be called > 'zope.resolvepath' because it resolves TALES-like object paths. In fact, > it's pretty much only used by the PageTemplate machinery to hook it up > to the TALES engine (with one exception,

Re: [Zope-dev] traversal: different with and without a request

2008-10-15 Thread Marius Gedminas
On Wed, Oct 15, 2008 at 06:02:55PM +0200, Philipp von Weitershausen wrote: > Christian Theune wrote: > > we stumbled over an annoyance that took a while to debug: > > > > Writing an ITraversable, we used zope.traversing.api.traverse() in a > > test to verify our code. We registered the ITraversabl

Re: [Zope-dev] zope.interface: verifyObject vs properties

2008-10-15 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thomas Lotze wrote: > Jim Fulton <[EMAIL PROTECTED]> wrote: > >> I would change it to just use getattr rather than hasattr. >> >> try: >> getattr(ob, name) >> except AttributeError: >> return False >> ... > > This doesn't handle the case that

Re: [Zope-dev] zope.interface: verifyObject vs properties

2008-10-15 Thread Philipp von Weitershausen
Thomas Lotze wrote: > Jim Fulton <[EMAIL PROTECTED]> wrote: > >> I would change it to just use getattr rather than hasattr. >> >> try: >> getattr(ob, name) >> except AttributeError: >> return False >> ... > > This doesn't handle the case that the attribute exists as a property > but raise

Re: [Zope-dev] zope.interface: verifyObject vs properties

2008-10-15 Thread Thomas Lotze
Jim Fulton <[EMAIL PROTECTED]> wrote: > I would change it to just use getattr rather than hasattr. > > try: > getattr(ob, name) > except AttributeError: > return False > ... This doesn't handle the case that the attribute exists as a property but raises an AttributeError when trying to p

Re: [Zope-dev] traversal: different with and without a request

2008-10-15 Thread Philipp von Weitershausen
Christian Theune wrote: > we stumbled over an annoyance that took a while to debug: > > Writing an ITraversable, we used zope.traversing.api.traverse() in a > test to verify our code. We registered the ITraversable as an > (non-multi) adapter and ended up with a working test. > > In the actual sy

[Zope-dev] ForbiddenAttribute: why subclass AttributeError?

2008-10-15 Thread Christian Theune
Hi, Why is a ForbiddenAttribute also an AttributeError? Is this intended to avoid 'information leaks'? We found a nasty side-effect together with getattr and annotations: a user that didn't have read-access to __annotations__ would end up trying to create the annotations container again and again

[Zope-dev] traversal: different with and without a request

2008-10-15 Thread Christian Theune
Hi, we stumbled over an annoyance that took a while to debug: Writing an ITraversable, we used zope.traversing.api.traverse() in a test to verify our code. We registered the ITraversable as an (non-multi) adapter and ended up with a working test. In the actual system, we found that the traversab

Re: [Zope-dev] zope.interface: verifyObject vs properties

2008-10-15 Thread Jim Fulton
On Oct 15, 2008, at 3:27 AM, Thomas Lotze wrote: > There has been a problem with zope.interface's verifyObject function > that occurs in conjunction with Python properties: when verifyObject > checks for the presence of an object's attribute, it does so by using > hasattr() which in turn tries a

Re: [Zope-dev] Zope 2.12 - supported Python versions

2008-10-15 Thread Philipp von Weitershausen
Hanno Schlichting wrote: > Stephan Richter wrote: >> On Wednesday 15 October 2008, Sidnei da Silva wrote: >>> I don't want to rain on your parade, but I already did a first pass at >>> reviewing the changes in Python 2.5 and Python 2.6. There are no >>> significant changes that I could spot so far.

Re: [Zope-dev] Zope 2.12 - supported Python versions

2008-10-15 Thread Sidnei da Silva
On Wed, Oct 15, 2008 at 11:28 AM, Hanno Schlichting <[EMAIL PROTECTED]> wrote: > Stephan Richter wrote: >> On Wednesday 15 October 2008, Sidnei da Silva wrote: >>> I don't want to rain on your parade, but I already did a first pass at >>> reviewing the changes in Python 2.5 and Python 2.6. There ar

Re: [Zope-dev] Zope 2.12 - supported Python versions

2008-10-15 Thread Martijn Faassen
Hi there, On Wed, Oct 15, 2008 at 3:35 PM, Andreas Jung <[EMAIL PROTECTED]> wrote: [snip] > If Python 2.6 is the latest official Python version of the 2.X line that > there is a chance that this version will be supported by the Python > community in the long term. So supporting Python 2.4 or Pytho

Re: [Zope-dev] Zope 2.12 - supported Python versions

2008-10-15 Thread Hanno Schlichting
Stephan Richter wrote: > On Wednesday 15 October 2008, Sidnei da Silva wrote: >> I don't want to rain on your parade, but I already did a first pass at >> reviewing the changes in Python 2.5 and Python 2.6. There are no >> significant changes that I could spot so far. Apparently the major >> change

Re: [Zope-dev] Zope 2.12 - supported Python versions

2008-10-15 Thread Stephan Richter
On Wednesday 15 October 2008, Sidnei da Silva wrote: > I don't want to rain on your parade, but I already did a first pass at > reviewing the changes in Python 2.5 and Python 2.6. There are no > significant changes that I could spot so far. Apparently the major > changes are: I also did a review f

Re: [Zope-dev] Zope 2.12 - supported Python versions

2008-10-15 Thread Sidnei da Silva
Folks, I don't want to rain on your parade, but I already did a first pass at reviewing the changes in Python 2.5 and Python 2.6. There are no significant changes that I could spot so far. Apparently the major changes are: - Ternary 'if' - Context Managers ('with' keyword) Both of those are just

Re: [Zope-dev] Zope 2.12 - supported Python versions

2008-10-15 Thread Hanno Schlichting
Andreas Jung wrote: > RestrictedPython: I talked with Alan Runyan about this topic at the > Plone conferenceif we are serious then RP has to be reviewed. But > who can review it and how long would it take. There are possibly only a > limited number of people with the experience and skills for p

Re: [Zope-dev] Zope 2.12 - supported Python versions

2008-10-15 Thread Andreas Jung
On 15.10.2008 14:44 Uhr, Martijn Faassen wrote: Hi there, On Wed, Oct 15, 2008 at 2:30 PM, Andreas Jung<[EMAIL PROTECTED]> wrote: If the latter, what about the security review for untrusted code? You mean the review of RestrictedPython? Yes. If RestrictedPython is to be reviewed for change

Re: [Zope-dev] Zope 2.12 - supported Python versions

2008-10-15 Thread Hanno Schlichting
Martijn Faassen wrote: > On Wed, Oct 15, 2008 at 2:30 PM, Andreas Jung <[EMAIL PROTECTED]> wrote: >> You mean the review of RestrictedPython? > > Yes. > > If RestrictedPython is to be reviewed for changes, it *might* be > easier to do this for 2.4 -> 2.5 instead of the big leap of two python > ve

Re: [Zope-dev] Zope 2.12 - supported Python versions

2008-10-15 Thread Martijn Faassen
Hi there, On Wed, Oct 15, 2008 at 2:30 PM, Andreas Jung <[EMAIL PROTECTED]> wrote: >> If the latter, >> what about the security review for untrusted code? > > You mean the review of RestrictedPython? Yes. If RestrictedPython is to be reviewed for changes, it *might* be easier to do this for 2.4

Re: [Zope-dev] Zope 2.12 - supported Python versions

2008-10-15 Thread Andreas Jung
On 15.10.2008 14:25 Uhr, Martijn Faassen wrote: Sidnei da Silva wrote: On Tue, Oct 14, 2008 at 2:16 PM, Andreas Jung<[EMAIL PROTECTED]> wrote: Thanks for starting the discussion. Going for Python 2.6 also requires that we get the ZCA running on top of Python 2.6 until some time next year. FWI

Re: [Zope-dev] Zope 2.12 - supported Python versions

2008-10-15 Thread Martijn Faassen
Sidnei da Silva wrote: > On Tue, Oct 14, 2008 at 2:16 PM, Andreas Jung <[EMAIL PROTECTED]> wrote: >> Thanks for starting the discussion. Going for Python 2.6 also requires that >> we get the ZCA running on top of Python 2.6 until some time next year. > > FWIW, that's what I've been working on. The

[Zope-dev] Zope Tests: 5 OK

2008-10-15 Thread Zope Tests Summarizer
Summary of messages to the zope-tests list. Period Tue Oct 14 11:00:00 2008 UTC to Wed Oct 15 11:00:00 2008 UTC. There were 5 messages: 5 from Zope Tests. Tests passed OK --- Subject: OK : Zope-2.8 Python-2.3.6 : Linux From: Zope Tests Date: Tue Oct 14 20:54:23 EDT 2008 URL: http://m

[Zope-dev] zope.interface: verifyObject vs properties

2008-10-15 Thread Thomas Lotze
There has been a problem with zope.interface's verifyObject function that occurs in conjunction with Python properties: when verifyObject checks for the presence of an object's attribute, it does so by using hasattr() which in turn tries a getattr() call. If the attribute is implemented as a proper