[Zope-dev] CopySupport and cookies

2006-02-02 Thread Seb Bacon
Hi,

Using inside-out virtual hosting (and other forms of URL munging) can
make copy-and-paste break.  For example, an object a.b.c addressed as

 http://foo.com/magic-string/a/b/c

will not be copiable because CopySupport uses BASEPATH1 as the Cookie path:

 def cookie_path(request):
 # Return a path value for use in a cookie that refers
 # to the root of the Zope object space.
 return request['BASEPATH1'] or /

is there a good reason why this can't just return / as the cookie path?

Seb

-- 

   [] j a m k i t
 web solutions for charities

seb bacon
T:  020 7549 0520
F:  020 7490 1152
M:  07968 301 336
W: www.jamkit.com


___
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: Demonstration subversion repository created

2004-05-07 Thread Seb Bacon
Yves Moisan wrote:
A bit off topic here : browsing the repository, I thought it would be 
nice if svn://svn.zope.org/repos/main/Zope3/trunk could be recognized as 
a protocol by Mozilla.  
http://protozilla.mozdev.org/

seb

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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, CMS, IDEs

2004-04-23 Thread Seb Bacon
Joachim Werner wrote:
I've proposed that a couple of times already. There are two problems in real 
life: 
 
1) Somebody has to take care of managing the project. 

2) If politics take over, things will quickly fall apart.
I agree.  I hope that Heimo  Paul's session at EP will help work 
through some solutions to these points.

I disagree that performance is a problem in Zope 2. 

I've heard that a couple of times. But let's face it: Of course you can get 
Zope to deliver partly dynamic pages at high speed and if you use caching you 
can deliver pages at wire speed, but it will not be nearly as fast as a 
solution using Java or .NET/C# if we are talking about a lot of two-way 
traffic and CPU-intensive tasks in the back end, e.g. an online shopping mall, 
a booking system, or a groupware.
Well, the site I am talking about is a real-world, huge-traffic, highly 
dynamic, personalised shopping site and multiple bookings system which 
gets millions of visits a day.  It performs very well under extreme load 
in test conditions, *even when you take squid out*: better than the 
previous Java solution.

I would take this as a pretty good indication that performance need not 
be an issue when evaluating Zope.  Let's face it: there are plenty of 
badly-performing Java sites out there ;-)

I do agree that it is hard to find best practice information about this 
subject, though.  I am planning to do a talk about it at Europython.  If 
Chris M doesn't mind, I'll be using some of his material, and 
elaborating on it:

  http://www.plope.org/misc/szweb

The reason the Zope site I'm talking about performs better, IMO, is 
nothing to do with the language, but to do with (a) the better 
application design and (b) the ease of scaling horizontally with ZEO.

seb

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 )


Zope3, CMS, IDEs (was: [Zope-dev] The bleak Future of Zope?)

2004-04-22 Thread Seb Bacon
Joachim Werner wrote:
There are quite a few Zope-based CMS solutions out there, and most of 
them are better than their commercial counterparts in many respects. But 
if we had managed to start a joint CMS effort (other than CMF, which is 
a failure by design) two or three years ago things would look even 
better now.
It would be great to start something like a Zope3 CMS interest group up, 
to pool all our CMS experience - start collecting requirements, etc. 
Seems like a mighty large task, though :-)

I'd like to at least have a session on this topic at Europython.

What we should work on in the future is development tools for Zope. If I 
get the stuff I know about Zope 3 right it should be relatively easy to 
write IDEs (or plugins for existing IDEs)...
I know it's said to be slow, but Eclipse has some pretty major momentum 
behind it... has anyone round here looked at it in detail?  I guess it 
requires you to write loads of Java to produce new plugins :-(

Finally we need industry-strength performance. 
 We are just lacking the performance (mostly thanks
to Python being a beautiful, but not really fast language).
I disagree that performance is a problem in Zope 2.  With a combination 
of profiling to eliminate bottlenecks, ZEO, and Squid, Zope hums along 
beautifully.  We are consulting for a company that is in the process of 
replacing their Java front-end with Zope.  They have huge amounts of 
traffic, and are impressed with Zope's performance compared with their 
comparable Java system.

Seb

P.S. I don't agree with your pessimistic assessment of CMF, or Plone. 
They're both good at what they do.

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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: The bleak Future of Zope?

2004-04-21 Thread Seb Bacon
Personally, I think Zope3 has a great future, and will pick up a much 
larger community than Zope2 ever did, because it's better designed and 
better documented.

In general, the people who stand to gain immediately (or pretty soon) 
from Zope3 are enthusiasts; newcomers; and ZC.

However, if the process of moving away from Zope2 is not managed very 
carefully and slowly, the people who stand to lose are companies that 
already rely on Zope2.  I agree that the solution is probably to allow 
the community more control over the release cycle, web site, and 
repository.  We could follow various other models from elsewhere in the 
OSS world, and see what happens.

I believe that ZC's apparent reticence on this is because they are 
(understandably) interested in preserving control over their brand, 
which overlaps rather largely with the software.

What would be helpful is a definitive statement from ZC as to whether 
they would consider relinquishing some of their control over Zope 2. 
Perhaps, instead of a code fork, we could have a brand fork, with a 
different website, a different name, and a different release schedule 
(think Fedora?)

Seb

Andreas Jung wrote:
From my own prospective as developer I would like to see that Z2
development over the next
two or three years continues because there is too much Z2 legacy code in 
the world and not
everyone is interested in following the migration path for Z3. To be 
honest I doubt that large
custom applications can be migrated with a justifiable amount of time 
and money (just because
they are completely bound to Z2 components and its architecture).

To clarify my standpoint: I am not an opponent of Zope3 but Zope 3 does 
not convince me
in the current stage and gives me little attraction for the projects I 
am working onit just can
not compete with Zope 2 if you are building large-scale systems at this 
time.

Andreas

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] TAL i18n breakage in 2.7

2004-02-19 Thread seb bacon
Hi,

Zope 2.7 introduced a change in its translation interface.  Previously a
translation service could return None, but now returning None causes an
assertion error.

http://cvs.zope.org/Zope/lib/python/TAL/TALInterpreter.py.diff?r1=1.77r2=1.78

This will break applications (e.g. Plone1) which use Nuxeo's
TranslationService, which does return None.  Is there a good reason for
introducing this compatibility breakage?

seb

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] TAL i18n breakage in 2.7

2004-02-19 Thread seb bacon
On Thu, Feb 19, 2004 at 09:10:30AM -0500, Stephan Richter wrote:
 On Thursday 19 February 2004 08:08, seb bacon wrote:
  Zope 2.7 introduced a change in its translation interface.  Previously a
  translation service could return None, but now returning None causes an
  assertion error.
 
  http://cvs.zope.org/Zope/lib/python/TAL/TALInterpreter.py.diff?r1=1.77r2=1
 .78
 
 That is strange. The Zope 3 translation service can also still return None and 
 we use the same TAL code. I cannot see which code change would not handle the 
 None.

The new implementation would appear to expect the service to return the
default value passed in, instead of None.

From the diff linked to above:

r1.77 has:

  xlated_msgid = self.translate(msgid, i18ndict, obj)
 # If there is no translation available, use evaluated content.
 if xlated_msgid is None:
# do some stuff

r1.78 has:

  xlated_msgid = self.translate(msgid, default, i18ndict, obj)
  assert xlated_msgid is not None, self.position

seb



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] ZCatalog fast as admin, dog slow as anonymous and other users

2004-01-30 Thread Seb Bacon
Jason Spisak wrote:
Zopistas,

My ZCatalog is fast as admin, but dog slow as anonymous and other users. 
 Anyone had this same experience?  Details:
This is certainly to do with queries which run against FieldIndexes only 
for anonymous users.  This is something the CMF does (e.g. expires and 
effective dates only applied for anonymous).

FieldIndexes are really bad for DateTimes.  Delete your date-related 
FieldIndexes and replace them with DateIndexes.

seb

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] KeywordIndex performance / multiunion

2003-11-07 Thread Seb Bacon
Tim Peters wrote:
[Seb Bacon]

But main the reason I'm posting is to wonder if there any reason not
to use the multiunion operator instead of the union operator in
UnIndex.py... it should be faster, right?  It seems a touch faster in
some informal tests.


[Casey Duncan]

Yes, it probably should be used. I think it is much faster when
unioning very small and very large sets as well. Tim would know
better, tho.


time.clock() knows best wink.
I asked time.clock(), and it says the difference between union and 
multiunion is not statistically significant in my scenario (7 sets of 
27k catalog data record ids, with about 25k in the intersection of all 7).

So I'm not going to bother changing this in UnIndex.

Seb



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] KeywordIndex performance / multiunion

2003-11-07 Thread Seb Bacon
Casey Duncan wrote:
On Thu, 06 Nov 2003 19:11:55 +
Seb Bacon [EMAIL PROTECTED] wrote:
A simple query for [A or B or C] against a KeywordIndex containing 
27k objects is taking about 7 seconds on a Celeron 1.6Ghz, which seems 
an absurdly long time to me.
guess
This time may be caused by fetching from the database. If so, then the
 only way to speed it up is increase the ZODB cache or get faster disks.
 Try the former and see if it helps. /guess
Yup, absolutely right.  Upping the cache speeds it up to something sane. 
 However, I don't understand why.  The code does something like:

 set1 = self.index.get(1)
 set2 = self.index.get(2)
 sets = [set1, set2]
...so the sets will have come from the ZODB.  But the bit which takes 
the time is the following line:

 result = multiunion(sets)

At which point the sets have already been fetched, no?

looking forward to the day I understand ZODB caches...;-)

seb



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] KeywordIndex performance / multiunion

2003-11-07 Thread Seb Bacon
Casey Duncan wrote:
guess
This time may be caused by fetching from the database. If so, then the
 only way to speed it up is increase the ZODB cache or get faster disks.
 Try the former and see if it helps. /guess
 Upping the cache speeds it up to something sane. 
 However, I don't understand why. 
These are TreeSets most likely. The actual members of the sets are stored in 
 separate persistent objects.

But of course :-)

Thanks,

seb

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] debugging memory leaks

2003-11-06 Thread Seb Bacon
Seb Bacon wrote:
So, say Foo is leaking because it is referenced from O which can't be 
collected.  Given 100 things which refer to Foo, how do I identify which 
one is O?  And of course, then O may be leaking because it is referenced 
from P...

I sense this question is a bit like asking someone to explain how to 
solve a Rubik's Cube in 3 words.
Well, I have come to some kind of resolution, though I am still slightly 
mystified.  Here's the sequence of events, in case they are of any help 
to others (doubtful...).

Although there probably is a memory leak in my application, the one I 
thought I was hunting wasn't what was causing my server collapse.

At first, I noticed that memory usage was increasing linearly over time 
until the server expired.  I examined reference counts for all the 
classes therein, mainly using Shane's LeakFinder product (I could have 
used the refcounts listing on the control panel, but I found the 
LeakFinder's reference count display tab nicer to use.)  I noticed that 
references to a particular Foo class were increasing in direct 
proportion to the memory usage, apparently without bound.  I also noted 
that Foos are involved in reference cycles.

I guess from this that maybe Foos were leaking somehow - which was 
incorrect.  There is nothing wrong with reference cycles *per se* (see 
earlier in this thread).

Then I looked at Bars,  which were referencing Foos.  Given the way that 
Foos are implemented (with mutual references to each other) and the fact 
that there may be several Foos stuck on a Bar, then a leak in a Bar 
could have a big knock-on effect of creating a whole ton of Foos.  The 
number of references to Bars was also increasing without bound.

This went on for ages.  Worth mentioning is Barry's cool reference 
visualisation tool (see earlier in this thread).

I had already tried my application using Zope 2.6.2 (it was on 2.6.1 
before) and noted reference counts also going up rapidly, so it wasn't 
that, I decided.

To cut a long story to a medium length, it *was* that.  When using 
2.6.2, I noticed that if I forced garbage collection, the refcounts went 
down.  Going over to the database connection caches, I noted that in 
Zope 2.6.1 the number of cache entries bore no relation to the target 
cache size.  In Zope 2.6.2, it did.

In other words, the way my application is implemented means that *lots* 
of references can accumulate in the space of a single request, and 
something about these references meant that they were never getting 
cleared out of the cache by Zope 2.6.1.  The cache was the culprit.

Moral: always keep on top of those Zope releases ;-)

What's puzzling me is that I can't see anything that changed between 
2.6.1 and 2.6.2 which might have fixed this behaviour.

Seb

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] KeywordIndex performance / multiunion

2003-11-06 Thread Seb Bacon
A simple query for [A or B or C] against a KeywordIndex containing 
27k objects is taking about 7 seconds on a Celeron 1.6Ghz, which seems 
an absurdly long time to me.

The bit of the operation that is taking the time is the part of the 
index which does a union of the results of each of the 3 query 
parameters.  Reproducing this BTree union operation outside Zope in a 
unit test takes milliseconds.  Very occasionally it takes milliseconds 
inside the KeywordIndex too.  Something to do with memory usage perhaps? 
 I'll continue looking into it.

But main the reason I'm posting is to wonder if there any reason not to 
use the multiunion operator instead of the union operator in 
UnIndex.py... it should be faster, right?  It seems a touch faster in 
some informal tests.

Seb

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] debugging memory leaks

2003-10-28 Thread Seb Bacon
Tim Peters wrote:
[Seb Bacon]
...but my (naive?) reading of the documentation was that reference
cycles are cleaned out by the garbage collector, *unless* they define
a __del__ (which is not the case here).  How am I wrong?


You're reading the docs correctly.  It's not necessarily cycles directly
involving Foo objects that causes Foo objects to leak, it can be instead
that some other (non-Foo) objects in cycles can't be collected, from which
the Foo objects are in turn reachable.  When an object O can't be collected,
then neither can any object reachable from O.  gc.get_referrers() can be
used to find objects that refer to a given Foo instance.  It's also possible
that a something S refers to a Foo instance where S doesn't participate in
cyclic gc.  Then any cycle containing S is immortal, regardless of whether
__del__ methods are defined in the cycle, and also then gc.get_referrers()
can't reveal S's existence.  Sometimes such an S is in the Python core, or
in Zope's C code, although the more recent the release the less likely that
is (more  more kinds of objects have been added to cyclic gc over time).
Are you sure that *only* Foo objects are leaking?  It's pretty rare, when
there's a leak, to see only one kind of object leaking.
You're right, there seem to be a few other things involved.  I think Foo 
comes out top simply because it is the most numerous instance involved 
in the leak.

So, say Foo is leaking because it is referenced from O which can't be 
collected.  Given 100 things which refer to Foo, how do I identify which 
one is O?  And of course, then O may be leaking because it is referenced 
from P...

I sense this question is a bit like asking someone to explain how to 
solve a Rubik's Cube in 3 words.  but FWIW, the kind of logic I'm using is:

  - run test case
  - notice that there are a lot of references to Foo
  - get an instance of Foo using sys.getobjects(0)
  - get referrers using gc.get_referrers(Foo)
  - run garbage collection using gc.collect()?
  - is Foo still there?  Which of its referrers are still there?
Incidentally, I've found some other bug.  I can get Zope to segfault by 
calling PickleCache.minimize(3), if a Bar object has been loaded which 
defines a __del__ method thus:

  def __del__(self):
 print deleting, self.getId()
It couldn't be related, could it?

(it's borking at a point where it frees memory)

Cheers,

Seb

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] debugging memory leaks

2003-10-27 Thread Seb Bacon
I've got a fairly major memory leak in my application.  I've followed 
the thread from August including Shane's suggestions about using a debug 
build of Python to inspect object references and the rest [1]

I know from the refcounts in Zope that items of class Foo are definitely 
leaking, yet when I do a sys.getobjects(0, Foo) I get nothing back. 
Navigating all 10-ish references one by one seems a bit daunting. 
So I'm not sure where to go from here.

Shane, you mentioned you had put together some useful functions for 
exploring this debug information - could you share them?  Or were you 
just refering to the remote console you supplied earlier?

Also, what kinds of Python code can cause memory leaks?  I'm not really 
sure what I should be looking for.  The only thing I can think of is 
hanging file descriptors, as circular references should be picked up by 
the gc anyway.

Seb

[1] http://mail.zope.org/pipermail/zope-dev/2003-August/020358.html

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] debugging memory leaks

2003-10-27 Thread Seb Bacon
Tim Peters wrote:
snip useful info about new-style classes
Debugging memory leaks can be hard, in any language.  
No kidding.  I thought when I identified the suspect class two days ago 
I was nearly there ;-)

Another place to look
for ideas is in the top-level test.py from a current Zope HEAD checkout (or
2.7 branch, or Zope3). 
OK, will do.

2. Reference cycles.  Big topic wink.
Seeing as the suspect leaker contains code like:

 other = Foo()
 other.reciprocal = self
 self.reciprocal = other
I fear the worst ;-)

...but my (naive?) reading of the documentation was that reference 
cycles are cleaned out by the garbage collector, *unless* they define a 
__del__ (which is not the case here).  How am I wrong?

Thanks,

seb





___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] _p_deactivate() and _v_ variables?

2003-10-15 Thread Seb Bacon
Chris Withers wrote:
Casey Duncan wrote:
I would argue that a better plan would be to only use _v_ vars for 
completely disposable data only. The application should expect that 
this values will be gone at any random time, not just at transaction 
boundaries.
Agreed. Are there any situations, apart from the already discussed CMF 
skindata, where this currently isn't the case?
I'm a bit puzzled - of what use is a variable which may disappear at 
any random time?

seb

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Caching Policy Manager (Was: Caching prob with AHCM and headers)

2003-09-25 Thread seb bacon
Andy McKay wrote:
This thread and an application for a client has meant i've started to 
formulate a replacement for Caching Policy Manager. From the way I see 
it all the functionality in CPM (Vary etc) should be rolled into AHCM.
+1

What about the don't cache the following hostnames knob for the use 
case I outlined previously, which enables you to circumvent caching 
(useful for site editors, for example)?

I think adding an extra virtual host is a very natural way to ensure 
fresh content as it is guaranteed to have a unique key in upstream caches.

seb

--

   [] j a m k i t
 web solutions for charities
seb bacon
T:  020 7549 0520
F:  020 7490 1152
M:  07968 301 336
W: www.jamkit.com


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] AW: [Summary] Caching prob with AHCM and headers

2003-09-18 Thread seb bacon
Fred Yankowski wrote:
That makes sense.  Is there a way to do that with the CMF 1.4
version of the CPM?  One could, I suppose, test the names of the
FSDV folders in CPM predicates, but that seems a royal PITA.  That's
why I'm making do with one-size-fits-all CPM policy for now.
Here's how I handle caching, for the record.

I use squid, which doesn't require last-modified headers.  I guess 
that's not an option for you, or you'd probably already be using it ;-) 
 But in any case, I don't see why Shane's suggestion of uncommenting 
the last-modified line shouldn't work.

I use a standard HTTP Cache Manager for all our caching needs - I have 
yet to find the granuality allowed by CPM necessary.  I add 2 or 3 cache 
managers to the site (e.g. slow_http and fast_http).  I associate 
templates which need a fast turnaround (e.g. the home page) with 
fast_http and others (e.g. the site map) with slow_http.

(BTW, in the CMF you can associate FS Objects with named cache managers 
by adding a file called foo.dtml.metadata with the following contents::

 [default]
 cache=fast_http
)
The only class of request for which I need to have a separate policy is 
requests from people who are actually editing a site.  I have created a 
customised HTTP Cache Manager which doesn't cache requests for specified 
URLs.  I then instruct site editors to edit the site using, e.g. 
'edit.mysite.com' and to view it using 'www.mysite.com'.

HTH

seb

--

   [] j a m k i t
 web solutions for charities
seb bacon
T:  020 7549 0520
F:  020 7490 1152
M:  07968 301 336
W: www.jamkit.com


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] AW: [Summary] Caching prob with AHCM and headers

2003-09-18 Thread seb bacon
Fred Yankowski wrote:
I use Squid as an HTTP accelerator in front of ZServer.  What do
last-modified headers have to do with this discussion?  
I thought that was how this thread started.  I must have mis-read something.

I use a standard HTTP Cache Manager for all our caching needs - I have 
yet to find the granuality allowed by CPM necessary.

Aha, I didn't realize that an HTTP Cache Manger can now handle FSDV
objects.  That does seem to make the CMF CPM unnecessary for my
purposes.  (I'm using Zope 2.6.1, CMF 1.4, and Plone 1.1alpha2).
FYI, it's nothing to do with the Cache Manager code, it's the FSObjects 
which have been changed to support *it*.

seb

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] PythonLibraries Product

2003-09-12 Thread seb bacon
Tres Seaver wrote:
Evan Simpson wrote:
Seb Bacon wrote:
Could you provide a brief summary of why this is better than a
folder of python scripts?  Perhaps a use case which illustrates the
problems of the current way of doing things?

It isn't *better* than a Folder of Scripts, it's *different* :-) I
have two weak use-cases, a longstanding I'm going to write that some
day itch, and some aesthetic arguments.

Actually, the restricted case is the one which has the real win;  the
free-floating library is pretty, but not semanticaally needed.  An
added argument:  a ZPT with its own private library becomes, in effect,
a Zope3 view component;  adopting such beasts will ease migration to
Zope3.
Well, I'm completely convinced :-)  I'm not quite sure about the 
metaphor for binding a library to a template yet, though.

Could libraries be added to folders as first-class objects (you want to 
be able to share them between templates easily, no?) and bound to the 
templates using a tab on either them or the templates?  Their icons 
would be overlaid with a visual indication of if they are bound or not.

Or, could you bind them at run-time using a new tal directive?  (not 
likely to be a popular suggestion, I know)

seb

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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: PythonLibraries Product

2003-09-10 Thread Seb Bacon
Evan Simpson wrote:
I'm thinking seriously about writing a Product to provide collections of 
Python functions defined by a single source text -- PythonLibraries. 
This would *not* be the same as Zope 3's persistent modules, although it 
would provide some of the same benefits.

Here's the README.txt:

Python Libraries

  The Python Libraries Product provides support for collections of
  restricted Python code.  A Python Library is similar to a Folder
  full of Python-based Scripts, except that the functions in the
  Library are more like ordinary Python functions than Scripts, and
  a single persistent global variable namespace is shared among the
  functions in the Library.
So AFAICT it's a convenience which allows you (a) to keep related 
functions together; and (b) to store local variables in a convenient 
place.  It definitely sounds useful but also a lot of work for something 
it's possible to manage without quite easily at the moment..?

Could you provide a brief summary of why this is better than a folder of 
python scripts?  Perhaps a use case which illustrates the problems of 
the current way of doing things?

seb



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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: Catalog performance

2003-09-10 Thread Seb Bacon
Nguyen Quan Son wrote:
Hi,
I have a problem with performance and memory consumption when trying to do some 
statistics, using following code:
...
docs = container.portal_catalog(meta_type='Document', ...)
for doc in docs:
obj = doc.getObject()
value = obj.attr
...
With about 10.000 documents this Python script takes 10 minutes and more than 500MB of 
memory, after that I had to restart Zope. I
am running Zope 2.6.1 + Plone 1.0 on Windows 2000, Xeon P4 with 1GB RAM.
What's wrong with this code? Any suggestion is appreciated.
With getObject(), you're loading entire objects into memory in order to 
grab a single attribute.  This is very wasteful.  Try putting the 
attribute into the metadata for the catalog and grabbing it from there. 
 Then you can do:

 for doc in docs:
 value = doc.attr
seb



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] ape performance

2003-09-08 Thread Seb Bacon
Hi,

I'm trying to use Ape for a photo album - the idea being that I just 
drop new photos where I normally do on the filesystem, and Zope provides 
a thumbnails-bells-and-whistles view onto it.

Performance is extremely poor: viewing the root of the hierarchy causes 
*all* descendent objects to be loaded first (about 3000).

Is there a way I can avoid or mitigate this problem?

seb



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] weak examples, weak exploits

2003-06-23 Thread seb bacon
On Mon, 2003-06-23 at 09:20, Jamie Heilman wrote:

 I'll submit a fixed Examples.zexp but I need to know how its normally
 prepared, ownership, etc.  Is there anything special I should do?

No.  Just go ahead and make the changes.  It would be instructive for
others reading the examples to add a comment or two explaining the
rationale behind the extra checking code.

The file upload vulnerability was fixed in version 1.3 of Examples.zexp,
though.  The reason it's still turning up in 2.6.x versions is probably
due to upgrades.  Therefore I suppose additionally there should be a
patch which examines the ZODB on startup and prints a warning if an old
Examples folder is present.

seb


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] 2.6.2b3?

2003-06-23 Thread seb bacon
Just a quick repeat from last week in case it slipped from anyone's
radar... Here is the important bit again: 

a) Any reason why I shouldn't merge BTree bugfixees into the 2.6 branch?
b) If no, how about a 2.6.2b3?

seb


On Wed, 2003-06-18 at 17:25, seb bacon wrote:
 There lave been various BTree fixes lounging in the HEAD since Jan 2003
 which I'd like to get into a release, basically because we have seen one
 of the bugs causing segfaults in production - this is the culprit:
 
 http://cvs.zope.org/Zope/lib/python/BTrees/BTreeItemsTemplate.c.diff?r1=1.17r2=1.18
 
 a) Any reason why I shouldn't merge it into the 2.6 branch?
 b) Any chance of a 2.6.2b3?
 
 Seb



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] BTree fixes in a release?

2003-06-18 Thread seb bacon
There lave been various BTree fixes lounging in the HEAD since Jan 2003
which I'd like to get into a release, basically because we have seen one
of the bugs causing segfaults in production - this is the culprit:

http://cvs.zope.org/Zope/lib/python/BTrees/BTreeItemsTemplate.c.diff?r1=1.17r2=1.18

a) Any reason why I shouldn't merge it into the 2.6 branch?
b) Any chance of a 2.6.2b3?

Seb



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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: AdaptableStorage

2003-01-22 Thread seb bacon
Chris Withers wrote:

seb bacon wrote:


I'd prefer just to have a method somewhere that, as Shane suggested, 
could be hit by URL, etc.

A whole seperate server seems like overkill...


Well, if by server you could mean script that gets run by cron every 1 
minute and hits a URL in Zope if something has changed, then I might be 
in agreement ;-)

Put it like this, I don't mean managed blade cluster running custom 
distributed architecture :-)







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


Re: [Zope-dev] Zope reference counts

2003-01-22 Thread seb bacon
Toby Dickenson wrote:

On Wednesday 22 January 2003 11:43 am, Ivo van der Wijk wrote:


Do these
references point to the same object instances, or are these copied
as well?


They are independant copies



Is there a
way to optimize this?



1. Obviously, use fewer threads. Do you have a component that otherwise 
benefits from many threads? 

Also note that it is almost always a better use of memory to increase 
the cache size than the number of threads (this is the size of each 
cache, not the total cache size).

Are you aware of the activity and cache parameters tab in the 
database management part of the control panel?

If not, you may not be using a 2.6x Zope - there are some significant 
improvements in cache usage (especially under load) in these versions.

Look at the Help on the cache parameters page for more info.

seb



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


Re: [Zope-dev] Re: AdaptableStorage

2003-01-21 Thread seb bacon
  How about having a seperate process which just watched the files and

notifed Zope when they changed?



A definite possibility.  It might even just poke an URL to send the 
notification.

Since every storage will have its own unique notification scheme, which 
may be more or less inefficient (worst case scenario, periodic polling 
of entire storage for recently modified items), it might make sense to 
have a notification server.  It would make it simpler for users to 
create custom storage transaction alert handlers.

For different cache invalidation scenarios, Zope could poll the server 
as well as get poked.

seb


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


Re: [Zope-dev] Can't return / publish object of a dictionary?

2003-01-21 Thread seb bacon
Jeff Rush wrote:

Yeah, the new property type in Python 2.2 is pretty cool, but out of 
range for use under Zope at the moment.  The ExtensionClass requirement 
for persistence eliminates using it with new style Python classes.

Why?  I can't see why ExtensionClass should not work with the new 
property type.  Or is the problem specifically to do with persisting a 
property?

In any case, it is certainly out of range for Zope since Zope does not 
yet officially support python 2.2 - I just mentioned it out of interest.

Cheers,

seb


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


Re: [Zope-dev] Re: AdaptableStorage

2003-01-21 Thread seb bacon
Chris Withers wrote:

seb bacon wrote:


Since every storage will have its own unique notification scheme, 
which may be more or less inefficient (worst case scenario, periodic 
polling of entire storage for recently modified items), it might make 
sense to have a notification server.  It would make it simpler for 
users to create custom storage transaction alert handlers.

For different cache invalidation scenarios, Zope could poll the server 
as well as get poked.


I'd prefer just to have a method somewhere that, as Shane suggested, 
could be hit by URL, etc.

A whole seperate server seems like overkill...

But what about, for example, databases which don't have an efficient way 
to do callbacks to external applications?  You may have to do a SELECT 
id FROM tblObjects WHERE timestamp  some_time or a similar kludge from 
a polling server.  You may want this server to reside at the same 
location as the RDBMS, rather than as a thread in Zope.

I'm worrying that if we are not to be restricted to Oracle or bleeding 
edge kernels, the notification part of the cache invalidation scheme may 
be (a) kludgy, (b) inefficient, and (c) utterly different in design 
between different storages.  A server could offer a layer of indirection 
which could provide a single API for Zope to see, an opportunity to take 
the process load somewhere else, and a pluggable interface for writers 
of storages.

On the other hand, I don't know much about RDBMS callbacks or filesystem 
accounting, so I could be inventing a problem to solve :-)

seb


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


Re: [Zope-dev] Can't return / publish object of a dictionary?

2003-01-18 Thread Seb Bacon
Jeff Rush wrote:

I use a form of the following to compute dynamic titles for Zope
objects, where the 'title' attribute is the result of a method call.
Modifying it slightly for your case...

from ComputedAttribute import ComputedAttribute

Class B(A):
def getMyObjects(self):
...
myObjects = ComputedAttribute(lambda self: self.getMyObjects())



In Python 2.2 (which is unfortunately not yet an option unless you are 
using a bleeding edge Zope) you can also use the new property type:

http://www.python.org/doc/2.2.1/whatsnew/sect-rellinks.html#SECTION00034

seb


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


Re: [Zope-dev] Effect of DB Writes on Performance

2003-01-16 Thread seb bacon
Writes are slower than reads, but the real bottleneck is likely to be 
your application, not the ZODB.  Commonly ZODB writes take place within 
a busy transaction, including catalog updates, transformations, etc.

Brian R Brinegar wrote:
Hello,

What effect do ZODB Writes have on Performance? We use Zope in an
environment where users are constantly updating and maintaining content
within the ZODB. Do these writes to the Database slow down overall
performance?



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


Re: [Zope-dev] Can't return / publish object of a dictionary?

2003-01-16 Thread seb bacon
Sounds like an acquisition problem to me.  Are the objects wrapped?

Try

 def _getOb(..):
   ...
   return someobject.__of__(self)

Lars Heber wrote:

Hi zopers,

my class has a list with several objects in it.
When calling my self written _getOb() method, I want to return one of
these objects.
But I get an Unauthorized...

When I put an object of the same type into a normal class attribute
(self.dummyObject), return of that object from _getOb() works perfectly.

What am I doing wrong?

Thanks a lot!



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


Re: [Zope-dev] Re: AdaptableStorage

2003-01-16 Thread seb bacon
Shane Hathaway wrote:

Chris Withers wrote:


Shane Hathaway wrote:


performance.  There needs to be a way for applications that modify 
the database to tell Zope about the modification, so Zope can reset 
its caches.


But, IIRC, the last time this was discussed on a mailing list you had 
some cool ideas to sovle the problem, right?


Yes, but I want to hear other people's ideas first.  What do you think?


Isn't this a different problem for each kind of storage, e.g. MD5 hash 
for ext2, transaction ID for foo...?  Or are you referring to a 
different aspect of the problem?

While reading the referenced thread on the subject, I found your 
description of the product design here:

http://lists.zope.org/pipermail/zope-dev/2002-August/016981.html

Could this go in the docs/ directory of the product?  The design, while 
very clean, doesn't lend itself to immediate understanding on a cursory 
view of the source...

seb



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


[Zope-dev] AdaptableStorage

2003-01-15 Thread seb bacon
Shane, AdaptableStorage is insane and beautiful - congratulations :-)

It could fit a possible project we have coming up where a requirement is 
to store content in an XML format inside MS SQL Server.

Do you have a TODO list?  Are there any particularly alpha parts?  I 
would need to get an idea of the risk I was taking on, but if the list 
is sufficiently small, I love to help mature and extend the product.

Seb


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


Re: [Zope-dev] KeywordIndex errors

2002-11-28 Thread seb bacon

 2002-11-27T16:16:26 ERROR(200) KeywordIndex unindex_object could not
 remove documentId -869933785 from index companies.  This should not
 happen.

 exceptions.KeyError: -869933785

 This usually happens when there are duplicates in the indexed 
keywords  and the record isn't updated before unindexing. Shouldn't 
cause any
 problems, though it isn't nice. This can be easily fixed by changing
 the KeywordIndex' index_object method to make keywords unique before
 indexing.

Hmm, recall that PathIndex error I reported a few days ago?  That was 
also an unindex error, also exercised by migrating to 2.6.0.

I wonder why the process of *migrating* should cause dups in the index...?

seb

Hi, started seeing quite a few of these showing up in one of our server's


logs:


--
2002-11-27T16:16:26 ERROR(200) KeywordIndex unindex_object could not


remove


documentId -869933785 from index companies.  This should not happen.

exceptions.KeyError: -869933785

This is Zope 2.6.0, hence the total lack of traceback :-(

Anyone got any idea what's going on here?

cheers,

Chris





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


[Zope-dev] Bugfix release?

2002-11-27 Thread seb bacon
The DateTime bug in 2.6.0 breaks all of my sites.  This must be true for very
many other people.

If we collectively want use of Zope to multiply 10x, I don't think it's a great
idea to let a major bug like that stay in the latest-and-greatest release.

Can we have a bugfix release?

seb

-
This mail sent through IMP: http://horde.org/imp/

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



[Zope-dev] PathIndex unindex fix

2002-11-21 Thread seb bacon
Anyone object to me changing PathIndex so it swallows exceptions and 
logs them when unindexing content?

On upgrading to Zope 2.6 some if the unindex paths seem to have got 
hosed, and I don't want this breaking my site.



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


Re: [Zope-dev] PathIndex unindex fix

2002-11-21 Thread seb bacon
I've already fixed it; should I commit it or do you want the patches?


Andreas Jung wrote:

Please file a collector issue and assign it to me.

-aj

--On Donnerstag, 21. November 2002 13:24 + seb bacon 
[EMAIL PROTECTED] wrote:

Anyone object to me changing PathIndex so it swallows exceptions and logs
them when unindexing content?

On upgrading to Zope 2.6 some if the unindex paths seem to have got
hosed, and I don't want this breaking my site.



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






   -
  -Andreas Jung http://www.andreas-jung.com   -
 -   EMail: andreas at andreas-jung.com  -
  -Life is too short to (re)write parsers   -
   -


--

   [] j a m k i t

seb bacon
T:  020 7549 0520
F:  020 7490 1152
M:  07968 301 336
W: www.jamkit.com



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


[Zope-dev] IIS / login bug

2002-07-11 Thread seb bacon

There is a bug in IIS[1] which causes cookies to be dropped during a 
redirect.  The result in the CMF is that a login fails when it is 
combined with a redirect, as happens following an attempted access of a 
forbidden resource when using the CookieCrumbler.

Now, I'm not too familiar with the pcgi mechanism, or IIS, and not 
having my own  Windows development machine makes debugging a bit 
problematic.  So I'd appreciate advice from IIS / pcgi savants (there 
must be some, somewhere ;-)

M$ says the workaround is to rename the zope.pcgi script to 
nhp-zope.pcgi, which indicates to IIS that it should pass on all HTTP 
headers untouched.  The problem here is that the ZPublisher defers to 
the server to produce some of the relevant HTTP headers, namely the 
protocol version / status header ('HTTP/1.1 200 OK').  Without this 
header, browsers display all the headers as if they are part of the body.

My solution is to alter the pcgi_publisher.py script so that it passes 
the publish_module a ZServerHTTPResponse object - which *will* add all 
the relevant server headers [2].

However, altering the pcgi_publisher script seems to have no effect, 
whatsoever, on anything.

Should my approach work?  Are there better workarounds?

Thanks,

seb

--

References

[1] http://support.microsoft.com/default.aspx?scid=kb;EN-US;q176113

[2] pcgi_publisher.py patch (watch for line wraps)

*** pcgi_publisher.py   Thu Sep  7 17:40:07 2000
--- nhp-pcgi_publisher.py   Thu Jul 11 09:56:42 2002
***
*** 294,306 
   ### IIS hack to fix broken PATH_INFO
   ### taken from Mike Fletcher's win_cgi_module_publisher
   import string
   if env.has_key('SERVER_SOFTWARE') and 
string.find(env['SERVER_SOFTWARE'],'Microsoft-IIS') != -1:
   script = 
filter(None,string.split(string.strip(env['SCRIPT_NAME']),'/'))
   path = 
filter(None,string.split(string.strip(env['PATH_INFO']),'/'))
   env['PATH_INFO'] = string.join(path[len(script):],'/')
!
   try:
! 
self.publish_module(self.moduleName,stdin=stdin,stdout=stdout,stderr=stderr,environ=env)
   except:
   self.fatalError(unable to publish module)

--- 294,308 
   ### IIS hack to fix broken PATH_INFO
   ### taken from Mike Fletcher's win_cgi_module_publisher
   import string
+ from ZServer.HTTPResponse import ZServerHTTPResponse
+ iis-nhp-response = None
   if env.has_key('SERVER_SOFTWARE') and 
string.find(env['SERVER_SOFTWARE'],'Microsoft-IIS') != -1:
   script = 
filter(None,string.split(string.strip(env['SCRIPT_NAME']),'/'))
   path = 
filter(None,string.split(string.strip(env['PATH_INFO']),'/'))
   env['PATH_INFO'] = string.join(path[len(script):],'/')
! iis-nhp-response = ZServerHTTPResponse(stdout=stdout, 
stderr=stderr)
   try:
! 
self.publish_module(self.moduleName,stdin=stdin,stdout=stdout,stderr=stderr,environ=env,response=iis-nhp-response)
   except:
   self.fatalError(unable to publish module)





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



Re: [Zope-dev] vulnerability in stock Zope

2002-07-11 Thread seb bacon



Shane Hathaway wrote:
 seb bacon wrote:
 
 Production sites running a stock Zope are vulnerable to abuse of their 
 server if they have not removed the 'Examples' folder.  For example, 
 anyone could use http://notcarefulenough.com/Examples/FileLibrary as a 
 warez repository.
 
 
 Are you sure?  I get an Unauthorized error (but not until I actually 
 try to upload).
 
 Shane

I'm sure, I've tried it on a few sites.

Try this ;-)

   http://new.zope.org/Examples/FileLibrary

seb




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



Re: [Zope-dev] vulnerability in stock Zope

2002-07-11 Thread seb bacon


 Production sites running a stock Zope are vulnerable to abuse of 
 their server if they have not removed the 'Examples' folder.  For 
 example, anyone could use 
 http://notcarefulenough.com/Examples/FileLibrary as a warez repository.

 Are you sure?  I get an Unauthorized error (but not until I 
 actually try to upload).

 Shane


 I'm sure, I've tried it on a few sites.
 

 Wait a minute, now I see it.  The addFile script has the Manager 
 proxy role!  (And apparently my Zope is disregarding the proxy roles.) 
 That's wrong.  I suggest we remove the proxy roles, replacing the proxy 
 role explanation with the text you can set proxy roles if you want 
 anonymous users to be able to use this script.

Don't forget the Message Board application too.  Are you fixing this or 
shall I?

seb



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



[Zope-dev] Bad Marshal Data

2002-03-27 Thread seb bacon

I've asked this before, about a year ago, but got no response.

Does anyone else ever see 'bad marshal data' errors sometimes?  What are
they a symptom of?

It sometimes happens in my products, other times in Zope.  It always
occurs on import statements.  I usually manage to fix it by playing
around with line spacing, etc, in the module being imported.  Deleting
*pyc files does not help.  Here's an example:

Traceback (most recent call last):
  File /usr/local/Zope-2.5.1b1-src/lib/python/OFS/Application.py, line
531, in import_product
product=__import__(pname, global_dict, global_dict, silly)
ValueError: bad marshal data

seb


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



Re: [Zope-dev] manage frame change

2002-03-19 Thread seb bacon

On Mon, 2002-03-18 at 19:18, Leonardo Rochael Almeida wrote:
 On Mon, 2002-03-18 at 13:21, Lennart Regebro wrote:
  The machine should, in my opinion, be the domain you are logged in on. I.e,
  if you are authenticated for domain www.foobar.com:1001, thats what it
  should say, according to an internal survey here at Torped (that means me
  and Johan). :-)
  
  It would be nice to have it configurable, but I'm not sure it's enough to
  configure it per instance. You may want to configure it per virtual domain
  too.
 
 +1 on that. It's 'The Simplest Thing That Could Possibly Work' (TM) and
 only requires changes to the template as all the extra data (host and
 port) is present in the request.

But we come back to the point that you may be logged into one of (say) 3
app servers (ZEO clients) all serving the same domain, no?

seb


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



[Zope-dev] manage frame change

2002-03-16 Thread seb bacon

anyone object to changing the text at in the top ZMI frame to Logged in 
as user on machine?  Or is there a better place to put that info? 
I find it useful when I've got several windows open to different servers.

seb


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



(OT) Re: [Zope-dev] Zope 2.6 planning - call for contributors!

2002-03-04 Thread seb bacon

On Mon, 2002-03-04 at 03:55, Anthony Baxter wrote:
  I think the performance hit is really quite minimal for two if statements at 
  the entry and exit point(s) of a function to turn the behaviour on and off.
 
 I'm not convinced. Those small increments of performance really add up.
 Look at how Python's performance over time has degraded as one after
 another small bits of cruft accumulated.

?!?! :-)

$ python1.5 pystone.py
Pystone(1.1) time for 1 passes = 0.84
This machine benchmarks at 11904.8 pystones/second

$ python2.1 pystone.py
Pystone(1.1) time for 1 passes = 0.77
This machine benchmarks at 12987 pystones/second

$ python2.2 pystone.py
Pystone(1.1) time for 1 passes = 0.68
This machine benchmarks at 14705.9 pystones/second

seb



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



Re: [Zope-dev] Zope 2.6 planning - call for contributors!

2002-03-04 Thread seb bacon

On Mon, 2002-03-04 at 03:47, Richard Jones wrote:
 On Mon, 4 Mar 2002 14:40, Casey Duncan wrote:
  I agree, monkey patches are perfect for this. That
  makes them totally transparent to the application and
  Zope for that matter. There's nothing wrong with them
  in the right application.
 
 My main concern is the use of monkeypatching in the core makes it difficult 
 for someone else to release a product that also MPs without them worrying 
 about whether something has already patched code. Especially when we're 
 talking about MP'ing so many core Zope objects (yes, I count 1 as so many 
 :)

I agree - altering classes at runtime is less predictable or
discoverable than defining them statically.  I think the current
solution is really nice, but I don't see that it has any particular
benefits over a static implementation, which has the benefit of
following a standard, well-known pattern.

 I think the performance hit is really quite minimal for two if statements at 
 the entry and exit point(s) of a function to turn the behaviour on and off.

Yes - I would bet the performace difference is in the order of
hundredths of a second.

seb


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



Re: [Zope-dev] Zope 2.6 planning - call for contributors!

2002-03-04 Thread seb bacon

On Mon, 2002-03-04 at 10:47, Chris Withers wrote:
 seb bacon wrote:
  
  Yes - I would bet the performace difference is in the order of
  hundredths of a second.
 
 Which I would prefer not to have added to the several hundred other 
hundredths-of-a-second
 little differences-that-people-thought-wouldn't-make-a-difference that have been 
added to
 Zope over time...

What, like ZPT? ;-P

http://zope.nipltd.com/public/lists/dev-archive.nsf/ByKey/4084B02199CC6AFB

(to save the bother of following the link, that's the thread from  about
a month ago regarding evidence suggesting ZPT may be *twice* as slow as
DTML)

seb


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



[Zope-dev] MonkeyPatching in the Core (was: Zope 2.6 planning)

2002-03-04 Thread seb bacon

On Mon, 2002-03-04 at 11:23, Chris Withers wrote:
 seb bacon wrote:
  
  http://zope.nipltd.com/public/lists/dev-archive.nsf/ByKey/4084B02199CC6AFB
  
  (to save the bother of following the link, that's the thread from  about
  a month ago regarding evidence suggesting ZPT may be *twice* as slow as
  DTML)
 
 Yup. And I'm a pretty strong advocate that ZPT should be speeded up a lot.  

Indeed.  However, I was being a bit glib with my example, and didn't
explain my point properly: that performance issues should be subordinate
to good design.  Therefore, I suspect MonkeyPatching is bad:

 Pros - a tiny performance gain
 Cons - unpredictable interaction with future products; not a well-known
method of distributing products; not easily discoverable

But perhaps my 'cons' are misplaced?  Mostly, I'm uneasy that someone
looking at ZPublisher code would have no way of knowing that
CallProfiler hooks into it if it were monkeypatched.

seb

seb



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



Re: [Zope-dev] MonkeyPatching in the Core (was: Zope 2.6 planning)

2002-03-04 Thread seb bacon

 What if, instead of the static list of callable info that the CP 
 currently uses, Zope objects could register themselves as profilable? 
 We would then make sure that the object types that CP handles now 
 register themselves, but other products that we don't know (or 
 have to know) about could register themselves too if they wanted. 
 
 Think of this as consentual monkey-patching (hmm... may have to 
 change this metaphor soon!). The products have to take some explicit 
 action to be profilable, so it is not invisible in the code of the 
 product. The hooks will continue to installed as-needed, so there 
 is no performance issue.
 
 Thoughts?

Bingo!

seb



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



Re: [Zope-dev] Zope 2.6 planning - call for contributors!

2002-03-01 Thread seb bacon


  Absolutely ... and I would also like to see Richards excellent Call
  Profiler service become part of the core.
 
 I'm definitely putting the profiler into 2.6 - there's just an open question 
 of where it gets put. The question was asked on zope-coders, and got no 
 response. I figure if no-one answers within a week of my original posting, 
 I'll just check it in as a product.

Richard,

FWIW, my own opinion is that it should not take the 'MonkeyPatch'
approach.

seb


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



Re: [Zope-dev] Zope 2.6 planning - call for contributors!

2002-03-01 Thread seb bacon


  I'd like to see the ZSyncer Product, or a variant thereof, included in
  Zope by default.  That is, I'd like Synchronization, to a be a default
  property of Zope objects, so that objects/content can be pushed and
  pulled between two Zope installations.
 
 I would use ZCVSFolder or somewhat likely that included instead of
 ZSyncer.

I think the use cases driving synchronisation requirements are not yet
sufficiently understood.  Agreed, it's a feature that many people need,
but I get the impression it would be premature to include ZSyncer as is
in Zope without more detailed planning.  On the other hand, there is an
argument which says, ZSyncer is a good product used by a lot of people,
let's put it in Zope and deal with any issues after the event.

seb


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



Re: [Zope-dev] Re: Zope vs. Cocoon

2002-02-25 Thread seb bacon

A few points I'd like to add.  Before I do, a disclaimer: I've never
used Cocoon, and I really like Zope.  Having said that, I've used lots
of other 'competing' systems, and I am able to see Zope's weak points.

 
 Some don't think this 'cloning restriction' a severe limitation, I think
 this is not a annoyance, but the *first* rule.
 
 I agree that this is a very important consideration.  However, I cannot 
 agree with your observation.  Zope powers many
 more sites than those of which you may be aware.   Unfortunately, I 
 don't know too many of them personally, but here are a few:
 
 http://www.activestate.com
 http://www.homegain.com
 http://www.arielpartners.com(I couldn't resist :-)

...here's some more from our side of the pond:

http://www.breastcancercare.org.uk
http://www.intellident.co.uk
http://www.mulberry-insurance.co.uk
http://www.jubilee.gov.uk
http://www.drugs.gov.uk

 Boths are fruits, as both publish web content, but Zope is a 'publishing
 environment' while Cocoon is a 'publishing framework'.
 
 An 'environment' is an application that you customize, a 'framework' is
 the foundation of your own application.

I disagree: Zope is very much a framework.  I've used it for a CMS, for
intranets, and for online data capture.  I've created applications which
automatically catalog and convert Word, PDF, and various image formats
which have been emailed to a mailing list as attachments.  There's bug
trackers, wikis, slashdot-alikes, etc...

What Zope lacks IMO is good best practice guidance and detailed
developer documentation, though it's getting there now.  Without best
practice guidance, developers tend to choose the first development model
they see, which at the moment tends towards heaps of quick-and-dirty
through the web hacks and tricks.  This does give the illusion of Zope
being an 'environment' rather than a 'framework', and encourages
Zopish-looking sites, too.

 I believe that Zope is mis-placed architecturally, it's an hybrid
 between a CMS and a publishing framework. And does some of everything,
 but both poorly, compared to specialized solutions.
 
 Actually, there is a CMS available for Zope: the Zope Content Management 
 Framework (see http://cmf.zope.org).

 We chose not to use the Zope CMF because of its architecture: it is not 
 based on
 standard XML technologies and, in our opinion, brings us too far into 
 the proprietary language land.

You don't have to be tied into one implementation if you're using the
CMF - nothing about it is more proprietary than vanilla Zope.  

The default, out of the box Zope and CMF may give the impression of
being a poor fit to most requirements.  However, most people
misunderstand that it is just an example implementation of a site built
using the CMF.  The actual possibilities are endless, and it's a robust
and useful framework.

 1) Integrated Object-oriented database with support for full graphical
 editing of all objects  
 
 Do you really want this? I don't.
 

Being able to create objects which persist transactionally in a database
simply by mixing in a 'Persisent' class makes development very fast and
simple.  If you like programming in python, you should look into the
ZODB a bit more - I think you'll like it, regardless of Zope.

 Then the Cocoon strong points:
 
 1) Integration with Source Code Control System
 
 Zope is not file based, it's entirely database based. So CVS doesn't
 work on it.
 
 We have made our first baby steps toward solving this problem: 
  http://www.zope.org/Members/arielpartners/CVSFile

This is a very real concern.  There are a number of ways of dealing with
it.  We use the FSObjects from the CMF.  These are filesystem-based
objects which are loaded into the database at run-time.  However, we
still have to use DB-only things occasionally.

This is all set to change in Zope3.  The plan is to have full,
bidirectional mapping between the ZODB and the filesystem.

 
 2) Integration with J2EE and other Java-based business logic   
 
 Cocoon is a servlet, thus we get it for free. They find themselves
 completely detached from the rest of the world, even if they could
 easily use web-services to glue things. This is a clear marketing plus
 for us./listinfo/zope )

 - If Zope could be made to run under Jython (http://www.jython.org), 
 integration with J2EE would be virtually
 a no-brainer, b/c you are already inside a Java VM.

This is also a goal for Zope3 (a Jython implementation), though I'm not
sure when it'll land.

 Moreover, there is no indication of internal modularity and
 extensibility, SoC-based design, IoC design, data storage abstraction...
 and no indication on caching strategies, scalability and performance
 issues.

You are right that there is *way* too much magick in Zope.  That is the
main motivator behind Zope3, which is entirely component-driven. 
Architecturally, it is *excellent*, and I'm very excited about it.  I
could wax on for hours, but I won't right now.  Suffice to say everyone
in the 

Re: [Zope-dev] Zope builds (new Intel C++ compiler)

2002-02-12 Thread seb bacon

 However, I do build Python with gcc 3.1 (cvs) and Python 2.1.2 and with 
 various compile options can get a 17% speedup.  

Could you share the compile options with us?

seb



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



Re: [Zope-dev] Zope builds (new Intel C++ compiler)

2002-02-12 Thread seb bacon

On Tue, 2002-02-12 at 12:36, Matthew T. Kromer wrote:
 
 On Tuesday, February 12, 2002, at 07:17 AM, seb bacon wrote:
 
  However, I do build Python with gcc 3.1 (cvs) and Python 2.1.2 and with
  various compile options can get a 17% speedup.
 
  Could you share the compile options with us?
 
  seb
 

 Gcc 3.0X doesn't seem to be able to make a good build with these 
 options; gcc 3.1 (from cvs) does, but YMMV -- don't blame me or ask me 
 for help building python with fancy options, please.

Your suggestions made my floppy drive run out of gcc, and now the
interweb's crashed - and it's all YOUR fault ;-)

Thanks - this will be very interesting.

seb


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



Re: [Zope-dev] Benchmarks: DTML vs. ZPT?

2002-02-07 Thread seb bacon

Hi!

It wouldn't surprise me - ZPT has the roughly the same overheads as DTML
for the language parsing, but a presentation template goes through an
HTML parser in addition - which is always going to be quite slow in
python.

seb

On Thu, 2002-02-07 at 00:01, Joachim Werner wrote:
 Hello!
 
 Has anyone done any performance comparisons between DTML and ZPT yet? The
 reason I'm asking is that we did some first(completely unscientific) tests
 and had the impression that ZPT were actually quite a bit SLOWER than DTML -
 and I just can't believe that ...
 
 Joachim
 
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )



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



Re: [Zope-dev] Adding gzip compression to HTTPResponse.py

2002-02-06 Thread seb bacon

I don't have much useful to add - I just wanted to mention that I know
there are people out there who have succesfully used mod_gzip with Zope;
and that I *like* the name dogzip :-)

seb

On Tue, 2002-02-05 at 22:34, Brad Clements wrote:
 I'm looking for architectural suggestions for adding gzip compression to 
 HTTPResponse for text types.
 
 First, I just wanted to compress xml-rpc output, since I'm returing lots of table 
data as 
 XML text (not objects), then loading that text/xml into a DOM for XSLT processing.
 
 I hacked the attached code into HTTPResponse, at the end of setBody. It works for 
 xml-rpc responses and I suppose any text output, so long as the response object has 
a 
 header named dogzip set.
 
 I know dogzip is a stupid name, but this is just a testing thing.
 
 Representative compressions:
 
 compress oldlen  150366 new len 11926
 compress oldlen  204382 new len 14170
 compress oldlen  12746 new len 1364
 
 As you can see, very useful compressions for xml-rpc output.
 
 But for HTML output, what's really needed is I think a special kind of Cache Object. 
 One that combines HTTP Caching with Ram caching to keep gzip compressed objects 
 in memory.
 
 Some HTML pages are really quite large, and gzip compression can make a noticable 
 difference. Just the javascript code sizes themselves are .. really big.
 
 For xml-rpc, obviously every response must be compressed if it's worth it, and I 
can 
 see that having to set a response property on a per request basis is appropriate for 
 xml-rpc.
 
 But for text file objects, Page Templates and stuff.. How does setBody work with Ram 
 Cache objects? I have some ideas...
 
 Anyone think this is worthwhile?
 
 Also, RESPONSE.setBody really should have access to REQUEST.headers. What's 
 the clean way to do that? Just pass the request object to response object's init 
 method?
 
 Here's quick gzip compression hack-in, based on code posted by Neil Schemenauer
 
 Thanks Neil.
 
 Added about line 265 in HTTPResponse.py in Zope 2.5 B3
 
 try:
 dogzip = self.headers['dogzip']
 del self.headers['dogzip']
 if dogzip and split(content_type,'/')[0] == 'text':
 body = self.body
 startlen = len(body)
 import zlib, struct
 _gzip_header = (\037\213 # magic
 \010 # compression method
 \000 # flags
 \000\000\000\000 # time
 \002
 \377)
 co = zlib.compressobj(6,zlib.DEFLATED,-zlib.MAX_WBITS,
   zlib.DEF_MEM_LEVEL,0)
 chunks = [_gzip_header, co.compress(body),
   co.flush(),struct.pack(ll,zlib.crc32(body),startlen)]
 z = join(chunks,)
 newlen = len(z)
 print compress oldlen ,startlen,new len,newlen
 if newlen  startlen:
 self.body = z
 self.setHeader('content-length', newlen)
 self.setHeader('content-encoding','gzip')
 except:
 pass
 
 
 
 Brad Clements,[EMAIL PROTECTED]   (315)268-1000
 http://www.murkworks.com  (315)268-9812 Fax
 netmeeting: ils://ils.murkworks.com   AOL-IM: BKClements
 
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )



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



Re: [Zope-dev] Call Profiler

2002-02-01 Thread seb bacon

 I've just announced our Call Profiler product on zope.org and the zope 
 announce list (waiting for people in different timezones to authorise them :)
   ( http://www.zope.org/Members/richard/CallProfiler/  for the impatient)

This is absolutely excellent, well done and thanks :)  I added various FSObjects to 
the profiled modules list and have been looking at my CMF systems - it's really 
instructive.

 It does pose a question though: would it be better to have support for this 
 stuff in the core, or is it OK for a product like this to dynamically patch 
 the call methods when it needs to?

I see nothing wrong with it being a monkeypatch product.  On the other
hand, it is a very useful tool, and as such could benefit from being in
the core simply so that it always gets maintained with the core.

 On one hand, the performance hit when dynamically patching the methods is 
 zero when the product is not active, but it does mean diddling with methods 
 that really probably should be left alone. On the other hand, having changes 
 to the core code to test for profiling being enabled introduces a small 
 performance hit even when profiling is not activated.

You could do this check only if zope is being run in debug mode; then
there would be zero perormance hit in production sites.

 
 Any comments?
 

I think the reporting could do with some usability improvements.  It's
good now, but takes a while to navigate round.  

- All the reports could benefit from being sortable by column.  
- the trace for a complete template could be slightly clearer.  The
colour coding for the start and end of a module could have a clear
legend, for example.
- there needs to be some solution for really long URLs, which require
lots of horizontal scrolling - just displaying the final parts of the
path, with the rest of the url hidden somehow?

I can't think of exactly what else I would do to improve it right now,
though.  And that's the kind of change I never get round to bothering
with, personally... Sorry these aren't really constructive ideas, but
you did ask for feedback :-)

seb


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



Re: [Zope-dev] CMF 1.2 - Can I convert Files to PortalFiles

2002-01-31 Thread seb bacon

You can use FTP to upload the files - check out which port your Zope FTP
server is running on and have a look there.  Investigate the
content_type_registry to see how to link certain file types to
particular CMF types.

Sorry for the brevity of the mail, but hopefully that points you in the
right direction.

seb

On Wed, 2002-01-30 at 17:58, [EMAIL PROTECTED] wrote:
 I have a number (100plus - not too many but enough) of objects of type File
 in my zope that aren't visible under CMF 1.2. Is there any easy way to
 convert these into objects of type PortalFile without having to upload all
 of the content again.
 
 I have tried importing them, but the CMF site catalog is not updated
 automatically.
 
 I understand that I might have to add in the new metadata. I just want a
 way to avoid the uploads.
 
 I'm not a python programmer, so please don't tell me that I could write a
 script in a minute, but you could send me the script.
 
 John Knutson
 Candle Corp
 England
 
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )



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



[Zope-dev] Calling every zoper, newbies to gurus

2002-01-14 Thread seb bacon

First, apologies for the cross posting.  I need to make sure this gets
to as many people as possible, for obvious reasons...

Everyone's got grumbles about how zope.org is organised.  Now is the
time to quit grumbling and do something about it.  If you are a newbie
or a guru, please take the time to respond to this email!

I'm currently in the process of defining requirements for improving the
zope.org website.  The first part of this process is listening to the
key constituencies for the site.  Please note, I'm *not* planning on
making a new products rating system, or a replacement for the fishbowl:
I'm interested in the graphical design and informational content of the
site.

The questions are intended to help me understand who is using zope.org,
how they use it, and what they would like it to be. If you don't want to
answer all the questions, that's fine - just one answer is better than
none.

Reply to this email privately.  I won't divulge any of the information
to anyone else for any reasons, and the information will only be used to
help improve the zope.org website.  I will write up a report once I've
received enough input, and publish the results online.

Thanks for taking the time to help improve the web site...

seb

-=-=-=-=-=-

1) How did you hear about Zope?

2) Before you used Zope, what were you expecting?

3) How did the zope.org website change this?  Did it confirm, exceed or
undermine your expectations?

4) Are you: (a) just trying to find out about this zope thing
(b) a zope newbie
(c) a zoper of moderate ability
(d) a zoper of distinction
(e) a guru

5) How would you describe your role in your organisation?  The following
list is for guidance only - try to describe what you do in your own
words.

(a) developer
(b) technology decision maker
(c) business decision maker
(d) technical architect / technical lead
(e) content developer
(f) content manager
(g) just a hobby

6) (developers only) Give an estimate of your skill level (none, low,
medium or high) for the following:

 (i) Client side development

  - HTML
  - Javascript
  - XML

 (ii) Server side development

  - ASP
  - PHP
  - ColdFusion
  - JSP
  - perl
  - SQL

 (iii) Server admin skills

  - Apache
  - IIS
  - mySQL
  - shell
  - postgres
  - oracle
  - ms sql server

7) Have you ever used the following products?

  - broadvision
  - vignette
  - interwoven
  - spectra
  - midguard
  - phpnuke
  - cocoon
  - mediasurface

8) Which of the technologies mentioned in questions 6 and 7 do you see
as closest to Zope?  (You can name more than one)

9) What is your preferred operating system?

10) If you could make one piece of information easier to find on
zope.org, what would it be?

11) Graphically, what would you expect from a site like zope.org?  Give
examples from other sites, if possible.

12) Give 3 adjectives which describe the current zope.org website

13) Give 3 adjectives which describe how you'd like it to be

14) How often do you visit the zope.org website? 

15) Which part of the current site do *you* find the most useful?

16) Give the current zope.org website a score between 1 and 10
(1=completely useless; 3=pretty bad  5=just about usable 7=pretty good
10=my favourite site)

17) Would you be happy for me to contact you again for more detail (I'm
thinking of further emails or IRC sessions)?

18) Any other comments?




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



[Zope-dev] Session Tracking in 2.5

2002-01-08 Thread seb bacon

I thought it was time to catch up on the CST stuff which has made it
into the core, only to find that it's only *based on* Chris' CST stuff. 
And I can't find a fishbowl project anywhere describing the rationale,
apis, whatever...

Is there a fishbowl for this?  Or was session tracking implemented as a
guerilla project?

seb




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



Re: [Zope-dev] Session Tracking in 2.5

2002-01-08 Thread seb bacon

On Tue, 2002-01-08 at 13:03, Chris McDonough wrote:
 There are supposed to be docs for the sessioning stuff, and
 there *are* API docs in the help system.  However, the
 narrative docs that went along with CST were not translated
 for the Zope 2.5 stuff.  The docs folks here dont seem to
 think its important, so I may need to do this and put it in
 the Dev Guide.

It's important because session tracking is such a crucial feature for
people migrating from other web platforms - seeing detailed
documentation will make them so much more comfortable.  it would also be
a crying shame not to make use of all the docs you already generated
along the way.

So, please do try to find the time, and show my plea to those who make
room for doing such things :-)

seb

 On 08 Jan 2002 11:39:35 +
  seb bacon [EMAIL PROTECTED] wrote:
  I thought it was time to catch up on the CST stuff which
  has made it
  into the core, only to find that it's only *based on*
  Chris' CST stuff. 
  And I can't find a fishbowl project anywhere describing
  the rationale,
  apis, whatever...
  
  Is there a fishbowl for this?  Or was session tracking
  implemented as a
  guerilla project?
  
  seb
  
  
  
  
  ___
  Zope-Dev maillist  -  [EMAIL PROTECTED]
  http://lists.zope.org/mailman/listinfo/zope-dev
  **  No cross posts or HTML encoding!  **
  (Related lists - 
   http://lists.zope.org/mailman/listinfo/zope-announce
   http://lists.zope.org/mailman/listinfo/zope )



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



Re: [Zope-dev] Merhabalar;

2001-12-13 Thread seb bacon

ROTFLMAO :-)

On Wed, 2001-12-12 at 22:44, Lennart Regebro wrote:
 From: Can Canbilek [EMAIL PROTECTED]
  Öncelikle rahatsýz ediyorsak özür dileriz ama bu maili okursanýz sanýrým
  bize teþekkür edeceksiniz. Sizlere, hiçbir masraf yapmadan yalnýzca
  internete girerek para kazanacaðýnýzý iddia ediyoruz.
 
 Oh, yeah? Well you aint that pretty yourself!
 
  Hiçbir yalan dolan, hile olmadan
 
 Keep my mother out of this!!
 
 :-)



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



Re: [Zope-dev] Zope and Curl

2001-12-10 Thread seb bacon

There was some brief chatting about it a while ago on the list, do a
search.

seb

On Sat, 2001-12-08 at 21:00, Dirk Datzert wrote:
 Hi,
 
 has any zoper played with the new internet technology curl from
 http://www.curl.com ?
 
 Regards,
 Dirk



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



Re: [Zope-dev] Re: core i18n support

2001-12-07 Thread seb bacon

On Fri, 2001-12-07 at 11:47, Paul Everitt wrote:
 In fact, we'd like to start a pattern of opening up the sprints to
 outsiders.  We'd like to invite folks to Fburg for a sprint.  Though
 you'll pay your own freight, we'll supply a spacious cubicle. :^) If
 you're interested, contact me.

 Third, we'd like to host an open house on the Thur and Fri after
 IPC10.  Besides an open house, we'd like to have perhaps a massive
 sprint.

[ sorry for x-posting, I wanted a eurozope perspective on this ]

An exciting invitation, but ultimately frustrating for those of us in a
different timezone.  A lot of the active Zope community is in Europe,
and a lot of us are members of very small businesses or academia (I
think).

At a minimum, coming to Fredericksburg would cost about $700 (travel and
accomodation and food).  If I wanted to visit IPC10 too, it would be
between $1000 and £1700.  Would other members of the EZ business /
academic community be willing to stump up this money?  I'd be interested
to know.  I don't think *we* could justify it at this stage in our
business development - we already use a lot of resources on zope rd,
and community support.

IMO, the economic reality of this community and its resources (on this
side of the pond, at least) means it will stay vapour.  ZC is the
biggest fish, and the only times we in Europe will see you folks is when
you come over here.  When are you going to open a London office? ;-)  Or
perhaps we could consider distributed xp (using irc, kibitz, etc...?)

Thanks for the invitation, though :)

OT: big OSS conferences seem unfairly priced against the small fishes
who make up a lot of the OSS community. Or am I being naive?

seb




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



Re: [Zope-dev] Open Letter to zope-dev

2001-11-30 Thread seb bacon

* Lennart Regebro [EMAIL PROTECTED] [011130 11:24]:
 From: Andrew Kenneth Milton [EMAIL PROTECTED]
  Noone from Zope Corp seems to monitor the list to help out.
 
 That is not my experience at all. I have received answers from Zope corps
 several times. But sure, most of the answers you get come from the community
 members. Thats what a community is all about, and thats the hallmark of a
 good community.

I agree.

 The best community I have seen is for the Clavia Nord Modular synthesizer.
 Clavia contributes abolsutely NOTHING to that community. They do, however,
 listen to it, and implement several of the features that are most requested
 in that community. And that is not an open source project, so the community
 can't contribute anything else than ideas.

Personally, I think ZC are trying very hard, but are not getting it
right.  I'm also very sure they are taking this conversation
seriously.  Brian responded very quickly to the userfolder 'api'
issues.  They commit a *lot* in terms of software and support (IMO)
but little in terms of fostering a community.  But then, why should
*they* be responsible for this? 

If we think we're a community, then we should all be responsible for
building on it.  I think we should have a conversation about what
makes a community work, and then come up with some positive
suggestions about improving the community *ourselves*.  ZC will
follow, for sure.

There must be members of various OSS communities knocking around
here.  Python, XML things, Apache Foundation, GNOME.  What are
peoples' experiences?  Which are the best?  Why?

I'm not sure about the ideal community, but here's some practical
ideas to start off with.

1) Just because no-one can ever agree about splitting up the
   mailing lists, what's to stop somebody setting one up unilaterally? 
   Perhaps the people who care strongly about this should just set up
   an egroup?  I'm sure ZC would link to it from zope.org.  Come on
   somebody, set up a forum at [EMAIL PROTECTED], today,
   right now, and continue the discussion there. 

2) How about the responsiveness of ZC?  Granted, it could be much
   better, but they're *trying*.  Let's help them with suggestions.
   Look at the fishbowl. It's an open process, but doesn't get
   contributed to that much.  What are the problems with it?  How can
   we improve it?  I think it should be linked from zope.org more
   prominently, for a start.  I think the wiki format puts people off
   because they're not familiar with it.  How about a familiar-looking
   discussion board on each proposal, too?

3) Another thing mentioned regularly: the zope.org community site is
   pretty bad.  
   I think, just as the respository is beginning to
   open up, so should construction of zope.org.  There should be a
   mailing list, some members of the community should be appointed to
   some kind of committee, and ZC should always have some
   representation on it.  But it should be led by the people for whom
   it exists in the first place, IMO. Collectively, we have a vast
   array of talented designers, programmers, information
   architects, etc, at our disposal.  Will ZC countenance this
   proposal? If not, should we be working on our own community site? 

These may be crap ideas, I don't know; but I think we *can* do
something about these issues, collectively.  We shouldn't just ask ZC
to do something about it.  Carpe diem and all that.

seb


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



Re: [Zope-dev] Zope has been Hijacked! Save Zope!

2001-11-30 Thread seb bacon
 found,
   the harshness of the expression of that opinion is
   directly related to
   the way that these days Zope Corp seems to be an
   Ivory Tower and the way
   they seem to treat the community at large.
  
   There are approximately 450 products released by
   just over 200 people on
   Zope.org. There are approximately 1000 'entities'
   subscribed to this list
   (more to the main list), I represent 0.1% of this
   community, but, am
   responsible (but, not soley) for 3% of the total
   product space available.
  
   If people want to form an opinion of me based on one
   email, that's your
   right. You don't have the right to tell me, that *I*
   don't have the right
   to say the things I'm saying. I have earned the
   right to make these comments,
   I have contributed time, effort, and code, and I put
   my money where my
   mouth is. I'm not some backseat political observer,
   I am in the trenches
   I deal with the disaffected, the confused, and the
   generally pissed off
   every day. In my efforts, I try to help to make Zope
   a better product.
  
   You would be hard pressed to find a more stalwart
   supporter of Zope than me.
   This doesn't mean that I have to think that
   everything that leaves the
   holy temple of Zope Corp is the panacea of web
   development. My opinions
   might be wrong, but, they're not wrong simply
   because something was released
   by Zope Corp, or written by some person you have
   attached some god like
   status to.
  
   I will continue to do my thing, but, the way Zope
   Corp deals with us,
   the little fish had better change, or there's not
   going to be much of a
   community left. Those of you who subscribe to
   zope-dev who think that your
   time is too valuable to be spent helping others,
   well, words fail me.
  
   --
   Totally Holistic Enterprises Internet|
  | Andrew Milton
   The Internet (Aust) Pty Ltd  |
  |
   ACN: 082 081 472 ABN: 83 082 081 472 |  M:+61 416
   022 411   | Carpe Daemon
   PO Box 837 Indooroopilly QLD 4068
   |[EMAIL PROTECTED]|
  
   ___
   Zope-Dev maillist  -  [EMAIL PROTECTED]
   http://lists.zope.org/mailman/listinfo/zope-dev
   **  No cross posts or HTML encoding!  **
   (Related lists -
  
   http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope )
  
  __
  Do You Yahoo!?
  Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
  http://geocities.yahoo.com/ps/info1
  
  ___
  Zope-Dev maillist  -  [EMAIL PROTECTED]
  http://lists.zope.org/mailman/listinfo/zope-dev
  **  No cross posts or HTML encoding!  **
  (Related lists -
   http://lists.zope.org/mailman/listinfo/zope-announce
   http://lists.zope.org/mailman/listinfo/zope )
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )

-- 

   [] j a m k i t 
   
seb bacon
T:  020 7749 7218
F:  020 7739 8683
M:  07968 301 336
W: www.jamkit.com 

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



Re: [Zope-dev] (SHOUT) NOTIFICATION!!!!

2001-11-30 Thread seb bacon

+2

I like the idea of unifying the fishbowl and the collector.  And I
agree about notification.  

seb

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



Re: [Zope-dev] (SHOUT) NOTIFICATION!!!!

2001-11-30 Thread seb bacon

 Paul Everitt wrote:
  This isn't a good track record.  Brian produced 35 pages worth of
  almost-flawless docs on web services to go with his code.  But no
  comments.  And he's doing this on his own time.  So let's remember that
  this is a two-way street.
 

snip
* Chris Withers [EMAIL PROTECTED] [011130 16:47]:
 list archives and the like...) and so never came back. Now, if I
 could have ticked a box saying email me when such and such happens
 then I, or other people here at NIP who are dealing with Web
 Services in a big way ,would have got involved as soon as
 appropriate... 

I think there's another problem here: possibly the community isn't
large enough yet.  There's already been a discussion on zope-coders
about how little those with commit priviledges are actually
committing, and the main reason is simply that no-one has enough
time.

How many people are there who are really comfortable with Zope to the
point where they would be able to contribute meaningfully to a
discussion about, for example, Web Services?  Of the active community,
I would guess fewer than 40.  Of these, perhaps half missed the
announcement.  Of the others, probably another half were in the middle
of very hectic projects.  Of the 10 remaining, perhaps they weren't
interested, or were going to look tomorrow but forgot...

What we need, as Paul suggested about zope-web, is a set of community
members who are able and willing to contribute 10 hours per week.  I
think there are very few such people.  I would love to, but I simply
can't.  The best way of getting such people is to cast the community
web wider, and draw more people in.  The best way of doing this is
make zope.org *really good*, I reckon.  I for one will be
pontificating on zope-web next week.

seb

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



Re: [Zope-dev] FW: Zope optimistic transactions.

2001-11-30 Thread seb bacon

Dude, it's not a bug.  You're *meant* to get a ConflictError exception 
when writes conflict.  That signals the publisher to retry.

Search on zope.org for conflict resolution.

Regards,

seb

* Clark O'Brien [EMAIL PROTECTED] [011130 18:05]:
 That was not the point dude. Your cowardly call for a 
 response from the intellectual prostitutes on this
 list leaves me uninterested in anything you may have
 to say.
Over and Out 
   Clark
 
 
 
 
 --- Chris McDonough [EMAIL PROTECTED] wrote:
  There won't be any more discussion about this issue
  from me.
  
  - C
  
  
  - Original Message -
  From: Clark OBrien
  [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Friday, November 30, 2001 12:48 PM
  Subject: [Zope-dev] FW: Zope  optimistic
  transactions.
  
  
  
  
 -Original Message-
From: Clark OBrien
Sent: Monday, November 05, 2001 7:14 AM
To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
Cc: '[EMAIL PROTECTED]'
Subject: Zope  optimistic transactions.
   
   
Chris,
I set up a test harness to exercise zopes
  optimistic transaction
management.
My test immediatly caused a ZODB exception.
   
I am running zope 2.42. on win 2k, the scripts
  are attached.
Results below:
   
As you recall I posed the following question:
   
What if you had a directory structure like:
Folder1
Folder-2
   Folder-3
  ...
..
Folder-n
Each folder had an attribute foo and there were
  two scripts,
  script1 and
script2.
script1 modified foo on one Folder only while
  script2 traversed
  all the
folders modifying the attribute foo on each one
  of them.
Would the script2 ever commit while the fist
  while script1 was
continuously called. This is interesting because
  a call to
  script2 would
never finish before several calls to  script1
  finished.
   
I set up a simple test with only 10 folders. I
  then wrote the
  script below
changeLevel2 that is my scri1 above and
  changeFolders that is my
  script2
above.
I ran changeLevel2 in a loop using the following
  code:
  
  
 
 script--
  --
---
import urllib
params = urllib.urlencode({'theText': 'Vitamin
  D'})
while 1:
 f =
 
 urllib.urlopen(http://localhost:8080/Test/changeLevel2?%s;
  %
  params)
 print f.read()
  
  
 
 -script-
  --
-
   
   
I then ran the script changeFolders from my
  browsers.
The result was the following error message:
   
   
 
 
ZODB.POSException.ConflictError
   
Sorry, a site error occurred.
   
Traceback (innermost last):
  File C:zopelibpythonZPublisherPublish.py,
  line 223, in
publish_module
  File C:zopelibpythonZPublisherPublish.py,
  line 200, in
  publish
  File C:zopelibpythonZPublisherPublish.py,
  line 200, in
  publish
  File C:zopelibpythonZPublisherPublish.py,
  line 200, in
  publish
  File C:zopelibpythonZPublisherPublish.py,
  line 195, in
  publish
   
 
 --
   
   
   
 scripts.txt
  
  
  
  ___
  Zope-Dev maillist  -  [EMAIL PROTECTED]
  http://lists.zope.org/mailman/listinfo/zope-dev
  **  No cross posts or HTML encoding!  **
  (Related lists - 
  
  http://lists.zope.org/mailman/listinfo/zope-announce
   http://lists.zope.org/mailman/listinfo/zope )
 
 
 __
 Do You Yahoo!?
 Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
 http://geocities.yahoo.com/ps/info1
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )

-- 

   [] j a m k i t 
   
seb bacon
T:  020 7749 7218
F:  020 7739 8683
M:  07968 301 336
W: www.jamkit.com 

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



Re: [Zope-dev] FW: Zope optimistic transactions.

2001-11-30 Thread seb bacon

He he, Another classic Withers-style measured response ;-)  Easy on
those flames, dude...Everyone move along now, there's nothing to see
here... 

seb

* Chris Withers [EMAIL PROTECTED] [011130 18:19]:
 Clark O'Brien wrote:
  
  That was not the point dude. Your cowardly call for a
  response from the intellectual prostitutes on this
  list leaves me uninterested in anything you may have
  to say.
 
 Excuse me, what the FUCK is your problem 'dude'?
 
 You obviously have no fucking clue. Kindly piss off and grow up.
 
 That's about the sum total of anything useful I can say in response to your
 postings so far...
 
 Chris
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )

-- 

   [] j a m k i t 
   
seb bacon
T:  020 7749 7218
F:  020 7739 8683
M:  07968 301 336
W: www.jamkit.com 

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



Re: [Zope-dev] bug reporting idea

2001-11-21 Thread Seb Bacon

Your points are valid, but I think I maybe didn't explain myself well
enough.

I was just thinking of it happening in debug mode, not on a live server.

So many people may find bugs but don't know about the collector.  Even just
a link to the collector would encourage more people to report bugs.

There would be a greater volume of false positives, but this is a bug
management issue, not a reason to discourage bug reports.  IMO we should be
aiming at a very stable, bug free system, and for that we need lots of
eyeballs.

All this thinking just came from the observation that real bugs often don't
get reported because someone doesn't know about the collector, or even how
to report bugs well.

seb


- Original Message -
From: Chris Withers [EMAIL PROTECTED]
To: seb bacon [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Sunday, November 11, 2001 11:14 AM
Subject: Re: [Zope-dev] bug reporting idea


 seb bacon wrote:
 
  What do people think about a semi-automatic bug reporting system, like
  the gnome bug buddy?

 Gotta be a big -1 from me I'm afraid.

 There's a few issues:

 - huge ammounts of false reports. Imagine someone who sticks up their
first Zope
 site has a slight bug. Everyone who visits it sees the warning and 'does
their
 duty' by reporting the bug.

 - irritation factor for site users - I go to special efforts to kill off
 Netscape's thing when I'm using Mozilla 'cos it just adds more time to
 recovering from a Mozilla crash/hang/etc. With a website, people might
well walk
 away :-(

 however, this last one is the killer for me:

 - security. As someone who runs Zope servers, I don't want _anything_
 automatically dumping potentially senesitive information out of my server.
And
 yes, I am one of those people who sometimes 'cleans' tracebacks before
posting
 them here or in the collecto ;-)

 cheers,

 Chris



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



[Zope-dev] random regex

2001-09-26 Thread seb bacon

I'm finding that the regex which deals with links in structured text
is broken (Zope 2.4.1, Python 2.1).  If you try a link with a query
string:
 
 link:http://www.foo.com?ding=dongbit=bat

the part of the regex which is matching the url only matches up to the
first '=' (or '').

If I run the expression against a string in the python interpreter,
the correct match is returned.  The problem only occurs in
lib/python/StructuredText/DocumentClass.py.  After a lot of playing
around with the expression, I found I could only get it to match
correctly *by running it against the same string three times in a
row*. 

Can anyone else reproduce this problem?  Has anyone any suggestions as
to what might be causing it?  Perhaps it's some kind of boundary
condition in the re module?  I don't really have the time to pursue it
much further, so it looks like I'll have to settle with a Tracker
entry and a nasty hack.

seb


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



Re: [Zope-dev] Vulnerability in Zope

2001-09-24 Thread seb bacon

* Andy McKay [EMAIL PROTECTED] [010924 01:11]:
 Haven't we been complaining about this automatic appending of tracebacks for
 a while? To me this is what log files are for but Im not sure what this
 guy is on. I wouldnt count this as a security vulnerability.

It's not an exploitable vulnerability (which is the only sort of
vulnerability in my book ;) but it's as ugly as a warthog, and it would
be nice to arrange things more gracefully.

seb

 
 - Original Message -
 From: Chris Withers [EMAIL PROTECTED]
 To: Paul Everitt [EMAIL PROTECTED]; ALife [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Sunday, September 23, 2001 10:44 AM
 Subject: Re: [Zope-dev] Vulnerability in Zope
 
 
   Do others consider this a vulnerability?
 
  Yup... especially given the hard-coded (sigh) error page returned for
  authentication error gives out this information :-(
 
  Chris
 

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



Re: [Zope-dev] Traversal Barf

2001-07-12 Thread seb bacon

snip stuff about SERVER_URL KeyError

* Casey Duncan [EMAIL PROTECTED] [010711 16:22]:
  I haven't the time time to pursue this right now, but I'll attempt to
  make a simple, reproduceable example and submit it to the Tracker.
  But just in case I get time to debug it, where might I start?  I'm not
  very familiar with the Traversal / Publishing stuff.
 
 I'm happy to help if I can.

Thanks for the offer.  I'll need to take time to assemble something
that isn't our entire framework for you to have a look at.  Hopefully
by the end of the week...

cheers,

seb

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



Re: [Zope-dev] Traversal Barf

2001-07-11 Thread seb bacon

* Steve Alexander [EMAIL PROTECTED] [010711 07:59]:
 KeyError: SERVER_URL

  I have seen a similar traceback which was due to a bug in CopyPaste.py,
  to which I have submitted a patch. It had to do with a lack of an
  acquisition wrapper at an inopportune time. It looks as though
  absolute_url() is being called without a proper wrapper around the
  object it is begin called for.

 Looks to me like absolute_url() is being called when absolute_url(1) 
 should be used.

I didn't know about the absolute_url(relative=1) switch.  Do virtually
hosted envirnoments not have a SERVER_URL variable?  

However, I don't think this is the problem.  

(1) I'm not in a virtual hosting scenario
(2) it happens at fairly random intervals *on the same page*.  

I can be working on a page, then reload it, and I get the KeyError.
Then I can reload it again and the error goes.  Then I go back to it,
reload it again, and the error appears.  Reload it again and the error
remains.  Reload it again and it disappears again...  You get the
idea. 

This makes it very difficult to debug.  I left my computer on
overnight, without changing any app settings, and haven't seen the
error yet today.

My feeling is that Casey's right.  It's happening on a CMF object
to which I've added BeforeTraverse hooks, which could possibly have
something to do with it.  However, I've actually seen this problem
before, about a year ago, with a completely unrelated ZClass-based
objects.  I remember then noticing that the error occured more often
with Netscape and Opera than IE.  Of course, that theory is utter
nonsense seeing as HTTP is a connectionless protocol and the headers
each browser sends are effectively the same.  However, in the absence
of a reproduceable error, I have to clutch at straws ;-)

seb

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



[Zope-dev] Traversal Barf

2001-07-10 Thread seb bacon

I've been getting a puzzling error.  It's not reliably reproduceable.
It occurs perhaps one time in four when I'm using Opera.  At first, it
appeared only to be related to Opera, but now I'm getting the same
error in netscape.  I can just hit refresh and it works again.
There's no sign of anything like ConflictErrors or the like on the
console.  

Has anyone seen this before?  What could it be?

 snip 

 File /usr/local/Zope/lib/python/DocumentTemplate/DT_Let.py, line 146, in render
(Object: rootpath=absolute_url())
  File /usr/local/Zope/lib/python/DocumentTemplate/DT_Util.py, line 334, in eval
(Object: absolute_url())
(Info: absolute_url)
  File string, line 0, in ?
  File /usr/local/Zope/lib/python/OFS/Traversable.py, line 119, in absolute_url
(Object: Traversable)
KeyError: SERVER_URL

Cheers,

seb

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



Re: [Zope-dev] zope core dump

2001-07-10 Thread seb bacon

* Evan Simpson [EMAIL PROTECTED] [010709 21:12]:
 seb bacon wrote:
 
  I just tried to restart zope and got a core dump.  The backtrace
  (pasted below) indicated a problem with the binascii module, and sure
  enough, trying to import it reproduced the segfault.  I reinstalled
  python and it all worked again.
 
 Reinstalling Python to fix it??  That sounds like filesystem (or disk) 
 corruption to me.  Unless you've installed something between Zope 
 startups that could conceivably have overwritten the module?

That's what I thought.  Thing is, it's on a RAID0+1 system with new,
clean disks, and a current, stable kernel.  Still, that's the only
logical explanation really.  I was just hoping you wouldn't say that
;-)

seb

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



[Zope-dev] zope core dump

2001-07-09 Thread seb bacon

I just tried to restart zope and got a core dump.  The backtrace
(pasted below) indicated a problem with the binascii module, and sure
enough, trying to import it reproduced the segfault.  I reinstalled
python and it all worked again.

This isn't strictly a Zope issue but I wondered if anyone's seen
this before, or can explain what might have happened?  I'm a bit out
of my depth when it comes to this kind of thing...

cheers,

seb



(top of backtrace follows)

#0  0x40181ba3 in frame_dummy ()
   from /home/Zope-2.3.2-src/lib/python2.0/lib-dynload/binascii.so
#1  0x40181a01 in _init ()
   from /home/Zope-2.3.2-src/lib/python2.0/lib-dynload/binascii.so
#2  0x40130c0a in dl_open_worker (a=0xbfffaa48) at dl-open.c:199
#3  0x4000ac3b in _dl_catch_error () at dl-error.c:99
#4  0x40130d1d in _dl_open () at dl-open.c:210
#5  0x4002e3d3 in dlopen_doit (a=0xbfffab58) at dlopen.c:41
#6  0x4000ac3b in _dl_catch_error () at dl-error.c:99
#7  0x4002e8b9 in _dlerror_run (operate=0x4002e3a8 dlopen_doit, 
args=0xbfffab58) at dlerror.c:125
#8  0x4002e393 in __dlopen_check (
file=0xbfffaea4 /home/Zope-2.3.2-src/lib/python2.0/lib-dynload/binascii.so, 
mode=2) at dlopen.c:53
#9  0x8069e14 in _PyImport_GetDynLoadFunc (fqname=0xbfffb334 binascii, 
shortname=0xbfffb334 binascii, 
pathname=0xbfffaea4 /home/Zope-2.3.2-src/lib/python2.0/lib-dynload/binascii.so, 
fp=0x8266ff8) at dynload_shlib.c:81
#10 0x80640c7 in _PyImport_LoadDynamicModule (name=0xbfffb334 binascii, 
pathname=0xbfffaea4 /home/Zope-2.3.2-src/lib/python2.0/lib-dynload/binascii.so, 
fp=0x8266ff8) at ./importdl.c:42

#11 0x806279e in load_module (name=0xbfffb334 binascii, fp=0x8266ff8, 
buf=0xbfffaea4 /home/Zope-2.3.2-src/lib/python2.0/lib-dynload/binascii.so,
 type=3) at import.c:1236
#12 0x8063355 in import_submodule (mod=0x80b7bcc, 
subname=0xbfffb334 binascii, fullname=0xbfffb334 binascii)
at import.c:1755
#13 0x8062f53 in load_next (mod=0x80b7bcc, altmod=0x80b7bcc, 

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



Re: [Zope-dev] dtml-in batching badly

2001-06-19 Thread seb bacon

* Joachim Werner [EMAIL PROTECTED] [010618 20:28]:
  That's not the behaviour I'd expect.  Can anyone confirm this is a
  bug?
 
 As LEE Kwan Soo has already said, it is not a bug, but a clever (too
 clever?) feature that should maybe not be enabled by default. Every second
 week or so somebody runs into this and thinks it is a bug.

Thanks for the hint, folks.

I'm not a zope newbie, and this still bit me.  IMO there's something
fairly wrong with the current setup.  either the default behaviour
should be changed to orphans=0, or the visibility of default values
for tags should be improved (from the book: orphan=int The desired
minimum batch size - no mention of defaults).

Furthermore, the 'feature' doesn't work as I'd expect.  In the example
I posted, for the sequence (1,2,3,4), I got: 

 batch 1: 1
 batch 2: 2 3 4
 batch 3: 3 4
 batch 4: 4

This isn't in batches of at least 3... If it were iterating in minimum
batches of 3, shouldn't that be: 

 batch 1: 1 2 3
 batch 2: 2 3 4
 batch 3: 2 3 4
 batch 4: 2 3 4

It's ugly!

seb


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



[Zope-dev] dtml-in batching badly

2001-06-18 Thread seb bacon

Hi,

First, I don't post to this list normally; is it the best place to
discuss an apparent bug?  

Anyway, the lowdown:

If you iterate over a list with a batch size of 1, it messes up
towards the end of the sequence.  For example, the following code:

 dtml-call REQUEST.set('hoo',(1,2,3,4))
   dtml-in hoo 
 calling lt;dtml-in hoo size=1 start=dtml-var sequence-itemgt;:br
 dtml-in hoo size=1 start=sequence-item 
   dtml-var sequence-item
 /dtml-in hr
 /dtml-in

produces the following output:

 calling dtml-in hoo size=1 start=1:
 1 

 calling dtml-in hoo size=1 start=2:
 2 3 4 

 calling dtml-in hoo size=1 start=3:
 3 4 

 calling dtml-in hoo size=1 start=4:
 4

That's not the behaviour I'd expect.  Can anyone confirm this is a
bug? 

Cheers,

seb 

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



[Zope-dev] clipboard utility

2001-05-08 Thread seb bacon

Just a quick thought - It'd be useful to be able to see what is on
your 'clipboard' when you're copyandpasting.  Would it be a Bad Thing
to factor out the first bit of OFS.CopySupport.manage_pasteObjects into a
separate function, which is callable TTW?  You could then iterate over
the objects on the clipboard in dtml, etc. 

seb

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



Re: [Zope-dev] Catalog in 2.3.1

2001-04-19 Thread seb bacon

* Adrian Hungate [EMAIL PROTECTED] [010419 10:09]:
 Are there some problems with the new catalog?
 
 I have spotted two possible problems:
 1) In CatalogAware, there is a function reindex_all, which appears to have a
 few problems, like calling index_object instead of reindex_object. Also, why
 "sub = self.objectValues()" when sub is never used?
 2) If I search a text index for a value that it does not contain, I get
 nothing back (No surprises there), but if I search for a word that is a
 substring of a word in the index, I get a Type Error (expected integer key).
 Did I do something wrong, or have I hit a bug?

Don't know much about (1), but (2) is certainly a bug, and seems to
have been fixed in CVS.

seb

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



[Zope-dev] Medusa and HTTP/1.1

2001-03-30 Thread Seb Bacon

I've been yelling at my ISP (BTopenworld) for having a badly configured
transparent proxy cache, which caches all content *unless* the source
specifies otherwise.  It's been really messing up my development, and of
course it's a concern for my users too.  Hopefully they'll sort it out.

Anyway, while I was researching for ammunition, I read all the HTTP/1.1
specs (RFC2068).  Interestingly although the RFC strongly recommends
making unvalidated objects uncacheable, it stops short of forbidding it.
I wondered if it might be a good idea to make the ZServer more HTTP/1.1
compliant, by always adding validators to all objects (at present
validators are only added to image / file objects).  This is the
recommended behaviour for servers.  

In the case of the ZServer, I guess the correct behaviour would be to
have every page object return a Last-modified header, which defaults to
the modified date of the newest component of the page.  This behaviour
could then be modified using cache managers like the Accelerated HTTP
Cache Manager.  

Just wondered what anyone else thought.

seb




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



RE: [Zope-dev] 2.3.0 release badness

2001-01-29 Thread Seb Bacon

FWIW, I recall having similar problems with external JavaScript files in
NS - it seemed that the onload event of the body is triggered *before* the
external JS is loaded into the namespace.

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
 Of Steve Alexander
 Sent: 29 January 2001 17:07
 To: Shane Hathaway
 Cc: [EMAIL PROTECTED]
 Subject: Re: [Zope-dev] 2.3.0 release badness


 Shane Hathaway wrote:

  [EMAIL PROTECTED] wrote:
 
  Of course, embedding the style in the page (a-la the Zope management
  interface) gets around this problem, but this is not an option for us.
 
 
  This is a known bug in Netscape.

 I'm intrigued to know what causes it (in more detail than "race
 condition").
 Do you have a URL for a description of the bug?



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




[Zope-dev] IE5 / Medusa bug?

2000-12-14 Thread seb bacon

Tempting fate by claiming a bug...but although I'm sure I'm at fault
here, there's no sensible reason for the results I'm getting.

When I view one of several different pages with IE5, the last 11 bytes
don't reach the browser.  I've got a couple of other people to try it
out.  One of them reported the same symptoms, the other didn't.  I
don't get it with Netscape.

I'd *really* appreciate it if anyone who has IE5 could have a go at

  http://test.jamkit.com

and let me know (you can tell if the bug's happened if the source ends
abruptly with something like '/ta').

Things I've deduced:

- http://test.jamkit.com/index_html works :S

- It's not related to the bad HTML in that example page (I've tried 
  pages with perfect HTML)

- It's related to how I've built the page (the Zope Welcome screen is
  fine, other pages built using the same product don't work.  The
  product I'm building is a folderish thing with lots of extra 
  navigational services)

- it's always the last 11 bytes that are missing, however large the 
  page is

- I've sent exact copies of the HTTP headers to the server, using
  telnet, and there's no problem there

I imagine the fact that I can make it work by adding index_html is the
most telling point, but it's not telling me anything ;)
 
I'll continue my research by eliminating elements until I've nailed down
exactly the bit that's messing it up.  Right now, though, I have to go
to bed.  Meanwhile, any comments?

Cheers,

seb


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




[Zope-dev] is _getCopy slow?

2000-11-15 Thread seb bacon

My product is performing incredibly badly.  I profiled it and got the following 
results:

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
   ...snip...
  4/10.0100.0036.3606.360 WebFactory.py:92(change_theme)
 37/60.4400.0126.3301.055 CopySupport.py:426(_getCopy)
 37/60.7100.0196.2701.045 ExportImport.py:126(importFile)
   380.0200.0011.9300.051 BaseStorage.py:200(tpc_finish)
   381.9100.0501.9100.050 FileStorage.py:768(_finish)

For each folder in the instance, a method change_theme() is called recursively on each 
of its subfolders.  The culprit appears to be the _getCopy call, which in turn calls 
importFile, and takes a whole second to call each time.

The object being copied is in each case typically a folder containing 3 - 5 documents.

Is _getCopy inherently slow, or am I misreading the profiler output, or is it more 
likely there's something wrong with my code?

Cheers,

seb

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




[Zope-dev] Exceptions

2000-11-10 Thread seb bacon

I was just building in some error handling into some UI code, and wanted to catch 
errors relating to duplicate ids.  The problem is that just about every client-side 
error raises the same kind of Exception, a 'Bad Request'.  A quick grep counted 41 
different types of 'Bad Request' in my Zope source.

Wouldn't it be *much* nicer to have a hierarchy of exception types, so that 
applications can deal with them at an arbitrarily granular level?  e.g.

ZopeException
|
`RequestException
  |  |
  |  `XMLException
  |
  `IdException
|  |
|  `ReservedWordException
|
`DuplicateException

Has this discussion taken place before?  Would it be useful?  Would its effort:benfits 
ratio be too great to justify doing?

seb

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




RE: [Zope-dev] Inheritable Propertysheets!???!!?!?!?!!

2000-10-18 Thread Seb Bacon
AFAIK (but I'm no expert), a ZClass inherits its parents' propertysheets and
you can access them in the normal way.  The problem is that the all the
propertysheets have to have different names.  Example:

If your parent class and the child class both have a property sheet called
"Basic", but the child class is hoping to inherit someproperty from the
parent class:

  ParentClass.Propertysheets.Basic.someproperty

is ok, but

  ChildClass.Propertysheets.Basic.someproperty

won't work, because "someproperty" is not in ChildClass's "Basic"
propertysheet.

If your parent class and child class do not share propertysheets with the
same name, you *can* access parent properties:

  ChildClass.Propertysheets.ChildSheet.anotherproperty
  ChildClass.Propertysheets.Basic.someproperty

will both work.

If I'm correct, this is all wrong and a bad thing, surely?

However that was the worst-explained thing I've ever been responsible for
and it's probably wrong.  That particular configuration of punctuation in
the subject header just struck a chord with me...

seb.



 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
 Behalf Of Alexander Schonfeld
 Sent: 18 October 2000 10:25
 To: [EMAIL PROTECTED]
 Subject: Re: [Zope-dev] Inheritable Propertysheets!???!!?!?!?!!


 I guess I can just use dtml methods that return lists and stuff, but is
 that as cool?

 On Wed, 18 Oct 2000 18:21:33 +0900
 Alexander Schonfeld [EMAIL PROTECTED] wrote:

  I'm doing an experiment... If I add more '!' and '?' marks will I get a
  response.  Soon with enough experimentation I can find the optimal
  number and frequency of variation.
 
  I want to inherit the properties of one zclass in another zclass, but
  it seems to cause some namespace clashing... shouldn't this be possible?
  Working with the instance of the class is fine, but inter-zclass
  inheritance (acquisition?) would be nice...
 
  Cool feature?
 
  Am I missing something?
  Thanks,
 
  Alex.
 
  1010011010101001101010100110101010011010
  0  Digital Garage$B!!%G%8%?%k