[Zope-dev] Re: Flood of deprecation warnings...

2006-06-20 Thread Chris Withers

Martijn Faassen wrote:

Chris Withers wrote:
[snip]
One of my other bugbears is that a flood of deprecation warnings often 
masks real problems.


What real problems?


Deprecation warnings in code I need to care about, as opposed to 
mindless spew from the zope core or other installed products but which i 
just use and don't have the knowledge to maintain...


This is bad. You'd be making it far less likely people will worry about 
deprecations, and they'll end up fixing their code *after* the 
deprecation period when things actually break, instead of before.


I'd assert most people don't worry about deprecation warnings because 
code still works when they see them. Oft overheard:

oh, just ignore them, stuff still works and someone will fix it later

I wouldn't be against a way to selectively shut *down* deprecation 
warnings for products.


Warnfilters already let you do this...

Your response is quite different than mine. If my Zope spews out 
warnings at me I go and fix them. :) I really don't like applications 
that babble at me.


Believe it or not, I 100% agree with you, but other people don't feel 
the way. Both core zope and Plone spew forth in their default state. 
Yes, that's the fault of the people who didnt' fix deprecation warnings, 
but I still have to deal with it :-S


Shutting up those meaningless deprecations is what I was driving at...

cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: Stable / Development branches?

2006-06-20 Thread Chris Withers
As always, Martijn has prettymuch hit the nail on the head with this 
mail, +lots to all the points he raises...


Chris

Martijn Faassen wrote:


I think we've concluded a number of things:

* some developers (Andreas in particular) do not consider it a huge 
problem to keep maintaining an older version for some time longer, if 
the fixes are relatively simple to apply.


* we really want to be a bit more careful with deprecating things. We 
don't want to deprecate code in the transition from 2.8.4 to 2.8.5, for 
instance, only with feature releases.


Perhaps these two points already help us go into the right direction.

The Five model of establishing new code in parallel to the existing Zope 
2 code was pretty succesful in not breaking stuff. Perhaps we should see 
whether we can apply this more often.


On the other hand, the Five model of not changing the core also has 
serious limitations. Some things Five is doing now are really dependent 
on some core changes, and would be very hard to accomplish without them. 
In addition, we're also interested in making larger bits of Zope 2 work 
with Zope 3 code so we can stop maintaining two code bases. This 
inevitably causes pain. I think the pain is necessary.


The pain should be kept under control:

* predictable pain. Predictable releases. Predictable deprecation 
policy. Good communication of direction. I think we've been reasonable 
at this.


* make it clear that pain leads to gains. We should communicate what we 
*win* by making a change. Sometimes a change only is good for the Zope 
maintainers, but often there are also potential neat things for Zope 2 
developers. We should let them know. I think we've had some good 
advocates for this, but perhaps we should have a clear location on the 
zope website :) for this.


* make it clear how to make the pain go away. We should have better 
documentation describing what a developer should do during an upgrade to 
a new Zope version. I think we can do a lot better at this.


* optional buy-in pain. Follow the Five model where new code is 
developed in parallel to the existing codebase, and you can opt into it 
or stick with the old system. Sometimes this isn't possible. At other 
times it's mostly a delaying action, but that might be useful 
nonetheless. I think we've balanced this reasonably, but unfortunately 
things like this are just not possible forever, as there's a maintenance 
cost.


* soften the pain. If we can afford it, a longer maintenance period for 
the Zope 2 platform might be nice. Andreas is sounding very friendly 
about this, so that's cool. :)


--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: [Zope3-dev] Re: Stable / Development branches?

2006-06-20 Thread Chris Withers

Andreas Jung wrote:



I for one, is NOT interested in backporting fixed in Five trunk to
both Five 1.0, 1.1, 1.3, 1.4 and 1.5, which is what are the current
versions of Five if we say that Zope 2.8 and 2.7 should be still
supported after the release of 2.10.


We don't talk about Zope 2.7 which is dead.


...except for all the people still using it ;-)

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: [Zope3-dev] Re: Unify the Zope 2 and Zope 3 repositories!

2006-06-20 Thread Chris Withers

Benji York wrote:

Philipp von Weitershausen wrote:

Uh, never mind.


+1  :)


Any chance you could explain why you feel that way?

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: [Zope3-dev] Re: Unify the Zope 2 and Zope 3 repositories!

2006-06-20 Thread Philipp von Weitershausen
Chris Withers wrote:
 Benji York wrote:
 Philipp von Weitershausen wrote:
 Uh, never mind.

 +1  :)
 
 Any chance you could explain why you feel that way?

Follow this thread:
http://mail.zope.org/pipermail/zope3-dev/2005-November/016561.html

Philipp

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: default view

2006-06-20 Thread Martijn Faassen

Philipp von Weitershausen wrote:

Florent Guillaume wrote:

Florent Guillaume wrote:

So here's a proposal: how about having the following order:
- __bobo_traverse__
- unacquired attribute
- zope 3 views
- acquired attributes

Attached is the current diff I'm working with (for Zope 2.10).


Hey, cool. You know, the real challenge is backporting this all the way
to Five 1.2 to ensure compatibility between the current stable Zope 2
releases.


We've actually noticed Five 1.2.4 is not compatible with Five 1.2 in 
some way to do with mysterious 'index.html' bits appearing after URLs 
where we thought they shouldn't. We haven't tracked this down and we 
might not for a while (we just switched back to Five 1.2..), just wanted 
to let you know Five 1.2 has some compatibility issues..


Regards,

Martijn
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: default view

2006-06-20 Thread Florent Guillaume

On 20 Jun 2006, at 13:23, Martijn Faassen wrote:

Philipp von Weitershausen wrote:

Florent Guillaume wrote:

Florent Guillaume wrote:

So here's a proposal: how about having the following order:
- __bobo_traverse__
- unacquired attribute
- zope 3 views
- acquired attributes

Attached is the current diff I'm working with (for Zope 2.10).
Hey, cool. You know, the real challenge is backporting this all  
the way

to Five 1.2 to ensure compatibility between the current stable Zope 2
releases.


We've actually noticed Five 1.2.4 is not compatible with Five 1.2  
in some way to do with mysterious 'index.html' bits appearing after  
URLs where we thought they shouldn't. We haven't tracked this down  
and we might not for a while (we just switched back to Five 1.2..),  
just wanted to let you know Five 1.2 has some compatibility issues..


I was looking at the publisher, and it hacks the URL to explicitely  
add the default view to it when a default view is used. That might  
explain it. You're saying Zope 2.10 doesn't do that? I thought it did  
too.


Florent

--
Florent Guillaume, Nuxeo (Paris, France)   Director of RD
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]



___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: default view

2006-06-20 Thread Martijn Faassen

Florent Guillaume wrote:

On 20 Jun 2006, at 13:23, Martijn Faassen wrote:

[snip]
We've actually noticed Five 1.2.4 is not compatible with Five 1.2 in 
some way to do with mysterious 'index.html' bits appearing after URLs 
where we thought they shouldn't. We haven't tracked this down and we 
might not for a while (we just switched back to Five 1.2..), just 
wanted to let you know Five 1.2 has some compatibility issues..


I was looking at the publisher, and it hacks the URL to explicitely add 
the default view to it when a default view is used. That might explain 
it. You're saying Zope 2.10 doesn't do that? I thought it did too.


I'm just comparing Zope 2.8 + Five 1.2 with Zope 2.8 + Five 1.2.4. I 
have no idea what Zope 2.10 does.


It broke a lot of stuff for us, so we switched back until we can figure 
out what's going on when we upgrade that piece of code to a newer 
version of Zope.


Regards,

Martijn

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: default view

2006-06-20 Thread Lennart Regebro

On 6/20/06, Florent Guillaume [EMAIL PROTECTED] wrote:

I was looking at the publisher, and it hacks the URL to explicitely
add the default view to it when a default view is used. That might
explain it. You're saying Zope 2.10 doesn't do that? I thought it did
too.


Well, it adds index_html, not index.html. And it's not visible, just traversed.

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: default view

2006-06-20 Thread Lennart Regebro

On 6/20/06, Martijn Faassen [EMAIL PROTECTED] wrote:

It broke a lot of stuff for us, so we switched back until we can figure
out what's going on when we upgrade that piece of code to a newer
version of Zope.


There is more tests in Five 1.5, adding them to older version of Five
should be easy. Making them not break may be more complicated. ;)

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: [Zope3-dev] Re: Stable / Development branches?

2006-06-20 Thread Lennart Regebro

On 6/20/06, Chris Withers [EMAIL PROTECTED] wrote:

I think it's also safe to say that some people will stick with a good
vintage zope which has all the features they need and was stable.


And that's OK, and in many cases completely sensible.
--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Flood of deprecation warnings...

2006-06-20 Thread Florent Guillaume

Chris Withers wrote:
Both core zope and Plone spew forth in their default state. 


Zope 2.10 does? It shouldn't. Please point out the deprecation warnings 
it sends.


Also could we please bury the zLOG-was-only-halfwy-deprecated issue 
that's been beaten to death? Everybody knows there were spurious 
warnings from it in some past version. Everybody knows it's now been 
mea-culpa-ed and fixed.


Florent

--
Florent Guillaume, Nuxeo (Paris, France)   Director of RD
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Flood of deprecation warnings...

2006-06-20 Thread Rob Miller

Chris Withers wrote:
Both core zope and Plone spew forth in their default state. 


the deprecation warnings in Plone annoy me to no end.  unfortunately, though, 
Plone (thus far) has chosen to straddle Zope release.  i can't fix the 
deprecation warnings that Plone 2.5 generates with Zope 2.9, for instance, 
because that would cause Plone to no longer work w/ the Zope 2.8 series.


there is talk of having Plone 3 only support Zope 2.10; if this happens, then 
i suspect we'll no longer see deprecation warnings in a default Plone setup.


-r

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope] load balancing ftp over ZEO clients

2006-06-20 Thread Chris Withers

Reinoud van Leeuwen wrote:
We now would like to rollout ftp acces for the users that cannot use 
webdav for some reason.


I'm not sure I'd recommend Zope's FTP server, it's kinda crufty.

Rather roll out WebDAV, which can be load balanced in the same way as 
any other web request.


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 )


[Zope] Performance hit for DeadlockDebugger?

2006-06-20 Thread Chris Withers

Hi All,

Is there any performance hit for having DeadlockDebugger installed and 
enabled all the time on a production zope instance?


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 )


[Zope] Nested dtml tags

2006-06-20 Thread Jonathan Bowlas
Hi All,

How can I do this with dtml?

select name=MODLEVEL size=1
dtml-if expr=dtml-var name=MODLEVEL == 1 #I need an
alternative to this.
option value=1 selected=selected1/option
option value=22/option
Etc, etc.

Hope someone can help.

Jon


___
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 )


Re: [Zope] Nested dtml tags

2006-06-20 Thread Tino Wildenhain

Jonathan Bowlas schrieb:

Hi All,

How can I do this with dtml?

select name=MODLEVEL size=1
dtml-if expr=dtml-var name=MODLEVEL == 1 #I need an
alternative to this.
option value=1 selected=selected1/option
option value=22/option
Etc, etc.

Hope someone can help.



No you cant. dtml-var means, unlike the name say really: dtml-print.
See it like that and it will be clear. (Or just skip that DTML alltogether)

Regards
Tino
___
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 )


Re: [Zope] Nested dtml tags

2006-06-20 Thread Andreas Jung



--On 20. Juni 2006 12:15:40 +0100 Jonathan Bowlas [EMAIL PROTECTED] wrote:


Hi All,

How can I do this with dtml?

select name=MODLEVEL size=1
dtml-if expr=dtml-var name=MODLEVEL == 1 #I need an
alternative to this.
option value=1 selected=selected1/option
option value=22/option
Etc, etc.

Hope someone can help.



Is there a real need for you to use DTML instead of ZPT?

-aj

pgpZ9nwtl9AS7.pgp
Description: PGP signature
___
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 )


Re: [Zope] Nested dtml tags

2006-06-20 Thread Patrick Decat

Hi, no need for nested dtml :

select name=MODLEVEL size=1
option value=1dtml-if expr=MODLEVEL == '1' selected/dtml-if1/option
option value=2dtml-if expr=MODLEVEL == '2' selected/dtml-if2/option
/select

On 6/20/06, Jonathan Bowlas [EMAIL PROTECTED] wrote:

Hi All,

How can I do this with dtml?

select name=MODLEVEL size=1
dtml-if expr=dtml-var name=MODLEVEL == 1 #I need an
alternative to this.
option value=1 selected=selected1/option
option value=22/option
Etc, etc.

Hope someone can help.

Jon


___
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 )


___
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 )


RE: [Zope] Nested dtml tags

2006-06-20 Thread Jaroslav Lukesh
 [EMAIL PROTECTED] On Behalf Of Jonathan Bowlas
 How can I do this with dtml?
 
 select name=MODLEVEL size=1
   dtml-if expr=dtml-var name=MODLEVEL == 1 #I need an
 alternative to this.
   option value=1 selected=selected1/option
   option value=22/option
   Etc, etc.




dtml-if MODLEVEL
select name=MODLEVEL:int size=1
option value=1 dtml-if expr=MODLEVEL ==
1SELECTED/dtml-if 1/option
option value=2 dtml-if expr=MODLEVEL ==
2SELECTED/dtml-if 2/option
Etc, etc.
/dtml-if

Regards, JL.

___
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 )


RE: [Zope] Nested dtml tags

2006-06-20 Thread Jonathan Bowlas
Hmm, this doesn't appear to work.

Let me explain what I'm trying to do. 

I have a Z SQL Method called selectmoduleinfoMethod that contains the SQL:

SELECT * FROM RECMGR_EL_MODULE_Query WHERE MODCODE = dtml-sqlvar
MODCODE type=string

This recordset is returned to a dtml form to populate the fields ready for
editing.

One of the database table entries returned from this query is the value of
MODLEVEL, this modlevel can be one of seven choices that appear in a select
list. However I'd like the one returned from the database to appear as
selected in the form for editing.

As far as I can see the example you gave me does not retrieve the value of
MODLEVEL from the returned SQL recordset it only checks for its existence
and consequently cannot test for the conditions.

Any Ideas how I may resolve this?

Jon

-Original Message-
From: Jaroslav Lukesh [mailto:[EMAIL PROTECTED] 
Sent: 20 June 2006 12:29
To: [EMAIL PROTECTED]; zope@zope.org
Subject: RE: [Zope] Nested dtml tags

 [EMAIL PROTECTED] On Behalf Of Jonathan Bowlas
 How can I do this with dtml?
 
 select name=MODLEVEL size=1
   dtml-if expr=dtml-var name=MODLEVEL == 1 #I need an
 alternative to this.
   option value=1 selected=selected1/option
   option value=22/option
   Etc, etc.




dtml-if MODLEVEL
select name=MODLEVEL:int size=1
option value=1 dtml-if expr=MODLEVEL ==
1SELECTED/dtml-if 1/option
option value=2 dtml-if expr=MODLEVEL ==
2SELECTED/dtml-if 2/option
Etc, etc.
/dtml-if

Regards, JL.



___
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 )


[Zope] Problem with constructTransientObjectContainer

2006-06-20 Thread Jonathan



I have an external method that is trying to create 
a Transient Object Container in a 'temp_folder', as follows:

def BuildGarbageCollector(self):
 folder = 
self.restrictedTraverse('Coz/TempImages') 
# Coz/TempImages already exists
 
folder.constructTransientObjectContainer(self, id='GarbageCollector', 
timeout_mins=10, 
limit=0, 
delNotification=BASEFOLDER+'DeleteTempImage')


and I get the following error:

Traceback (innermost last): Module 
ZPublisher.Publish, line 115, in publish Module ZPublisher.mapply, 
line 88, in mapply Module ZPublisher.Publish, line 41, in 
call_object Module OFS.DTMLMethod, line 144, in 
__call__ - DTMLMethod at /Coz/WUI/tst - 
URL: http://192.168.123.2:8080/Coz/WUI/tst/manage_main - 
Physical Path: /Coz/WUI/tst Module DocumentTemplate.DT_String, line 
476, in __call__ Module DocumentTemplate.DT_Let, line 75, in 
render Module DocumentTemplate.DT_Util, line 196, in 
eval - __traceback_info__: document_id Module 
string, line 1, in _expression_ Module 
Products.ExternalMethod.ExternalMethod, line 232, in __call__ - 
__traceback_info__: (('tst',), {}, None) Module 
/apps/zope/Extensions/cozumo.py, line 212, in ProcessControl Module 
string, line 1, in ? Module /apps/zope/Extensions/cozumo.py, 
line 219, in subtst Module /apps/zope/Extensions/cozumo.py, line 2473, 
in BuildGarbageCollectorAttributeError: 
constructTransientObjectContainer

 
If I change the external method as follows (remove the 
reference to 'folder'):
 
constructTransientObjectContainer(self, id='GarbageCollector', timeout_mins=10, 
limit=0, 
delNotification=BASEFOLDER+'DeleteTempImage')
There is no error, but the TOC is created in the wrong 
folder. I can manually (thru the ZMI) add a TOC to the TempImages folder, 
but I can't create one programmatically.

Can anyone point me in the right direction?!

Thanks,

Jonathan
___
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 )


[Zope] Re: Performance hit for DeadlockDebugger?

2006-06-20 Thread Florent Guillaume

Chris Withers wrote:
Is there any performance hit for having DeadlockDebugger installed and 
enabled all the time on a production zope instance?


The only performance hit is an added
  if uri == dump_url:
per request, which is totally negligible.

DeadlockDebugger has been designed to stay enabled in production, which 
is why I added this whole secret password stuff.


Florent

--
Florent Guillaume, Nuxeo (Paris, France)   Director of RD
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]
___
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 )


Re: [Zope] Nested dtml tags

2006-06-20 Thread Andrew Hedges

This is untested, but it's a pretty familiar idiom to me at the moment.

dtml-in selectmoduleinfoMethod prefix=dbmodlevel
dtml-call REQUEST.set('dbmodlevel', dbmodlevel_item)
/dtml-in
select name=MODLEVEL
dtml-in range(1, 8) prefix=modlevel
optiondtml-if expr=modlevel_item == dbmodlevel  
selected=selected/dtml-ifdtml-var modlevel_item/option

/dtml-in
/select

Cheers,
-Andrew
-
[EMAIL PROTECTED] / http://clearwired.com

On Jun 20, 2006, at  6/20/2006 6:51 AMMDT, Jonathan Bowlas wrote:


Hmm, this doesn't appear to work.

Let me explain what I'm trying to do.

I have a Z SQL Method called selectmoduleinfoMethod that contains  
the SQL:


SELECT * FROM RECMGR_EL_MODULE_Query WHERE MODCODE = dtml-sqlvar
MODCODE type=string

This recordset is returned to a dtml form to populate the fields  
ready for

editing.

One of the database table entries returned from this query is the  
value of
MODLEVEL, this modlevel can be one of seven choices that appear in  
a select

list. However I'd like the one returned from the database to appear as
selected in the form for editing.

As far as I can see the example you gave me does not retrieve the  
value of
MODLEVEL from the returned SQL recordset it only checks for its  
existence

and consequently cannot test for the conditions.

Any Ideas how I may resolve this?

Jon

-Original Message-
From: Jaroslav Lukesh [mailto:[EMAIL PROTECTED]
Sent: 20 June 2006 12:29
To: [EMAIL PROTECTED]; zope@zope.org
Subject: RE: [Zope] Nested dtml tags


[EMAIL PROTECTED] On Behalf Of Jonathan Bowlas
How can I do this with dtml?

select name=MODLEVEL size=1
dtml-if expr=dtml-var name=MODLEVEL == 1 #I need an
alternative to this.
option value=1 selected=selected1/option
option value=22/option
Etc, etc.





dtml-if MODLEVEL
select name=MODLEVEL:int size=1
option value=1 dtml-if expr=MODLEVEL ==
1SELECTED/dtml-if 1/option
option value=2 dtml-if expr=MODLEVEL ==
2SELECTED/dtml-if 2/option
Etc, etc.
/dtml-if

Regards, JL.



___
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 )



___
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 )


Re: [Zope] Nested dtml tags

2006-06-20 Thread Tino Wildenhain

Jonathan Bowlas schrieb:

Hmm, this doesn't appear to work.

Let me explain what I'm trying to do. 


I have a Z SQL Method called selectmoduleinfoMethod that contains the SQL:

SELECT * FROM RECMGR_EL_MODULE_Query WHERE MODCODE = dtml-sqlvar
MODCODE type=string


You should never use SELECT * in production code. Better state the
name of the columns you really want there. (Thus fixing their name)

One simple form would be:

SELECT modlevel,modname,modlevel=dtml-sqlvar modlevel as selected
FROM foobar WHERE modcode = dtml-sqlvar modcode type=string ...

Then you could use the result of your ZSQL Method more or less directly,
in ZPT for example:

select name=MODLEVEL (size=1 is default anyway ;)
   option tal:repeat=mod here/yourZSQLMethod
   tal:attributes=value mod/modlevel; selected mod/selected
   tal:content=mod/modname123/option
/select


In Python Script, it should work like this:

MODLEVEL=request.form.get('MODLEVEL','') # make sure you get the types correctly

return [dict(x,selected=x.modlevel==MODLEVEL) for x in 
context.selectmoduleinfoMethod()]

this works with your ZSQL method as it is (more or less - adjust the column 
names)
and can be used like the one above.

If you like ugly templates and a lot of writing you can translate the
example to DTML - this is left to the reader ;)


Regards
Tino
___
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 )


RE: [Zope] Nested dtml tags

2006-06-20 Thread Jonathan Bowlas
Thanks for everyone's help. I may be able to sort this now.

-Original Message-
From: Tino Wildenhain [mailto:[EMAIL PROTECTED] 
Sent: 20 June 2006 15:09
To: [EMAIL PROTECTED]
Cc: 'Jaroslav Lukesh'; zope@zope.org
Subject: Re: [Zope] Nested dtml tags

Jonathan Bowlas schrieb:
 Hmm, this doesn't appear to work.
 
 Let me explain what I'm trying to do. 
 
 I have a Z SQL Method called selectmoduleinfoMethod that contains the SQL:
 
   SELECT * FROM RECMGR_EL_MODULE_Query WHERE MODCODE = dtml-sqlvar
 MODCODE type=string

You should never use SELECT * in production code. Better state the
name of the columns you really want there. (Thus fixing their name)

One simple form would be:

SELECT modlevel,modname,modlevel=dtml-sqlvar modlevel as selected
FROM foobar WHERE modcode = dtml-sqlvar modcode type=string ...

Then you could use the result of your ZSQL Method more or less directly,
in ZPT for example:

select name=MODLEVEL (size=1 is default anyway ;)
option tal:repeat=mod here/yourZSQLMethod
tal:attributes=value mod/modlevel; selected mod/selected
tal:content=mod/modname123/option
/select


In Python Script, it should work like this:

MODLEVEL=request.form.get('MODLEVEL','') # make sure you get the types
correctly

return [dict(x,selected=x.modlevel==MODLEVEL) for x in
context.selectmoduleinfoMethod()]

this works with your ZSQL method as it is (more or less - adjust the column
names)
and can be used like the one above.

If you like ugly templates and a lot of writing you can translate the
example to DTML - this is left to the reader ;)


Regards
Tino


___
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 )


Re: [Zope] Problem with constructTransientObjectContainer - Resolved

2006-06-20 Thread Jonathan


- Original Message - 
From: Chris McDonough [EMAIL PROTECTED]
folder.manage_addProducts ['Transience'].constructTransientObjectContainer 
might work (assuming  constructTransientObjectContainer is the right 
constructor name, I  didn't check).


Chris, thanks for the idea - I tried it, but  it generated the error: 
BadRequest: ('Empty or invalid id specified', Folder at /Coz/WUI)


After looking at the Transience.py source I found the answer:  Instead of 
passing 'self' as the first parameter I passed the folder object instead. 
The worked because constructTransientObjectContainer does: 
self._setObject(id, ob)


So the final solution was:

   folder = self.restrictedTraverse('Coz/TempImages')
   constructTransientObjectContainer(folder, 'GarbageCollector', 
timeout_mins=10, limit=0,

   delNotification=BASEFOLDER+'DeleteTempImage')


Thanks again for the help, it got me thinking in the right direction!


Jonathan

___
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 )


[Zope] How to commit a piece of data in a transaction when the transaction is being aborted later

2006-06-20 Thread William Heymann
I am dealing with a zope system where Verisign is sending a POST to our server 
for ecommerece purposes. Currently I am writing the entire contents of the 
POST from verisign to the ZODB however I have a problem that some of these 
POSTs are not being recorded because an error occurs later in the 
transaction.

What I would like to do is isolate this recording from everything else. So 
that no matter what other error is raised that part will commit so I have a 
record of the conversation later.

Currently I can put the logging step as the very first step in the 
conversation with verisign and call get_transaction().commit() (I am 
currently using zope 2.7 and working on the migration to zope 2.9)

What would be the best way to deal with this problem? Should I just do a 
commit of the transaction as the very first step so that part is written and 
then zope will start a new transaction for the rest of the stuff done? Should 
I somehow tell zope to run a certain function as its own transaction? Also 
when I switch over to zope 2.9 how will these things need to be changed?

Thanks
___
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 )


Re: [Zope] Transaction rollback

2006-06-20 Thread Chris McDonough

import transaction
transaction.abort()

should do it.  I will spare you the nannylike warnings about managing  
your own transaction state..


- C

On Jun 20, 2006, at 11:21 AM, Luiz Fernando B. Ribeiro wrote:

I need to return an error page with instructions after verifying a  
request but I need to do a rollback. How can I call a full  
rollback, like when using raise(), inside a python script and  
redirect to an error page.


I found many posts about get_transaction().rollback() but it is  
deprecated in Zope 2.9. What is the modern way of doing this?


Thanks in advance.

--
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
___
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 )



___
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 )


Re: [Zope] How to commit a piece of data in a transaction when the transaction is being aborted later

2006-06-20 Thread Chris McDonough


On Jun 20, 2006, at 2:27 PM, William Heymann wrote:

I am dealing with a zope system where Verisign is sending a POST to  
our server
for ecommerece purposes. Currently I am writing the entire contents  
of the
POST from verisign to the ZODB however I have a problem that some  
of these

POSTs are not being recorded because an error occurs later in the
transaction.






What I would like to do is isolate this recording from everything  
else. So
that no matter what other error is raised that part will commit so  
I have a

record of the conversation later.


I'd just record the data from Verisign in response to their POST (do  
nothing else) and come along later with a separate request to pick  
through the data to do postprocessing on it every so often; then the  
data always gets recorded and you can deal with errors in your  
postprocessing without needing to manage transaction state manually.   
ClockServer can help with the do something every so often aspect of  
this.


- C



___
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 )


Re: [Zope] How to commit a piece of data in a transaction when thetransaction is being aborted later

2006-06-20 Thread Jonathan


- Original Message - 
From: William Heymann [EMAIL PROTECTED]

To: zope@zope.org
Sent: Tuesday, June 20, 2006 2:27 PM
Subject: [Zope] How to commit a piece of data in a transaction when 
thetransaction is being aborted later



I am dealing with a zope system where Verisign is sending a POST to our 
server

for ecommerece purposes. Currently I am writing the entire contents of the
POST from verisign to the ZODB however I have a problem that some of these
POSTs are not being recorded because an error occurs later in the
transaction.

What I would like to do is isolate this recording from everything else. So
that no matter what other error is raised that part will commit so I have 
a

record of the conversation later.

Currently I can put the logging step as the very first step in the
conversation with verisign and call get_transaction().commit() (I am
currently using zope 2.7 and working on the migration to zope 2.9)

What would be the best way to deal with this problem? Should I just do a
commit of the transaction as the very first step so that part is written 
and
then zope will start a new transaction for the rest of the stuff done? 
Should

I somehow tell zope to run a certain function as its own transaction? Also
when I switch over to zope 2.9 how will these things need to be changed?


You could write the post data to a 'non-rollbackable' sql database, then any 
subsequent processing errors won't impact the data you have already written 
to the sql db.



Jonathan 


___
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 )


Re: [Zope] How to commit a piece of data in a transaction when the transaction is being aborted later

2006-06-20 Thread William Heymann
On Tuesday 20 June 2006 12:47, Chris McDonough wrote:


 I'd just record the data from Verisign in response to their POST (do
 nothing else) and come along later with a separate request to pick
 through the data to do postprocessing on it every so often; then the
 data always gets recorded and you can deal with errors in your
 postprocessing without needing to manage transaction state manually.
 ClockServer can help with the do something every so often aspect of
 this.


That is probably a good idea for long term to change things that way and I 
would like to rewrite it. However right now I don't really want to rewrite 
the way the current system works. I had hoped I could just use 
get_transaction().commit() almost immediately after seeing the data from 
Verisign. 

I do like the idea of ClockServer though and I will probably start playing 
with it soon to see how it will work for me. Does it work with zope 2.9 also?

Thanks
___
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 )


Re: [Zope] How to commit a piece of data in a transaction when the transaction is being aborted later

2006-06-20 Thread Chris McDonough

On Jun 20, 2006, at 2:55 PM, William Heymann wrote:
That is probably a good idea for long term to change things that  
way and I
would like to rewrite it. However right now I don't really want to  
rewrite

the way the current system works. I had hoped I could just use
get_transaction().commit() almost immediately after seeing the data  
from

Verisign.


Sure, you can do this, although the new spelling is import  
transaction; transaction.commit().  I guess the only real problem  
with doing this is that you don't always know exactly what you're  
committing if you can't guarantee a fixed starting point as an  
invariant (e.g. if you kick off the method that does this *not* as a  
result of a request from Verisign).  It might also be a little  
confusing for Verisign to get an error response from your server  
sometimes but not other times even though you record the info  
regardless of the eventual response, but maybe they don't attempt to  
retry failed requests.




I do like the idea of ClockServer though and I will probably start  
playing
with it soon to see how it will work for me. Does it work with zope  
2.9 also?


Yes.  It will ship with 2.10.

- C

___
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 )