Re: [Zope] Squid & ESI

2006-01-30 Thread Martijn Pieters
On 1/30/06, Andrew Langmead <[EMAIL PROTECTED]> wrote:
> I wasn't involved in the Squid3/ESI work done at boston.com before,
> so I don't know if there are any issues beyond the ones I resolved in
> getting things to build.

At the time I was involved the implementation came up short of
anything useful and was prone to crashing the server. 2 of the bugs I
filed at the time are still listed as 'open', and IIRC I didn't get
round to filing a bug for everything I found (I communicated those to
Robert directly). Here are the open bugs:

  http://www.squid-cache.org/bugs/show_bug.cgi?id=652
  http://www.squid-cache.org/bugs/show_bug.cgi?id=656

--
Martijn Pieters
___
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] Product refreshing in Zope 2.9

2006-01-30 Thread Dieter Maurer
Peter Bengtsson wrote at 2006-1-30 18:54 +:
>I've noticed another strange behaviour with the Acquisition module in
>Zope 2.9 that might give us some clues as to why refreshing doesn't
>work.
>
>Imagine some code that looks like this::
>
>from Acquisition import aq_parent
>
>class MyProduct(Folder):
>def index_html(self):
>print type(aq_parent) is None
>return "Hello World!"
>
>The first time I run this, it prints "False" to stdout because
>ac_parent is of course a function.
>BUT, if I refresh the product (no change made to the source) and run
>this index_html() again it instead prints "True" because ac_parent has
>become None.
>Isn't that odd?

Indeed, especially because no type can be "None"!

It is known that refreshing (more generally reloading a Python module)
can cause objects apparently becoming "None".
This happens because the variables defined in the old module
instance are rebound to None when the module is released.

This would explain that "aq_parent" in your "index_html" would
appear as None if you happen to access an object still associated
with the old class. However, the type of "None" is "NoneType" and
not "None".


I do not yet know what magic can cause "type(aq_parent)"
(which usually is ")
to become "None".


As written earlier: refreshing is essentially a Python feature
(delete a set of modules from "sys.modules", then reimport some of
them again) rather than a Zope feature.
It should be possible to reproduce your weird observations
with Python operations only.
I tried but was not yet able to reproduce it (I still use Zope 2.8
(but that should not matter) and Python 2.4.1).

-- 
Dieter
___
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] Setting up Zope in a development/production environment

2006-01-30 Thread Igor Stroh
Qass wrote:
 
> The way our current website works is via changes made in a sandbox
> area and then using CVS moved to a staging area (same server as
> sandbox). After approval of changes visible in the staging area, the
> changes are then, using CVS, moved to the production server (different
>  from staging server) where they're visible on the public website.
> 
> Now Zope/Plone use the various permission controls to mimic the above
> but I would like to find out how to create the above
> design/staging/production environment using Zope/Plone.

There's a versioning/staging solution for CMF/Plone which needs some
work though. I don't know what shape the CMFStaging Product is currently
in, but PloneStaging is ways out of date. If you'd like to use it - prepare
to invest some time :)

http://svn.zope.org/CMF_Extras/trunk/CMFStaging/ (needs ZopeVersionControl)
http://cvs.sourceforge.net/viewcvs.py/collective/PloneStaging/

HTH,
Igor
___
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] zserver-threads

2006-01-30 Thread Jens Vagelpohl


On 30 Jan 2006, at 22:43, Einar Næss Jensen wrote:


how many do I need, and how will I know?


You do not need to worry about it unless you have a really unusual  
setup. The default is fine for 99.9% of all situations.


jens

___
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] zserver-threads

2006-01-30 Thread Einar Næss Jensen
how many do I need, and how will I know?

--
--
Einar Næss Jensen
http://einar.nidelven-it.no/einarblog
http://www.homemade.no
tlf: +47 90990249
___
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] Squid & ESI

2006-01-30 Thread Andrew Langmead


On Jan 30, 2006, at 1:16 PM, Chris Withers wrote:

Perhaps you could write a short how-to describing the exact  
versions you used? Both myself and Jens had little joy with this...



I just managed to build myself an ESI enabled Squid3 with the  
following configure invocation. It is based roughly on the example on  
longsleep.org,but it removes the ssl module and adds  one critically  
needed adjustment of specifying libxml2


env CXXFLAGS="`xml2-config --cflags`"   CFLAGS="$CXXFLAGS"   
LDFLAGS="`xml2-config --libs`"  sh configure --prefix=/usr/local/ 
squid3 --enable-gnuregex -with-pthreads --enable-esi --enable- 
storeio=ufs,aufs --with-aufs-threads=10 --enable-useragent-log -- 
enable-referer-log  --enable-x-accelerator-vary --with-dl


make

sudo make install

Getting the SSL module to work seemed to require one small adjustment  
to to the source in src/client_side.cc . I'll try to get a patch to  
configure.in together so that the correct paths are recognized  
automatically.


I wasn't involved in the Squid3/ESI work done at boston.com before,  
so I don't know if there are any issues beyond the ones I resolved in  
getting things to build. 
___

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] Setting up Zope in a development/production environment

2006-01-30 Thread Qass
Hi:

The way our current website works is via changes made in a sandbox
area and then using CVS moved to a staging area (same server as
sandbox). After approval of changes visible in the staging area, the
changes are then, using CVS, moved to the production server (different
 from staging server) where they're visible on the public website.

Now Zope/Plone use the various permission controls to mimic the above
but I would like to find out how to create the above
design/staging/production environment using Zope/Plone.

Thanks.

Q
___
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: Re: dealing with scripts that take too long

2006-01-30 Thread martin f krafft
also sprach Chris Withers <[EMAIL PROTECTED]> [2006.01.30.1854 +0100]:
> My suggestion would be to use ZEO and Stepper...

Oooh, this is definitely worth a closer inspection. Thanks a lot.

-- 
martin;  (greetings from the heart of the sun.)
  \ echo mailto: !#^."<*>"|tr "<*> mailto:"; [EMAIL PROTECTED]
 
invalid/expired pgp (sub)keys? use subkeys.pgp.net as keyserver!
spamtraps: [EMAIL PROTECTED]
 
"we are trapped in the belly of this horrible machine,
 and the machine is bleeding to death."
-- godspeed you black emperor!


signature.asc
Description: Digital signature (GPG/PGP)
___
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] empty session with virtual hosting

2006-01-30 Thread Martijn Pieters
On 1/30/06, Luca Dall'Olio <[EMAIL PROTECTED]> wrote:
> I have a Zope 2.9.0 installation under Solaris.
> When I access the Zope site directly (port 8080) the session has the
> keys I expect, but when I try to do the same using the virtual host
> (port 80 has apache that rewrites to the zope installation) the session
> is empty.
>
> Do you have any hint about this behaviour ?

Sounds like you have your Apache setup misconfigured, and it is not
passing along the cookies. Use a Firefox extension like
LiveHTTPHeaders or the Web Developer Toolbar to see what Cookie
headers are being sent back and forth to see if Apache is handling
things correctly. Or you can use a logging proxy like
http://hathawaymix.org/Software/TCPWatch to see what goes on between
Apache and Zope and/or between Apache and your browser to detect
problems.

By default the session cookie is called _ZopeId

--
Martijn Pieters
___
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] Squid & ESI

2006-01-30 Thread Chris Withers

Andrew Sawyers wrote:

Yes it works; we have some stuff working here at my place of employment.
I had some problems getting the right squid build to work last year when
looking at this for a customer, but since the team here has had no
problems that I'm aware of with current builds.


Perhaps you could write a short how-to describing the exact versions you 
used? Both myself and Jens had little joy with this...


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 )


Re: [Zope] Sudden Errors

2006-01-30 Thread Chris Withers

David Ayres wrote:

I removed the Local File System object that had been created by using
'manage_delObjects?ids=' and the errors are gone. However, has anyone run
into this problem before?


What version of Zope are you using?

My guess would be that LocalFS isn't compatible with the version of Zope 
you're using...


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 )


Re: [Zope] Re: dealing with scripts that take too long

2006-01-30 Thread Chris Withers

martin f krafft wrote:

also sprach Jonathan <[EMAIL PROTECTED]> [2006.01.25.2330 +0100]:
We are running a *nix environment, and use cron with script files that use 
either perl LWP or CURL to make http requests that invoke the zope 
methods/scripts. LWP, CURL (and others) give you the ability to control the 
timeout parameters.


So does wget. The problem is that our users are on Windows machines
without access to or knowledge of a Unix prompt. Thus, NPH would be
a nice way to go about it.


My suggestion would be to use ZEO and Stepper...

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 )


Re: [Zope] Product refreshing in Zope 2.9

2006-01-30 Thread Dieter Maurer
Lennart Regebro wrote at 2006-1-30 15:18 +0100:
> ...
>Personally I haven't had a situation trivial enough for refresh to
>work for years...

As I reported earlier, all that is needed is a small tool
to allows to register product dependencies and that, when
one product is refreshed, automatically refreshes all dependent
products as well. Works very well and speeds up product
development significantly.

-- 
Dieter
___
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] Product refreshing in Zope 2.9

2006-01-30 Thread Dieter Maurer
Peter Bengtsson wrote at 2006-1-30 13:57 +:
> ...
>> "reloaded but not refreshed" means what?
>>
>Suppose my code looks like this::
>
> class MyProduct(Folder):
>  blablabla
> print "class MyProduct has just been reloaded"
>
>Then I start zope with ./bin/runzopt, debug-mode off, make a change in
>the product and press the Refresh button in the Control_Panel and
>notice how it prints
>'class MyProduct has just been reloaded' to stdout but the change I've
>made does not happen. A quick restart of Zope makes the change happen.
>That's what I meant.

Maybe, they forgot to flush the ZODB caches (in this case,
old objects remain in the ZODB cache which still reference the old
classes) or the "resetCaches" function no longer works in ZODB 3.6?

Have a look at the sources...

-- 
Dieter
___
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] Sudden Errors

2006-01-30 Thread Dieter Maurer
David Ayres wrote at 2006-1-29 17:20 -0500:
>I removed the Local File System object that had been created by using
>'manage_delObjects?ids=' and the errors are gone.

For future reference: When you report problems, your *MUST* include
the corresponding traceback (found in the "error_log" object in
Zope's "Root Folder").

>However, has anyone run
>into this problem before?

Yes. Almost surely, you fetched a "LocalFS" version no longer compatible
with Zope 2.7.x.
You need a "LocalFS-Andreas" (or similar) version to work with Zope 2.7.x
and above.

-- 
Dieter
___
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] zopectl not starting properly

2006-01-30 Thread Jens Vagelpohl


On 30 Jan 2006, at 19:03, sharif islam wrote:


When I run zopectl start, it says daemon process started. But I get
connected refused when I try to go to port 8080. Then if I check the
process, I find zope is not running


You can get more debugging output by running it in the foreground:

./zopectl fg

It does not detach from the controlling terminal, but will tell you  
more about what's wrong.


jens

___
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] Product refreshing in Zope 2.9

2006-01-30 Thread Peter Bengtsson
On 1/30/06, Andreas Jung <[EMAIL PROTECTED]> wrote:
>
>
> --On 30. Januar 2006 17:39:11 + Peter Bengtsson <[EMAIL PROTECTED]>
> wrote:
> >
> > It's not a strange product. It's quite simple in fact.
> > Not being able to refresh without restarting means that I can't use
> > Zope 2.9 for python product development.
>
> Why is refresh a requirement for doing Zope development? I am doing Zope
> development since five or six years and I have never done any development
> using Refresh...so there must be something very special with your
> development approach?!
>
Sorry. It's not a _requirement_. But without it I loose productivity.
(see my previous email on this topic with the human benchmark,
ValueErrors and lost SESSIONS).

I too have several years of zope programming beyond the ZMI and have
developed many products and refreshing is the only way I know to
quickly test changes.
Having to wait a few seconds for each test is not an option.

How do you solve this problem without refreshing? Or are you ready to
wait for the zope restart and avoid it by writing more unit tests?


--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
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] Product refreshing in Zope 2.9

2006-01-30 Thread Peter Bengtsson
I've noticed another strange behaviour with the Acquisition module in
Zope 2.9 that might give us some clues as to why refreshing doesn't
work.

Imagine some code that looks like this::

from Acquisition import aq_parent

class MyProduct(Folder):
def index_html(self):
print type(aq_parent) is None
return "Hello World!"

The first time I run this, it prints "False" to stdout because
ac_parent is of course a function.
BUT, if I refresh the product (no change made to the source) and run
this index_html() again it instead prints "True" because ac_parent has
become None.
Isn't that odd?

Again, this is easily reproducable with
http://www.peterbe.com/zope/2.9-refresh-reproduction/MyProduct.tgz

Any idea anyone?



On 1/27/06, Dieter Maurer <[EMAIL PROTECTED]> wrote:
> Peter Bengtsson wrote at 2006-1-27 16:42 +:
> > ...
> >But, in that example they are using Five and I'm not. I've just got a
> >Zope 2.9 install and a python product that I started on before Five
> >even existed. Does that give us any hope for non-Five python products?
> >Anybody?
>
> I cannot believe that they were able to break refreshability
> of "normal" (non Five) products.
>
> Refreshing essentially works by removing the modules belonging
> to the product from "sys.module" and then reimporting the product.
>
> This may fail when product defined objects are held in registries
> (such as adapters) and are not overridden when the product is
> reimported. Maybe, such cases occur often with Five.
>
> Without Five, it is rather rare (product objects are often registered
> but usually, the reimport overrides the old no longer working entries).
>
> >I've tried pressing the little "Refresh" button in Control_Panel and
> >sure enough, the product is reloaded (I put some print statements in
> >the .py file) but not refreshed.
>
> "reloaded but not refreshed" means what?
>
> --
> Dieter
>


--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
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] empty session with virtual hosting

2006-01-30 Thread Luca Dall'Olio

I have a Zope 2.9.0 installation under Solaris.
When I access the Zope site directly (port 8080) the session has the
keys I expect, but when I try to do the same using the virtual host
(port 80 has apache that rewrites to the zope installation) the session
is empty.

Do you have any hint about this behaviour ?

thank you in advance! Luca

___
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] zopectl not starting properly

2006-01-30 Thread sharif islam
When I run zopectl start, it says daemon process started. But I get
connected refused when I try to go to port 8080. Then if I check the
process, I find zope is not running.
[root@ bin]# ./zopectl start
/usr/local/Zope-2.9.0/lib/python/App/ImageFile.py:21:
DeprecationWarning: Using OFS.content_types is deprecated (will be
removed in Zope 2.11). Instead use zope.app.contenttypes.
 from OFS.content_types import guess_content_type
. daemon process started, pid=4235
[EMAIL PROTECTED] ps -eaf|grep zope
root  4234 1  0 12:56 ?00:00:00 /usr/local/bin/python
/usr/local/Zope-2.9.0/lib/python/zdaemon/zdrun.py -S
/usr/local/Zope-2.9.0/lib/python/Zope2/Startup/zopeschema.xml -b 10 -d
-s /www/zope/var/zopectlsock -x 0,2 -z /www/zope /www/zope/bin/runzope
root  4245  3815  0 12:56 pts/200:00:00 grep zope
[root@ bin]# ps -eaf|grep zope
root  4248  3815  0 12:57 pts/200:00:00 grep zope


[root@ bin]# ./zopectl
/usr/local/Zope-2.9.0/lib/python/App/ImageFile.py:21:
DeprecationWarning: Using OFS.content_types is deprecated (will be
removed in Zope 2.11). Instead use zope.app.contenttypes.
 from OFS.content_types import guess_content_type
program: /www/zope/bin/runzope
daemon manager not running
zopectl> start
. daemon process started, pid=4252
zopectl> status
program running; pid=4253
zopectl> status
daemon manager running; daemon process not running

any clue? I am running Zope 2.90 wtih python 2.4.2
___
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] Re: Product refreshing in Zope 2.9

2006-01-30 Thread Peter Bengtsson
For those interested I've put together a little basic zope python product here:
http://www.peterbe.com/zope/2.9-refresh-reproduction/MyProduct.tgz

To reproduce the refreshing problem:
install this product,
start zope,
change something in the index_html() method,
go to /Control_Panel/Products/MyProduct/manage_refresh,
press refresh,
and notice how the change doesn't take effect,
restart zope and notice how that's the only way to refresh.

About the importance of this... See below

> >
> > That's not good enough. The only thing that changed between my
> > development environments was the version of zope and then it stopped
> > working. Python product refresh is crucial to zope2 and this problem
> > needs to be sorted out.
>
> I don't agree that refresh is "crucial": refresh has always had "best
> effort" semantics, which leads many experienced Zope2 developers never
> to use it at all.  Through bitter experience, they have learned that
> when refresht fails (silently), they have found that the hours spent
> figuring out why the application's behavior changed are much more
> expensive than the time it takes enter '' in the
> zopectl shell.
>

I've got fresh install of zope2.9 on my half-decent thinkpad with few
but very light products (no CMF, Plone or TextIndexNG). A restart
takes about 3-5 seconds buy human stopwatch.
A product refresh in the Control Panel takes less than 1 second.

The whole story is that I never use the Control_Panel manually; I have
a spinning script that uses inotify on changes and visit the control
panel programmatically using ZPublisher.Client
I don't use auto-refresh on changes because of the risk of getting
those strange ValueError's from the session machinery. And by the way,
a zope restart makes you loose your SESSION.

Point is, to **ME** product refreshing is much much more productive
that zope restarts.

> You'd be better off lobbying for faster restart times, including
> especially the third party products you use (a "stock" Zope restarts
> *very* quickly).
>




--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
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] Product refreshing in Zope 2.9

2006-01-30 Thread Lennart Regebro
On 1/30/06, Peter Bengtsson <[EMAIL PROTECTED]> wrote:
> It's not a strange product. It's quite simple in fact.
> Not being able to refresh without restarting means that I can't use
> Zope 2.9 for python product development.

Explain "Can't". I have developed complex products where the Refresh
hasn't worked since it was integrated into Zope core, which was like,
2.4 or something. I can still use Zope for Python product development.

Yes, a working refresh would have made it faster, no doubt. But it's
in no means impossible.

> It could just be something
> weird with my setup, but it could also be a bug in zope 2.9 which I'm
> happy to try to solve by participating in the discussion.

Yeah, well I would be very happy if the refresh could be improved, but
sadly I don't understand it well enough, and those who do doesn't seem
to care about improving it.

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
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] Product refreshing in Zope 2.9

2006-01-30 Thread Andreas Jung



--On 30. Januar 2006 17:39:11 + Peter Bengtsson <[EMAIL PROTECTED]> 
wrote:


It's not a strange product. It's quite simple in fact.
Not being able to refresh without restarting means that I can't use
Zope 2.9 for python product development.


Why is refresh a requirement for doing Zope development? I am doing Zope 
development since five or six years and I have never done any development
using Refresh...so there must be something very special with your 
development approach?!


-aj


pgpWssAsoT56o.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] Product refreshing in Zope 2.9

2006-01-30 Thread Peter Bengtsson
On 1/30/06, Jens Vagelpohl <[EMAIL PROTECTED]> wrote:
>
> On 30 Jan 2006, at 15:01, Peter Bengtsson wrote:
> > That's not good enough. The only thing that changed between my
> > development environments was the version of zope and then it stopped
> > working. Python product refresh is crucial to zope2 and this problem
> > needs to be sorted out.
>
> I'm calling bullshit on this one. How is it "crucial"? A product that
> introduces its own strange problems cannot be called "crucial".
> Unless you're now signing up to support it and keep it working.
>

It's not bullshit. Bullshit is usually when you say something that isn't true.

It's not a strange product. It's quite simple in fact.
Not being able to refresh without restarting means that I can't use
Zope 2.9 for python product development. It could just be something
weird with my setup, but it could also be a bug in zope 2.9 which I'm
happy to try to solve by participating in the discussion.

PS. I'm working on a dummy product that other zope core developers can
download that I can refer to for pointing out the bug. Watch this
space.

--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
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] Squid & ESI

2006-01-30 Thread Andrew Sawyers
Yes it works; we have some stuff working here at my place of employment.
I had some problems getting the right squid build to work last year when
looking at this for a customer, but since the team here has had no
problems that I'm aware of with current builds.

Andrew
On Thu, 2006-01-26 at 19:44 +, Chris Withers wrote:
> Alan Milligan wrote:
> > We haven't had any problems in building Squid-3.x images
> 
> ...with ESI enabled?
> 
> > I've also heard of at least one other abandoned Squid3 rollout, and it's
> > quite possible that without Robert's participation, Squid3 isn't really
> > production strength.
> 
> Yup, that and Squid 3's "not production quality" status makes the whole 
> Squid/ESI thing a total non-starter, which is a shame...
> 
> ...but I do wish, as a result, that people would stop touting it as a 
> way to scale Zope apps.
> 
> cheers,
> 
> Chris
> 

___
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: Product refreshing in Zope 2.9

2006-01-30 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Peter Bengtsson wrote:
> On 1/30/06, Tino Wildenhain <[EMAIL PROTECTED]> wrote:
> 
>>Peter Bengtsson schrieb:
>>
>>>Suppose my code looks like this::
>>>
>>> class MyProduct(Folder):
>>>  blablabla
>>> print "class MyProduct has just been reloaded"
>>>
>>>Then I start zope with ./bin/runzopt, debug-mode off, make a change in
>>>the product and press the Refresh button in the Control_Panel and
>>>notice how it prints
>>>'class MyProduct has just been reloaded' to stdout but the change I've
>>>made does not happen. A quick restart of Zope makes the change happen.
>>>That's what I meant.
>>
>>Better your zLog or log instead of print.
>>
>>The refresh works most of the times - but its really a very bad hack
>>and does not garanty for anything. If it does not work for your
>>product you need to restart.
>>
> 
> That's not good enough. The only thing that changed between my
> development environments was the version of zope and then it stopped
> working. Python product refresh is crucial to zope2 and this problem
> needs to be sorted out.

I don't agree that refresh is "crucial": refresh has always had "best
effort" semantics, which leads many experienced Zope2 developers never
to use it at all.  Through bitter experience, they have learned that
when refresht fails (silently), they have found that the hours spent
figuring out why the application's behavior changed are much more
expensive than the time it takes enter '' in the
zopectl shell.

You'd be better off lobbying for faster restart times, including
especially the third party products you use (a "stock" Zope restarts
*very* quickly).


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFD3kjz+gerLs4ltQ4RAjI4AKDTUztzqizXkq1lha3ybk4mYfm3zgCeIzBV
01ChW3psdF86+Mp/90Cj3zk=
=hrPZ
-END 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] Product refreshing in Zope 2.9

2006-01-30 Thread Jens Vagelpohl


On 30 Jan 2006, at 15:01, Peter Bengtsson wrote:

That's not good enough. The only thing that changed between my
development environments was the version of zope and then it stopped
working. Python product refresh is crucial to zope2 and this problem
needs to be sorted out.


I'm calling bullshit on this one. How is it "crucial"? A product that  
introduces its own strange problems cannot be called "crucial".  
Unless you're now signing up to support it and keep it working.


jens

___
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] Product refreshing in Zope 2.9

2006-01-30 Thread Peter Bengtsson
On 1/30/06, Tino Wildenhain <[EMAIL PROTECTED]> wrote:
> Peter Bengtsson schrieb:
>
> > Suppose my code looks like this::
> >
> >  class MyProduct(Folder):
> >   blablabla
> >  print "class MyProduct has just been reloaded"
> >
> > Then I start zope with ./bin/runzopt, debug-mode off, make a change in
> > the product and press the Refresh button in the Control_Panel and
> > notice how it prints
> > 'class MyProduct has just been reloaded' to stdout but the change I've
> > made does not happen. A quick restart of Zope makes the change happen.
> > That's what I meant.
>
> Better your zLog or log instead of print.
>
> The refresh works most of the times - but its really a very bad hack
> and does not garanty for anything. If it does not work for your
> product you need to restart.
>
That's not good enough. The only thing that changed between my
development environments was the version of zope and then it stopped
working. Python product refresh is crucial to zope2 and this problem
needs to be sorted out.


--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
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] Product refreshing in Zope 2.9

2006-01-30 Thread Lennart Regebro
On 1/30/06, Peter Bengtsson <[EMAIL PROTECTED]> wrote:
>  class MyProduct(Folder):
>   blablabla
>  print "class MyProduct has just been reloaded"
>
> Then I start zope with ./bin/runzopt, debug-mode off, make a change in
> the product and press the Refresh button in the Control_Panel and
> notice how it prints
> 'class MyProduct has just been reloaded' to stdout but the change I've
> made does not happen. A quick restart of Zope makes the change happen.
> That's what I meant.

You also need to reload all products that import this product, and (as
I think was mentioned before) if you use any kind of global registy it
will most likely fail.

Personally I haven't had a situation trivial enough for refresh to
work for years...
--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
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] Product refreshing in Zope 2.9

2006-01-30 Thread Tino Wildenhain

Peter Bengtsson schrieb:


Suppose my code looks like this::

 class MyProduct(Folder):
  blablabla
 print "class MyProduct has just been reloaded"

Then I start zope with ./bin/runzopt, debug-mode off, make a change in
the product and press the Refresh button in the Control_Panel and
notice how it prints
'class MyProduct has just been reloaded' to stdout but the change I've
made does not happen. A quick restart of Zope makes the change happen.
That's what I meant.


Better your zLog or log instead of print.

The refresh works most of the times - but its really a very bad hack
and does not garanty for anything. If it does not work for your
product you need to restart.

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] Product refreshing in Zope 2.9

2006-01-30 Thread Peter Bengtsson
On 1/27/06, Dieter Maurer <[EMAIL PROTECTED]> wrote:
> Peter Bengtsson wrote at 2006-1-27 16:42 +:
> > ...
> >But, in that example they are using Five and I'm not. I've just got a
> >Zope 2.9 install and a python product that I started on before Five
> >even existed. Does that give us any hope for non-Five python products?
> >Anybody?
>
> I cannot believe that they were able to break refreshability
> of "normal" (non Five) products.
>
> Refreshing essentially works by removing the modules belonging
> to the product from "sys.module" and then reimporting the product.
>
Ok. Still quite clueless on how to debug it. I'll see what I can do
with some greps and various print statements.

> This may fail when product defined objects are held in registries
> (such as adapters) and are not overridden when the product is
> reimported. Maybe, such cases occur often with Five.
>
> Without Five, it is rather rare (product objects are often registered
> but usually, the reimport overrides the old no longer working entries).
>
> >I've tried pressing the little "Refresh" button in Control_Panel and
> >sure enough, the product is reloaded (I put some print statements in
> >the .py file) but not refreshed.
>
> "reloaded but not refreshed" means what?
>
Suppose my code looks like this::

 class MyProduct(Folder):
  blablabla
 print "class MyProduct has just been reloaded"

Then I start zope with ./bin/runzopt, debug-mode off, make a change in
the product and press the Refresh button in the Control_Panel and
notice how it prints
'class MyProduct has just been reloaded' to stdout but the change I've
made does not happen. A quick restart of Zope makes the change happen.
That's what I meant.

--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
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] Zope and OAI-PMH

2006-01-30 Thread Martijn Faassen

Luciano Ramalho wrote:

I've been assigned to integrate an existing academic portal in Plone
with the OAI-PMH protocol as a data provider. Searching through this
list I found the message below, but no response.


Note that the oaipmh Python module in 2.0 form (pyoai) now has 
facilities to build OAI-PMH compliant servers, i.e. data providers, not 
just harvesting.


You can find the module here:

http://www.infrae.com/download/oaipmh

You'd have to do the integration of this into Zope 2 yourself though 
(unless you hire us :).


Regards,

Martijn
___
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] context and URLs

2006-01-30 Thread Lennart Regebro
On 1/29/06, Peter Bengtsson <[EMAIL PROTECTED]> wrote:
> Instead of writing links like this::
>
>  object
>
> write them like this::
>
>  object

Or, in 99% of the cases, you can simply say

object

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
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: Zope 2.8.x and python security audit

2006-01-30 Thread Maik Ihde

> The system has to be determined in every way and every step must be
> reversible and traceable.

Humm. Then you might want go for Zope3. Afaik Christian Theune also did some
work to have Zope3 certified by TÜV Germany. But unfortunately I do not know at
which point they are.

If you want the above then I would think twice about using Plone, though. SCNR

Regards
Maik


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