Re: [Zope-dev] In Defense of ZClasses

2006-09-28 Thread Anthony Baxter

On 9/28/06, Lennart Regebro [EMAIL PROTECTED] wrote:

My 0.02 EUR:

I like the idea and aim of ZClasses. However:

I think the implementation makes them more difficult to create than
disk-based classes, which defeats the purpose. I also think that
without exact knowledge of the limitations of ZClasses they have a
high risk of programming yourself into a corner.


Create, no. *Maintain*, absolutely.

Anthony, who has a vast number of ZClasses dating back rather a long
time now that need a rewrite, sigh.
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

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


Re: [Zope-dev] Zope 2.X BIG Session problems - blocker - our site dies - need help of experience Zope developer, please

2004-03-01 Thread Anthony Baxter
Chris McDonough wrote:
That is very critital and 'blocker' bug for Zope. I do not understand how
people could use Zope on a sites with high load..


They don't use sessions under high load.
Or they don't use the standard session machinery. We use my SQLSession 
stuff, and it's fine under load.

--
Anthony Baxter [EMAIL PROTECTED]
It's never too late to have a happy childhood.
___
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] Core Dump (Zope 2.7, Python 2.3.3, FreeBSD 4.5)

2004-02-18 Thread Anthony Baxter
Jeffrey P Shell wrote:
What should I do next?  Should I familiarize myself with gdb and inspect 
the core?  What are some things I could look for if that's the next step?
I suspect that this is your next step. Try and figure out whether it's 
Python, or the C extensions that ship with Zope, that are at fault. Of 
course, if it's memory corruption, this could be tricky to figure out...



--
Anthony Baxter [EMAIL PROTECTED]
It's never too late to have a happy childhood.
___
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: Resolved security-related collector issues for the public?

2004-01-21 Thread Anthony Baxter

 Jamie Heilman wrote
 Given that ZC clearly doesn't have the resources available to do (a),
 irrespective of if its even technically feasible, we can rule it out.
 And (b), well (b) just screws everybody.  Exploits are a byproduct of
 understanding the vulnerability, they're a natural part of
 experimentation and learning.  You usually can't discuss a vulnerabilty
 without implying the exploit.  If you really want to help people who
 can't help themselves, offer education, not censorship in the guise of
 protection.

Worse yet, hiding the security bugs mean that other people who might
be motivated to supply fixes are unaware of the issue and cannot help.

I'd be +1 on exposing the security bugs - maybe after 2 weeks so that
critical security flaws have a chance to be fixed immediately. But it
should be an automatic thing, not something that requires manual 
intervention.

Anthony
-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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] app = Zope.app() backwards incompatibility notice / discussion

2003-12-21 Thread Anthony Baxter

 Chris McDonough wrote
 Code which used to do:
 
  import Zope
  app = Zope.app()
 
 Will need to do this under 2.7b4+:
 
  import Zope
  Zope.configure('/path/to/configfile')
  app = Zope.app()

Can we get an exception in the first case that states something like
No config file, use Zope.configure('configfile')?

Anthony

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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] Windoz file naming

2003-10-29 Thread Anthony Baxter

 alan milligan wrote
 Guys,
 
 I've just run into a problem and wondered if there was an elegant 
 resolution.
 
 My BastionBanking package contains:
 
   currency.py - pure python
   Currency.py - Zope derivation

The typical approach in Python is to have, e.g. Tkinter, and _tkinter.

But if it's a zope derivation of currency, why not call it zcurrency?


___
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] cvs.zope.org down

2003-10-23 Thread Anthony Baxter

 Toby Dickenson wrote
 That makes me nervous. How will you know that the sources in cvs havent been 
 compromised? 

Surely people can compare checkouts of the various branches (2.6, 2.7) against
downloaded tarballs? We can't do the same with TRUNK, but that should be still
possible to check against, say, a 2.7 beta.

Anthony
-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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: [Zope] Using 2.3.2 for Zope 2.7

2003-10-03 Thread Anthony Baxter

 Fred L. Drake, Jr. wrote
 
 Requiring 2.3 (any flavor) would allow us to drop the copy of the
 logging package from Zope 2.7 and newer.
 
 There are greater benefits for Zope 3, where we have several modules
 and packages laying around that would no longer be needed (logging,
 csv, gettext).

Don't forget you also get the C version of datetime.

 I also don't know that we should consider 2.3.1 acceptable for any
 version of Zope.

Meh. 2.3.1 gets a bad rap. Aside from the fsync problem, there's nothing
fundamentally broken about it.

Anthony

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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] upgrading and getting rid of SearchIndex

2003-08-27 Thread Anthony Baxter

I've got a couple of ZODBs here that's been gradually upgraded over 
time from Zope version to Zope version (I think they were initially 
started on Zope 1.x!)

I'm sick of the SearchIndex deprecation warnings, so I've gone and
re-created all of the catalog indexes. This fixed it for the indexes, 
but it's still showing up - any ideas how I can determine which objects
are still referencing SearchIndex? Is it worth making a little script
that Does The Right Thing when upgrading? It's a pretty trivial script
to open a Data.fs and hunt for indexes, then re-create them - is this
something that could/should be included with Zope?

Anthony
--
Anthony Baxter [EMAIL PROTECTED]
It's never too late to have a happy childhood.


___
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] Very severe memory leak

2003-08-25 Thread Anthony Baxter

 Leonardo Rochael Almeida wrote
 Lately this was not enough, however, as Zope started taking more and
 more memory, to the point that it frequently required more than one
 restart during the day.

Note that running with ZEO will at least mean that your server restarts
happen a lot faster.


-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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] Can't build 2.6.2-b5 on Redhat 7.3

2003-08-24 Thread Anthony Baxter

 Paul Winkler wrote
 Like the subject says... python2.1 wo_pcgi fails...
 
 this is the same python 2.1.3 that I built from source, and which
 I used to build and run zope 2.6.1 for a few months now...
 
 gcc -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -Wall
   -Wstrict-prototypes -fPIC 
   -I/zope/Zope-2.6.2b5-src/lib/Components/ExtensionClass/src
   -I/usr/local/include/python2.1 -c AccessControl/cAccessControl.c 
   -o build/temp.linux-i686-2.1/cAccessControl.o
 In file included from AccessControl/cAccessControl.c:54:
   /zope/Zope-2.6.2b5-src/lib/Components/ExtensionClass/src/ExtensionClass.h:94:20:
   Python.h: No such file or directory

It can't find Python.h - it's looking in /usr/local/include/python2.1
for it - is the file there? Is it readable by the user that the build
is running under?

Anthony
-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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] Packing (still) hosed in 2.6.2?

2003-08-15 Thread Anthony Baxter


Woohoo! Fixed. I created an empty file, then used copyTransactionsFrom
to copy all transactions across. This patched the backpointers. fsrecover.py
should probably get some smarts to do something like this as well, but I've
spent far too long on this problem already... :-/

from ZODB import FileStorage
infilename='/app/zope/dev_csr_server/recover/Data.fs'
outfilename='/app/zope/dev_csr_server/recover/Out.fs'
outfs = FileStorage.FileStorage(outfilename)
infs = FileStorage.FileStorage(infilename)
outfs.copyTransactionsFrom(infs)


I have some small patches to fsdump that outputs expected prev records
alongside the actual ones, is this useful enough to check in?

Anthony


___
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] Packing (still) hosed in 2.6.2?

2003-08-15 Thread Anthony Baxter

 Jeremy Hylton wrote
 I don't recall that any of the pack bugs that we fixed caused this sort of
 error.  My first guess would be that the file is a bit damaged, perhaps in a
 way that the old pack did not check.
 Can you run fsdump.py and see if that output sheds any light.  It will give
 you a detailed text summary of all the transactions and data records.  You
 could use the dump to figure out if, for example, the two numbers in the
 error message are indeed transaction header locations.

Ok. The original error, reformatted for clarity:

ZODB.fspack.CorruptedError: 
/app/zope/dev_csr_server/recover/Data.fs:9200838:
data record does not point to transaction header: 
17391715 != 9200760

Here's the 3 transactions (one before, dead one, one after). There's
definately a screwed transaction there.


offset: 9198385
end pos: 9200752
transaction id: 033bb0f41f05f3aa
trec len: 2367
status: ' '
user: ' jasonb'
description: '/admin_tools/accounts/update_account/manage_edit'
len(extra): 0

offset: 9198463
oid: 000206bb
revid: 033bb0f41f05f3aa
previous record offset: 9193826
transaction offset: 9198385
len(data): 2247
redundant trec len: 2367

offset: 9200760
end pos: 9202513
transaction id: 033bb0f4b80ad42a
trec len: 1753
status: 'u'
user: ' jasonb'
description: '/admin_tools/accounts/update_account/manage_edit'
len(extra): 0

offset: 9200838
oid: 000206bb
revid: 033bb0f4b80ad42a
previous record offset: 17389418   #  woopsie
transaction offset: 17391715   #  woopsie
len(data): 1633
redundant trec len: 1753

offset: 9202521
end pos: 9204883
transaction id: 033bb0f7be87736e
trec len: 2362
status: ' '
user: ' jasonb'
description: '/admin_tools/accounts/update_account/manage_edit'
len(extra): 0

offset: 9202599
oid: 000206bb
revid: 033bb0f7be87736e
previous record offset: 9198463
transaction offset: 9202521
len(data): 2242
redundant trec len: 2362



So, fixing this. fsrecover.py doesn't do the right thing, unfortunately.
It just leaves the broken record alone. I'm not sure if making fsrecover
handle this class of error is useful...

It should be simply a matter of walking through the transactions, and
patching the one that's busted. Or alternately, simply skipping it.

I'll look into fixing this now. More in a bit.

Anthony

___
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] Packing (still) hosed in 2.6.2?

2003-08-14 Thread Anthony Baxter
I remember that 2.6 had issues with packing, but I was under the
impression that they'd been fixed...

However, attempting to pack a Data.fs in 2.6-current-cvs fails 
for me:

  File /export/01/zope/dev_csr_code/lib/python/ZODB/DB.py, line 526, in pack
try: self._storage.pack(t,referencesf)
  File /export/01/zope/dev_csr_code/lib/python/ZODB/FileStorage.py, line 1503, in 
pack
opos = p.pack()
  File /export/01/zope/dev_csr_code/lib/python/ZODB/fspack.py, line 680, in pack
self.gc.findReachable()
  File /export/01/zope/dev_csr_code/lib/python/ZODB/fspack.py, line 464, in 
findReachable
self.buildPackIndex()
  File /export/01/zope/dev_csr_code/lib/python/ZODB/fspack.py, line 486, in 
buildPackIndex
self.checkData(th, tpos, dh, pos)
  File /export/01/zope/dev_csr_code/lib/python/ZODB/fspack.py, line 189, in checkData
: %d != %d, dh.tloc, tpos)
  File /export/01/zope/dev_csr_code/lib/python/ZODB/fspack.py, line 170, in fail
raise CorruptedError(s)
ZODB.fspack.CorruptedError: /app/zope/dev_csr_server/var/Data.fs.packtest:9200838:data 
record does not point to transaction header: 17391715 != 9200760

This is reproducible. The particular Zope that uses this file was 
shut down cleanly before attempting to pack the DB. The code that 
fails to pack is: 

import ZODB
from ZODB import FileStorage
filename='/app/zope/dev_csr_server/var/Data.fs.packtest'
store = FileStorage.FileStorage(filename)
db = ZODB.DB(store)
db.pack() # boom.

Help? I'm using the ZODB that's in the current 2.6 branch of CVS - according
to ZODB/__init__.py it's version 3.1.2. Is a newer version of ZODB going to
help here?

Anthony


___
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] more Zope2.6 fun: ZEO client death.

2003-07-30 Thread Anthony Baxter
So I see ZEO clients here falling over all over the place under current
2.6 with:

2003-07-30T07:01:04 ERROR(200) ZEO uncaptured python exception, 
closing channel ZEO.zrpc.asyncRPC connected '' at 0xc57198 

(exceptions.AttributeError:keys 
[/export/01/zope/dev_ekit/ZServer/medusa/asyncore.py|poll|94] 
[/export/01/zope/dev_ekit/ZServer/medusa/asyncore.py|handle_read_event|395] 
[/export/01/zope/dev_ekit/lib/python/ZEO/smac.py|handle_read|172] 
[/export/01/zope/dev_ekit/lib/python/ZEO/zrpc.py|message_input|282] 
[/export/01/zope/dev_ekit/lib/python/ZEO/ClientStorage.py|out_of_band_hook|191] 
[/export/01/zope/dev_ekit/lib/python/ZEO/Invalidator.py|end|126] 
[/export/01/zope/dev_ekit/lib/python/ZODB/DB.py|invalidate|318])

The relevant code in current 2.6 CVS:

if connection is not None:
version=connection._version
# Update modified in version cache
# XXX must make this work with list or dict to backport to 2.6
 for oid in oids.keys():
h=hash(oid)%131
o=self._miv_cache.get(h, None)
if o is not None and o[0]==oid: del self._miv_cache[h]

(or http://cvs.zope.org/Zope/lib/python/ZODB/DB.py?annotate=1.43.6.4#316 )

The comment is correct. It _does_ need to work with a list or dict.
It doesn't right now. If I'm _really_ _really_ lucky, I can have a
ZEO client stay up for nearly half an hour before it hits this problem
and falls over. The code was committed 2 months ago, as rev 1.43.6.3
Backport atomic invalidations code.

This, to me, seems a showstopper for 2.6.2. 

Anthony

___
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] more Zope2.6 fun: ZEO client death.

2003-07-30 Thread Anthony Baxter

 Anthony Baxter wrote
 So I see ZEO clients here falling over all over the place under current
 2.6 with:
 
 2003-07-30T07:01:04 ERROR(200) ZEO uncaptured python exception, 
 closing channel ZEO.zrpc.asyncRPC connected '' at 0xc57198 
 
 (exceptions.AttributeError:keys 
 [/export/01/zope/dev_ekit/ZServer/medusa/asyncore.py|poll|94] 
 [/export/01/zope/dev_ekit/ZServer/medusa/asyncore.py|handle_read_event|395] 
 [/export/01/zope/dev_ekit/lib/python/ZEO/smac.py|handle_read|172] 
 [/export/01/zope/dev_ekit/lib/python/ZEO/zrpc.py|message_input|282] 
 [/export/01/zope/dev_ekit/lib/python/ZEO/ClientStorage.py|out_of_band_hook|191] 
 [/export/01/zope/dev_ekit/lib/python/ZEO/Invalidator.py|end|126] 
 [/export/01/zope/dev_ekit/lib/python/ZODB/DB.py|invalidate|318])

For what it's worth, the following patch makes it work for me.
RCS file: /export/00/cvsroot/Zope/lib/python/ZODB/DB.py,v
retrieving revision 1.1.1.11
diff -u -r1.1.1.11 DB.py
--- DB.py   2003/07/24 08:35:40 1.1.1.11
+++ DB.py   2003/07/30 08:57:02
@@ -315,6 +315,8 @@
 version=connection._version
 # Update modified in version cache
 # XXX must make this work with list or dict to backport to 2.6
+if type(oids) is type(''):
+oids = { oids: 1 }
 for oid in oids.keys():
 h=hash(oid)%131
 o=self._miv_cache.get(h, None)

Note that despite the comment, it's in fact getting passed a single
oid as a string, not a dict or a list. I have no idea if there's _also_
code that might be passing a list, which will still be broken.

I'm not committing this to the CVS yet, because I'm not 100% positive 
it's the correct fix. It certainly _seems_ to be, and I've now got 
ZEO clients that actually work worth a damn...

Anthony

___
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] more Zope2.6 fun: ZEO client death.

2003-07-30 Thread Anthony Baxter


Jim and Andrew hit the nail on the head - excessive cleverness with 
vendor branches here meant that the ZEO directory had ZEO1 installed. 

Updating it by hand to ZEO2 hasn't made all good and happy, though -
the ZEO/start.py includes
import ThreadedAsync.LoopCallback
at the top of the file, but the sys.path magic that makes this 
available is inside the main() function. Moving the import to
the line after the sys.path magic fixes this.

I'm now getting a failed import for ZODB.utils.oid_repr, which
suggests that I'm going to need to update the ZODB installation
here from the one that's in 2.6.2. :-/




-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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] more Zope2.6 fun: ZEO client death.

2003-07-30 Thread Anthony Baxter

 Anthony Baxter wrote
 Updating it by hand to ZEO2 hasn't made all good and happy, though -
 the ZEO/start.py includes
 import ThreadedAsync.LoopCallback
 at the top of the file, but the sys.path magic that makes this 
 available is inside the main() function. Moving the import to
 the line after the sys.path magic fixes this.
 
 I'm now getting a failed import for ZODB.utils.oid_repr, which
 suggests that I'm going to need to update the ZODB installation
 here from the one that's in 2.6.2. :-/

Ok, this was easy - Zope2.6 requires the ZODB3-3_1-branch ZEO code.

The previous ThreadedAsync import fix still needs to be applied, though...

Anthony

___
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] segfaults in cPersistence under 2.6

2003-07-25 Thread Anthony Baxter
Wow. I'm having _so_ much fun with 2.6. I'm now seeing a reproducible
segfault on startup. 

Program received signal SIGSEGV, Segmentation fault.
0xfe4517c8 in accessed (self=0xedbe58) at ZODB/cPersistence.c:160
160 self-ring.next-prev = self-ring.prev;
(gdb) p self
$1 = (cPersistentObject *) 0xedbe58
(gdb) p self-ring
$2 = {prev = 0xe5d8fc, next = 0xeb7b210c}
(gdb) p self-ring.prev
$3 = (struct CPersistentRing_struct *) 0xe5d8fc
(gdb) p self-ring.next
$4 = (struct CPersistentRing_struct *) 0xeb7b210c
(gdb) p self-ring.next-prev
Cannot access memory at address 0xeb7b210c.

#0  0xfe4517c8 in accessed (self=0xedbe58) at ZODB/cPersistence.c:160
#1  0xfe4526b4 in Per_getattr (self=0xedbe58, oname=0xbf280, 
name=0xbf295 as_key, getattrf=0xfe6d7cec EC_findiattro)
at ZODB/cPersistence.c:524
#2  0xfe452774 in Per_getattro (self=0xedbe58, name=0xbf280)
at ZODB/cPersistence.c:539
#3  0x64bd8 in PyObject_GetAttr (v=0xedbe58, name=0xbf280)
at Objects/object.c:1052
#4  0x21c34 in eval_code2 (co=0x8090f8, globals=0x49daac, locals=0x8, 
args=0xbf280, argcount=2, kws=0x0, kwcount=0, defs=0x0, defcount=0, 
closure=0x0) at Python/ceval.c:1773
#5  0x245b8 in call_eval_code2 (func=0x80ac24, arg=0xd9230c, kw=0x0)
at Python/ceval.c:2979
#6  0x24108 in call_object (func=0x80ac24, arg=0xd9230c, kw=0x0)
at Python/ceval.c:2818
#7  0x23f64 in PyEval_CallObjectWithKeywords (func=0x80ac24, arg=0xd9230c, 
kw=0x0) at Python/ceval.c:2753
#8  0xfe6d4614 in callMethodWithPossibleHook (inst=0xea55d8, meth=0x80ac24, 
args=0xd9230c, kw=0x0)

The code in question is here:

/* Do nothing unless the object is in a cache and not a ghost. */
if (self-cache  self-state = 0) {
CPersistentRing *home = self-cache-ring_home;
self-ring.prev-next = self-ring.next;
 self-ring.next-prev = self-ring.prev;
self-ring.next = home;
self-ring.prev = home-prev;
home-prev-next = self-ring;
home-prev = self-ring;
}

So it seems that the ring's getting corrupted in some way. Any tips on 
tracking this down? I'm thinking of a simple function that just zips
around the ring checking that it's sane in both directions...

(yes, I've confirmed that all the C extensions have been rebuilt cleanly).

--
Anthony Baxter [EMAIL PROTECTED]
It's never too late to have a happy childhood.

___
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] segfaults in cPersistence under 2.6

2003-07-25 Thread Anthony Baxter

More information: I don't see the failure with a fresh Data.fs. The
Data.fs in question is my 2.5 one. I'm running the current HEAD of
Zope-2_6-branch. I packed the Data.fs, the same result.

I've added a simple function to 2.6's cPersistence.c:

static void
ringcheck(CPersistentRing *start)
{   
CPersistentRing *s, *t;
int i=0;

s = start;
t = start;
if (!s) { return; }
for (;;) {
assert(s == s-next-prev);
assert(s == s-prev-next);
s = s-next;
i++;
if (s == t) {
break;
}
}
printf(ringcheck ok, %d items\n, i);
}

I then hooked into calling it from accessed(), ghostify() and unghostify()
and I'm seeing it consistently corrupted after 103 items end up in the 
ring. I also turned on MUCH_RING_CHECKING in cPickleCache.c, but it 
failed to see anything broken.

Interestingly, at the point it's detecting that the ring is busted
(rather than when it trips over the breakage, later on)
##1  0xfe451914 in accessed (self=0xeddb00) at ZODB/cPersistence.c:184
##2  0xfe452834 in Per_getattr (self=0xeddb00, oname=0x594368, 
name=0x59437e bjects, getattrf=0xfe6d7cec EC_findiattro)
at ZODB/cPersistence.c:551
##3  0xfe4528f4 in Per_getattro (self=0xeddb00, name=0x594368)
at ZODB/cPersistence.c:566
##4  0x64bd8 in PyObject_GetAttr (v=0xeddb00, name=0x594368)
at Objects/object.c:1052

Maybe it's just me, but that name=bjects looks suspicious as hell.



___
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] segfaults in cPersistence under 2.6

2003-07-25 Thread Anthony Baxter

 Toby Dickenson wrote
 On Friday 25 July 2003 08:30, Anthony Baxter wrote:
  More information: I don't see the failure with a fresh Data.fs. The
  Data.fs in question is my 2.5 one.
 
 Do you have any custom persistent extension classes stored in that Data.fs 
 that might not have been updated to the 2.6 persistence C API?

Nope. The only C-code Product that's been added to this Zope (aside from those that 
ship with the system) is DCOracle/ZOracleDA, and I'm pretty certain that it's not
doing anything with C code persistence.

Is it possible that there's a C code product that's not been updated? How would I
figure out what it might be?

Anthony

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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: segfaults in cPersistence under 2.6

2003-07-25 Thread Anthony Baxter

*sigh*

So I tried a fresh checkout on a different box, no crash.
Completely nuked old checkout (which was a new checkout 
last night), checked out again, rebuilt, no crash.

Beats me. I'm going to blame the electrician who took out
power to our floor this morning, because it's that or
cosmic rays.


-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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: segfaults in cPersistence under 2.6

2003-07-25 Thread Anthony Baxter

 Tim Peters wrote
 Jeremy and I saw cases of ring corruption while putting together the
 experimental ZODB 3.3, but they were 100% reproducible on all platforms, and
 turned out to have clear causes (some of the C objects we backported from
 ZODB4 were getting ghostified by the ZODB4 code without removing themselves
 from the ZODB3 ring).  So ring corruption rang a bell for me, but not one
 that makes any sense in your context.
 
 Keep your eyes open, Anthony!  If it happens again, I want to know.

One thing that might be worthwhile is to move the MUCH_RING_CHECKING code
from cPickleCache.c into a common file, and use it in cPersistence.c as
well as cPickleCache.c. The latter wasn't seeing the corruption at all,
while the former was.

If this seems like a good idea I'm happy to make the change.

Anthony

___
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 Indexes tab crawls...

2003-07-17 Thread Anthony Baxter

 Andreas Jung wrote
 I agree but the current implementation sux. Switching to a counter based
 solution would solve the problem. The only problem I see is to keep the
 code fully backward compatible.

if there's no counter present:
   create one, do a count of the docs, initialise the counter

display counter



___
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] current zope2 head warnings with cur-cvs python

2003-07-11 Thread Anthony Baxter
Running the current Zope2 HEAD with current-cvs python, 
starting gives the following 3 warnings.

/home/anthony/src/zope/ZopeHead/lib/python/ZServer/medusa/test/max_sockets.py:53: 
DeprecationWarning: integer argument expected, got float
  for i in range(1 + len(sl) * 0.05):

/home/anthony/src/zope/ZopeHead/lib/python/AccessControl/User.py:438: 
DeprecationWarning: assignment shadows builtin
  SpecialUsers.super=emergency_user
--
2003-07-11T22:40:10 PROBLEM(100) OFS.Application Duplicate Product name
After loading Product 'README.txt' from '/tmp/z27/Products',
I skipped the one in '/home/anthony/src/zope/ZopeHead/Products'.



___
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] Versions: should they die?

2003-06-04 Thread Anthony Baxter

 Guido van Rossum wrote
 IMO versions do nothing except complexify the code.  I believe it's an
 official Zope Corp position to discourage them for new projects.  Yet
 Jeremy Hylton seems to think that they are somehow useful and has
 carefully preserved them in ZODB 4 (== Zope 3).  If it were up to me,
 they would have been gone, with a big helping of YAGNI!

Worse yet, they _seem_ like a neat/useful solution. But they're not - 
it's a path that leads to madness and despair. I'd prefer the approach
of making you change some code in lib/python/ to enable them, with them
disabled by default.


-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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] How (in)secure is Zope?

2003-03-13 Thread Anthony Baxter

 Jamie Heilman wrote
 Without properly configured resource limits, it is trivial to use an
 exposed Zope instance to exhaust host resources. 

If this is a real risk for you, you should be using per-process limits 
to make sure that the host can't be completely destroyed. Sure, zope 
will fall over when it hits the limit, but that's better than taking 
out the whole host.

Yes, the existing bugs should (and probably will) be addressed as
they're found, but as a belt-and-braces kinda thing, limits are also
useful.


 
 Zope's bug collector hides security related bugs until they are deemed
 worth of display by the controllers.  Personally I think full
 disclosure is preferable to secrecy, but I'm willing to play by the
 rules laid down as long as I think the system is working for the
 general benefit of the community.  You may have noticed I haven't been
 terribly secretive about recent cross site scripting or cache
 poisoning issues, and that can be attributed to, in part, my growing
 disastifaction with the system.

That's really a separate issue that is a zope corp thing to address...

Anthony

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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] if-then-else expression in Python

2003-02-09 Thread Anthony Baxter

 Dieter Maurer wrote
 Currently, there is a heated debate in c.l.p about PEP 308, an
 if-then-else expression for Python.
 Some vote should decide its fate.
 
 I think, we want an if-then-else expression for Zope, as it would
 make decisions in TALES expressions much clearer and more
 robust than with the ... and ... or hack or the test function which
 evaluates all arguments before testing (which confuses newbies).
 
 Do not forget to vote!

But please, please, don't just vote yes or no blindly. Read the
vote proposal, when it's posted, and think about it. 

And _please_ don't go out soliciting no votes or yes votes from
people who aren't going to read the proposal. 

Anthony

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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] zope and python compatibility

2003-01-09 Thread Anthony Baxter

 Leonardo Rochael Almeida wrote
 It is possible to run 2.6 under Python 2.2, but it's unsupported

Note that you'll need 2.2.2. 2.2 and 2.2.1 have bugs that Zope triggers.


-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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] ZCatalogs with SearchIndexes in ZODB - how to fix?

2002-07-24 Thread Anthony Baxter


I've got a Data.fs which has been gradually moved from Zope version to
zope version (it's quite possible that the same Data.fs was originally a
Data.bbb!)

We've been getting the SearchIndex deprecation warning for some time, and
I'd like to fix it - as far as I can tell, it's caused by some ZCatalog 
objects in the ZODB that were created back when using SearchIndex was the 
hip'n'groovy way to impress the other catalog objects. 

Short of manually deleting and re-creating all the ZCatalog objects in the
ZODB, is there a way to get these puppies updated to get rid of the warnings?

Thanks,
Anthony

--
Anthony Baxter [EMAIL PROTECTED]
It's never too late to have a happy childhood.


___
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] ACTION: 2.6 project status updates...

2002-06-07 Thread Anthony Baxter


I haven't yet finished of the CallProfiler bits, but it's a long weekend
here, and I plan to attack and finish it over this weekend. I've had more
of a go at the refresh problem, and I think I'll just make sure there's no
refresh.txt for now :(

Anthony
-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.



___
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 process killed

2002-05-18 Thread Anthony Baxter



 It very nice to hear that I can simply upgrade and my problem will go away :)
 And it did!  Just thought I'd mention this since I didn't find anything
 in the collector about it.

maybe not in the zope collector, but there's several copies of it (and
variants) in the python bugtracker :)

If there was a Zope FAQ, I'd say this one'd get an entry.

Anthony

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.



___
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 process killed

2002-05-17 Thread Anthony Baxter


 =?ISO-8859-1?Q?Roch=E9?= Compaan wrote
 When I try to view or delete a particular folder the Zope process (on
 Zope 2.4.3) suddenly gets killed with this message in the log:
 
 python2.1: Python/ceval.c:695: eval_code2: Assertion `(stack_pointer -
 f-f_valuestack) = f-f_stacksize' failed.

You should be running 2.4.4 or 2.5.1. This is a known bug in 2.4.3.
(It only shows up under python 2.1.3 or later - earlier versions of
python silently corrupt memory).

Anthony
-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.



___
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] Tyring to FTP to Zope running behind firewall, get login box but no directory listing

2002-04-23 Thread Anthony Baxter


 
 Do not be so quick to conclude that. FTP *has* firewall problems. since
 I know nothing of the firewall, I can not help in too much detail.

ftp connections, by default, go from the ftp server-client for the data
connections. the data is carried by a seperate channel, on a randomly 
numbered port. I'd say it's almost _certainly_ a firewall issue.


-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.



___
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] Speaking of 2.6...

2002-04-18 Thread Anthony Baxter



 Chris - stay in the stone age, I hear they have fire there ;-)

mmm. fre pretty. 

Page Templates burn, don't dey. Be a shame if somefing was to happen
to your nice shiny website.

Anthony, who might have been spending too long in the bad places of SQL.


___
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] Speaking of 2.6...

2002-04-17 Thread Anthony Baxter


 Brian Lloyd wrote
 We've been trying hard to adopt this bit of Zen. If you write 
 REQUEST.set, you can look at it and easily see what is happening. 
 Same with SESSION.set. 

The other reason why I made SESSION all shouty-caps in SQLSession[*]
is to make it _very_ obvious when it's being used. Storing stuff in 
a session is often one of the critical bits of a web request, so it's
important to me that it be clear and easy to see this.

Anthony

[*] I assume the standard Zope session stuff has adopted the SESSION
convention now? it wasn't in CST

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.




___
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] Speaking of 2.6...

2002-04-17 Thread Anthony Baxter


 Toby Dickenson wrote
 Do you remember what we had to type to achieve the equivalent of
 dtml-let, before dtml-let was introduced? That *was* horrible.

gee, I dunno...
dtml-with _.namespace(name='foo') /dtml-with
has a sort of charm to it. 

sheesh, it's still not as ugly as ZPT.

deliberately-trolling-for-ChrisW-ly yrs,
Anthony

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.




___
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] Python 2.1.3 is out.

2002-04-08 Thread Anthony Baxter


Python 2.1.3 is out. See http://www.python.org/2.1.3/

This release _should_ now make Zope happy - it has the recent
bugfix for the GC/Trashcan interaction ugliness.

I'd recommend anyone running Zope 2.4 or 2.5 to upgrade to this
version, in particular if you use PythonScripts.

Anthony



___
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] Final Python 2.1.x and Zope 2.5.x releases?

2002-04-02 Thread Anthony Baxter


 Adam Manock wrote
 Does anyone know of a release timeline for a new bugfix release of Python, 
 be it 2.1.2a or 2.1.3?

I'm looking at it at the moment - I plan to roll out a version of this today
on some of my ZEO clients and check it's stable. Sometime next week would be
my guess for a release. At the moment it's looking like a source release, with
RPMs and and ActiveState windows packages. I don't think there'll be a PythonLabs
windows binary release, and there wasn't a 2.1.2 Mac binary release, either...

Anthony
-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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] ZClass Constructor Cleanup for 2.6

2002-04-01 Thread Anthony Baxter

 Casey Duncan wrote
 I don't think this is a big enough change to warrant a real proposal, so 
 I'll shoot this out here:
 
 Does anyone see a problem with changing the default generated 
 constructor method for ZClasses to a python script in Zope 2.6?

+1.


There's always some funniness in ZClass constructors anyway with
the stupid acquisition tricks that get played, so making it a 
pythonscript can only make it more obvious what's going on...

___
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 Anthony Baxter

 seb bacon wrote
 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?

and on the same box ... :)

Anthony

___
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] A thought for 2.6 about various leaks and memory problems

2002-03-19 Thread Anthony Baxter

 Adrian Hungate wrote
 moved to a different thread or earlier, before the fork, so that we could
 simply kill senile threads without killing the entire shooting match?

unfortunately apache does this with seperate processes, not threads.

memory corruption and leaks aren't solved by offing threads, unfortunately.

the equivalent would be to start a bunch of single threaded zeo clients on
a machine, with a loadbalancer in front of them, and periodically off one.

the only decent loadbalancers I've seen, however, are pretty heavy weight,
flaky, limited in functionality, or some combination of all three.

also, the start time for a new ZEO client is non-trivial.

Anthony

___
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-17 Thread Anthony Baxter


 seb bacon wrote
 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.

What does machine mean? The host running the ZEO server? The host
running the ZEO client? What about those of us who run multiple ZEO clients
on the same machine (multi-cpu, test instances, whatever)...

Anthony

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never to late to have a happy childhood.


___
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] more on the segfault saga

2002-03-14 Thread Anthony Baxter


 Dieter Maurer wrote
 Just a wild guess: is the GC guaranteed to be thread safe?

Yep. 

The GC is _almost_ certainly not the problem here - it's just that the
GC is the poor bunny that has to walk through the objects in memory. So
when something's been mangled, the GC is the thing that falls over and
breaks.

I think I've mentioned it before, but looking at the object _before_
the corrupted one in memory might be a useful thing to try...

Anthony

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never to late to have a happy childhood.


___
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.4.4b1 and Python 2.1.2 crash again

2002-03-05 Thread Anthony Baxter


 Nicola Larosa wrote
 you should read the Stability Howto:
 
 http://www.zope.org/Members/matt/StabilityHOWTO

This docco doesn't clearly state that you MUST recompile your
pythonscripts when upgrading to 2.4.4+ (when do we see a real
2.4.4, anyway?)

Anthony

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never to late to have a happy childhood.


___
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 Anthony Baxter


 Brian Lloyd wrote
 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. 

This would resolve the problems, yes. It's a nice approach to take, 
and it also allows the object to register a different method to be
patched.

 Think of this as consentual monkey-patching (hmm... may have to 
 change this metaphor soon!). 

Call it gorilla-patching - it's like monkey-patching.[1]


 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.

This would suggest that the CallProfiler shouldn't be an add-on product,
then, but installed in lib/python ? What's the best approach there? 
Rich didn't get any response on zope-coders about this...

Anthony

[1]
Seagoon: Here! Have a gorilla. 
Eccles:  Oh! Thanks. 
Grams:   [Two gorillas fighting, or if you can't get that, lions.] 
Eccles:  Oww! Oww! Ooh! Oww! Hey! These gorillas are strong. Here!
 Have one of my monkeys -- they're milder.
-- http://www.residents.com/Goons/napoleon.piano.html
-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never to late to have a happy childhood.
Seagoon:
Here! Have a gorilla. Eccles:
Oh! Thanks. Grams:
[Two gorillas fighting, or if you can't get that, lions.] Eccles:
Oww! Oww! Ooh! Oww! Hey! These gorillas are strong. Here! Have one of my monkeys -- 
they're milder.

___
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-03 Thread Anthony Baxter


 seb bacon wrote
  [CallProfiler]
 FWIW, my own opinion is that it should not take the 'MonkeyPatch'
 approach.

Why? Any other approach means a slowdown in the Zope code regardless of
whether profiling is turned on or off... monkeypatching means you end
up with zero slowdown when not profiling.

Anthony
-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never to late to have a happy childhood.


___
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] still segfaults, this time no ZMySQLDA

2002-02-27 Thread Anthony Baxter


 Leonardo Rochael Almeida wrote
 So, what should I try now?

I've been unable to keep up with email lately (no decent net
connection) but can I ask if you've got a core dump at all?
If so, where was it? Inside the garbage collector, I'm guessing...
If so, what was the object _before_ the corrupted object in memory?
(Had I thought to look at this when I had similar problems, I 
would have picked up the stupid stacksize bug much earlier...)
If you haven't recompiled the scripts after upgrading to a working
PythonScripts, you'll still see crashes.

When you run with '-D', do you get a lot of Script (Python) foo needs to
be recompiled? If the problem is that you can't recompile the scripts,
why not shut it all down, manually mount the ZODB, and recompile 10 
scripts at a time? (This is a not-particularly difficult task - I can
give a sample bit of source if it would help...)

Anthony


-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never to late to have a happy childhood.


___
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] Load balancing over FastCGI

2002-02-04 Thread anthony baxter

(apologies for formatting oddness - at conference, so don't have access
to normal mailer. _hopefully_ this will be in plain text...)

Andy Sydelko wrote:

Has anyone actually used multiple FastCgiExternalServer
directives within apache, each pointing to a separate ZEO 
client, to load balance?

We do this by pointing the apache fastcgi at a loadbalancer, and
loadbalancing the fastcgi ports that way. I tried to do it with
apache and gave up. It's just too awful.

Anthony



___
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-01-31 Thread Anthony Baxter

 Richard Jones wrote
 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)

From my point of view, this is a critical piece for Zope - right now, 
trying to work out what's going on in a Zope page render is somewhat
painful. We found once we'd turned this onto our production code (and
Richard had made my initial vile hack actually work in a way that didn't
cause bleeding from the brain) we were able to very very quickly spot
a whole lot of stuff that was Just Not Doing The Right Thing. 

Unfortunately, the existing python profiling stuff is at too low a 
level to be useful - this stuff really fills a need. 

Plus, if it's integrated into Zope, Richard doesn't have to spend work 
time on maintaining it :)

Anthony

___
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] Python 2.1.2 Zope 2.4.1

2002-01-28 Thread Anthony Baxter

 Olivier Deckmyn wrote
 assertion STACK_LEVEL() = f-f_stacksize failed: file Python/ceval.c,
 line 687

This is a new assertion, put in to catch the case where the RestrictedCompiler
code used by PythonScripts incorrectly calculates stack size.

 After some hours of researches, I have a (dirty, really) fix :
 I had to modify Python sources and hack line 687 in ceval.c  : I removed
 it...

This is _not_ a fix, any more than putting in a signal handler for 
SIGSEGV that ignored it and kept going would be a fix for a segfault
bug. The bug is _real_ and causes memory corruption. The most likely 
result is that Zope will crash mysteriously, some time later down the 
track, but it's also possible you'll end up with random data corruption. 
This is _far_ worse than just a crash.

If upgrading to 2.5 or 2.4.4-to-be is not an issue, just replace the
lib/python/RestrictedPython package in your Zope installation and reboot.

Please, please, please, don't propagate dodgy and incorrect fixes like
the above (removing the assertion). The assertion is in the code for a
very, very good reason.

Anthony

___
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] Core dumps - How to find out the bug?

2002-01-21 Thread Anthony Baxter


 =?iso-8859-1?Q?Dario_Lopez-K=E4sten?= wrote
 I only have core dumps to work from. I include the stack from latest core
 dump.
 I am using python 2.1.2 (release), Zope2.4.3 release, RedHat Linux 7.2.
 Python is compiled --without-pymalloc

Hm. The bug report you sent is pretty much exactly what I'd expect when
hitting the Python Compiler stacksize bug. I suspect the problem here is
that Zope 2.4.3 provides it's own complete copy of the Compiler, so you're
not seeing Jeremy's fixes. Possible solutions:

  - wait for Zope 2.4.4
  - upgrade to the current CVS version of the Zope 2.4 branch, Zope-2_4-branch.
  This contains what will become (hopefully, shortly) 2.4.4. I'm assuming 
  there's a 2.4.4 planned.
  - upgrade to the current 2.5 beta.


 
 -
 #0  0x0806fb77 in subtract_refs (containers=0x80b228c) at
 ./Modules/gcmodule.c:170
 #1  0x0806ff74 in collect (young=0x80b228c, old=0x80b2298) at
 ./Modules/gcmodule.c:382
 #2  0x080701c2 in collect_generations () at
 ./Modules/gcmodule.c:479

Anthony

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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] Re: Python 2.1.2 does not fix the signal 11 crashing problem !!!!!!!!!!!

2002-01-21 Thread Anthony Baxter


 Harald Koschinski wrote
 Hallo,
 
 after switching to python 2.1.2 compiled with GC 
  (intranet:/usr/local/src/Python-2.1.2 # ./configure --without-pymalloc)
 the crashes are back again :-(((
 

Which version of Zope? Does it have the RestrictedCompiler fix?

As far as I am aware, Zope 2.4 includes it's own version of the
Compiler code, and the current release of 2.4 still has the stacksize
bug.

Anthony

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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] Re: Python 2.1.2 does not fix the signal 11 crashing problem !!!!!!!!!!!

2002-01-21 Thread Anthony Baxter


 Matthew T. Kromer wrote
 2.4.4 (which should be mostly the equivalent of the Zope-2_4-branch in 
 our CVS) hasn't been extensively tested.  There are a LOT of things that 
 I'm aware of that _can_ cause crashes, ie in MySQL when the database 
 object switches threads, it can get unhappy (I think something in MySQL 
 may have thread-local state).

In that case, how about cutting a version which is 2.4.3 + the compiler
fixes? Crashes are bad, and it would be very nice to Make Them Go Away. :)

Anthony

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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: Python 2.1.2 does not fix the signal 11 crashing problem !!!!!!!!!!!

2002-01-21 Thread Anthony Baxter


 Behrens Matt - Grand Rapids wrote
 Anthony Baxter wrote:
 
  In that case, how about cutting a version which is 2.4.3 + the compiler
  fixes? Crashes are bad, and it would be very nice to Make Them Go Away. :)
 
 You already have that.  Check out the Zope-2_4-branch from CVS (see 
 http://dev.zope.org/CVS for info).  Now leave poor Matt alone :-)

I know - I do have this. Plenty of other people, tho, do NOT have the
ability to build their own version of Zope. Requiring people to follow
a somewhat arcane set of instructions and steps merely to get a stable
version of Zope that doesn't crash strikes me as... odd.

Anthony

___
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-09 Thread Anthony Baxter


 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.

Well, I know _I_ think Session support is important (hint: I wouldn't
have spent the effort on SQLSession otherwise). If the decision was
made to take the CST package and change the interface before making 
it part of the preinstalled set of Products, I'd _strongly_ urge that
the documentation for it be updated.

Anthony
-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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 2.4 crashes -- possible fix identified, other solutions also suggested

2001-12-20 Thread Anthony Baxter


 Matthew T. Kromer wrote
 Anthony Baxter is anticipating a Python 2.1.2 beta real soon now (probably
 this weekend) so I am going to try to get that into Zope 2.5's binary
 releases, although we may put out a Zope 2.5 beta 3 first.  This will
 include the necessary Python patches to ceval.c to fix the frame bug; after
 it hits the streets Python 2.1.2 will become our recommended Python for
 Zope.

That's still the plan - ripping along through the todo list at the moment.
I'm just double-quadruple-triple checking the safety of the patch to make
solaris threading not suck as a backport.

Note that it's not going to be a beta, but a release candidate - it shouldn't
be necessary to have a beta for a bugfix release.

Anthony

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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 2.4 crashes -- possible fix identified, other solutions also suggested

2001-12-20 Thread Anthony Baxter


 Matthew T. Kromer wrote
 Well, if you want to grab what is probably going to turn in to Python 
 2.1.2 from CVS, you can get the release21-maint branch from 
 :pserver:[EMAIL PROTECTED]:/cvsroot/python package 
 python.

I'd _love_ it if people wanted to do this, once the release candidate is out -
I don't have access to a massive number of platforms, so I'd like to know if
I've accidentally broken anything. :) 

Watch this space... 


-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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] disabling gc does not necessarily hide memory corruption

2001-12-18 Thread Anthony Baxter


 Jeremy Hylton wrote
 Actually, I don't think the leaks haven't been fixed in CVS.  It would
 be at best painful to try and get the compiler code to work without
 cycle GC.  I really don't want to have to do it.

In that case, there should probably be a readme note or similar saying if
you're using pythonscripts, don't bother without cyclic GC. 

For me, I run the ZEO server without GC (because that stops the stomped
stack bug killing the ZEO server), and the ZEO clients with GC (and just
wear the restarts.

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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] disabling gc does not necessarily hide memory corruption

2001-12-17 Thread Anthony Baxter

 Chris McDonough wrote
 This behavior is with the patches to the compiler package that were the 
 genesis of this thread?

No, prior to that. I posted something about it to zope-dev an age or six
ago - it seemed like the RestrictedPython compiler had mungo mungo numbers
of cycles, and we found we couldn't run a zeo client on a nogc python for
more than about an hour. 

ah - here's the message I sent:

Date:Wed, 17 Oct 2001 18:10:27 +1000
To:  [EMAIL PROTECTED]
From:Anthony Baxter [EMAIL PROTECTED]
Subject: RestrictedPython under no-GC 2.1 seems to leak a hell of a lot.

Running current Zope 2.4 CVS under python 2.1 built --without-cycle-gc,
I'm seeing an absolutely _enormous_ amount of leaked objects in 
RestrictedPython. This is on one of our ZEO clients, after 45 minutes
of runtime. The deltas are after 5 minutes.

RestrictedPython.compiler.transformer.Transformer 146527 163546 +17019 
RestrictedPython.compiler.visitor.ASTVisitor 55842 62333 +6491 
RestrictedPython.compiler.misc.Set 34827 38843 +4016 
RestrictedPython.compiler.pyassem.FlowGraph 19173 21413 +2240 
RestrictedPython.compiler.ast.Stmt 19174 21390 +2216 
RestrictedPython.compiler.pycodegen.CodeGenerator 18333 20486 +2153 
RestrictedPython.compiler.symbols.SymbolVisitor 15303 17096 +1793 
RestrictedPython.compiler.ast.Name 13917 15542 +1625 
RestrictedPython.compiler.ast.Const 14083 15691 +1608 
RestrictedPython.compiler.ast.CallFunc 13798 15405 +1607 
RestrictedPython.MutatingWalker.MutatingWalker 11968 13360 +1392 
RestrictedPython.compiler.ast.Return 11986 13371 +1385 
RestrictedPython.compiler.ast.Function 11986 13371 +1385 
RestrictedPython.RestrictionMutator.RestrictionMutator 11800 13166 +1366 
RestrictedPython.compiler.pycodegen.LocalNameFinder 11028 12322 +1294 
RestrictedPython.compiler.pyassem.Block 10226 11401 +1175 
RestrictedPython.compiler.pyassem.PyFlowGraph 9587 10707 +1120 
RestrictedPython.compiler.misc.Stack 9587 10703 +1116 
RestrictedPython.compiler.ast.Module 9590 10698 +1108 
RestrictedPython.compiler.ast.Global 5761 6433 +672 
RestrictedPython.compiler.ast.Assign 5761 6433 +672 
RestrictedPython.compiler.ast.AssName 5761 6433 +672

[]


___
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] Any interest in a set of Zope products to support CVS-versioned, XML/XSLT-based Zope development?

2001-10-30 Thread Anthony Baxter


You might want to look at the fishbowl project on this that was
recently announced:

  http://dev.zope.org/Projects/Wikis/DevSite/Projects/ZopeVersionControl/
 
(URL copied from Brian Lloyd's earlier email - with a 7s delay in the AU-US
net link at the moment, I can't check it's correct, unfortunately...)

Anthony
-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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] login prompt after letting user change his password.

2001-10-28 Thread Anthony Baxter


Or use a session cookie for the user/pw - when the user changes their 
password, change it in the current session, as well. Basic Auth is not
going to allow you to do this at all[1]

Anthony

[1] ok, there's a possibility that you could do browser specific JS to
hack the stored auth credentials, but it's pretty unlikely...

 Steve Alexander wrote
 Chris Withers wrote:
 
  Clark OBrien wrote:
  
 It is really confusing for the login to pop up at this point-
 particularly because
 it looks like it is asking for permissions to change the password (
 needs OLD password)
 
  
  You're asking for Web browser functionaility to be changed, go bug W3C,
  Microsoft, Netscape and any other browser vendor you want to ;-)
 
 
 You could program something really fancy into the UserFolder that 
 continued to allow the old password until the new password has been 
 used, or one day has passed.
 
 --
 Steve Alexander
 Software Engineer
 Cat-Box limited
 
 
 
 ___
 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 )
 

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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] help identifying a structure inside Zope.

2001-10-24 Thread Anthony Baxter


I'm hunting for a very very obscure python-crashing bug on
Solaris with Zope2.4 on Python2.1.1. The structure that's 
getting corrupted looks something like:

 299, (300, (301, (302, (303, ( 304, ( 3, c_o_s ) ) ) ) ) ) 
(nested tuples)

I'm wondering if anyone can think of somewhere inside Zope that
generates this sort of structure? c_o_s is a string we use in
our code as a property, a database column, and a REQUEST variable.

As far as we can tell, it's not something being generated by
our code...

Thanks,
Anthony


--
Anthony Baxter [EMAIL PROTECTED]
It's never too late to have a happy childhood.


___
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] help identifying a structure inside Zope.

2001-10-24 Thread Anthony Baxter


 Chris McDonough wrote
 I'd be tempted to suspect the BTrees module setstate code.

Yeah? This is something that you'd expect to see with it?

Anthony

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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] RestrictedPython under no-GC 2.1 seems to leak a hell of a lot.

2001-10-17 Thread Anthony Baxter

Running current Zope 2.4 CVS under python 2.1 built --without-cycle-gc,
I'm seeing an absolutely _enormous_ amount of leaked objects in 
RestrictedPython. This is on one of our ZEO clients, after 45 minutes
of runtime. The deltas are after 5 minutes.

RestrictedPython.compiler.transformer.Transformer 146527 163546 +17019 
RestrictedPython.compiler.visitor.ASTVisitor 55842 62333 +6491 
RestrictedPython.compiler.misc.Set 34827 38843 +4016 
RestrictedPython.compiler.pyassem.FlowGraph 19173 21413 +2240 
RestrictedPython.compiler.ast.Stmt 19174 21390 +2216 
RestrictedPython.compiler.pycodegen.CodeGenerator 18333 20486 +2153 
RestrictedPython.compiler.symbols.SymbolVisitor 15303 17096 +1793 
RestrictedPython.compiler.ast.Name 13917 15542 +1625 
RestrictedPython.compiler.ast.Const 14083 15691 +1608 
RestrictedPython.compiler.ast.CallFunc 13798 15405 +1607 
RestrictedPython.MutatingWalker.MutatingWalker 11968 13360 +1392 
RestrictedPython.compiler.ast.Return 11986 13371 +1385 
RestrictedPython.compiler.ast.Function 11986 13371 +1385 
RestrictedPython.RestrictionMutator.RestrictionMutator 11800 13166 +1366 
RestrictedPython.compiler.pycodegen.LocalNameFinder 11028 12322 +1294 
RestrictedPython.compiler.pyassem.Block 10226 11401 +1175 
RestrictedPython.compiler.pyassem.PyFlowGraph 9587 10707 +1120 
RestrictedPython.compiler.misc.Stack 9587 10703 +1116 
RestrictedPython.compiler.ast.Module 9590 10698 +1108 
RestrictedPython.compiler.ast.Global 5761 6433 +672 
RestrictedPython.compiler.ast.Assign 5761 6433 +672 
RestrictedPython.compiler.ast.AssName 5761 6433 +672

After around an hour of runtime, the various ZEO clients are
chewing about 100M of virtual memory each, and growing at a 
fearsome fearsome rate...

Is this just a known problem, deal with it? I can't just turn back
on the garbage collector, as it's causing random segfaults (yes, I'm
working on trying to fix this as I speak^H^H^H^H^Htype).

Anthony

___
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] CVS: Zope-2_4-branch HelpSys b0rken.

2001-10-11 Thread Anthony Baxter



  For the URL http://ekit-host.ekorp.com:8880/HelpSys/menu
 This URL is not reachable

Yes, that's right. It's an internal system. 


 I can't reproduce this problem with a fresh 2.4 checkout. Maybe they are
 running
 some 2.4 alpha oder beta version. This functionality in the released Zope
 2.4 versions
 is working.

I'm running CVS: Zope-2_4-branch, as the subject states. As of today. I'm
mentioning this so that if there _is_ a problem in the current CVS (there's
been a number of CVS commits related to catalog on that branch lately) it
can be fixed before the next 2.4 release.



-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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] making wo_pcgi only rebuild when necessary.

2001-09-25 Thread Anthony Baxter

I've got Zope code and installation pretty heavily automated here, 
but one thing that takes a while is that after a cvs update, I have
to do a complete wo_pcgi on each box to make sure everything's up to
date. This forces everything to be rebuilt. Is there anything that
could be done to make it only rebuild what's needed?

Anthony

___
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] ZPL and GPL

2001-06-26 Thread Anthony Baxter


 Michael R. Bernstein wrote
 I guess I don't understand how licensing Python under the GPL would
 prevent people from writing proprietary software in Python.

embedded or frozen python. I know I'd much rather see Python embedded
in applications than Tcl or (god help us all) Javascript/ECCCHMAScript.
I can't see cisco agreeing to opensource IOS so that they can embed a
decent language in it.


-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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] ZPL and GPL

2001-06-25 Thread Anthony Baxter


 Jerome Alet wrote
 I personnally would love to see both Python and Zope be GPLed.

Why? No really. Exactly what do you gain from this? Assuming Zope's
license becomes GPL compatible, any packages you release you can choose
to GPL. Why do you think having the GPL is a good thing for the core
package? Ideological reasons? How does releasing under the GPL make
the world a better place?

Anthony, who's seen too much of the GPLd-for-GPLs-sake.
-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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] ZPL and GPL

2001-06-25 Thread Anthony Baxter


 Michael R. Bernstein wrote
 Unless I've misunderstood something (which is certainly possible), DC
 doesn't seem to have anything to lose by switching from a BSD style
 license to the GPL (or a GPL style license with an additional optional
 attribution clause), and quite a bit to gain.

They will probably lose developer mindshare. Given how important 
this is to Zope's growth (and to DC's growth, as a result), this 
is far far more important than the karma from switching to the 
far less flexible GPL. 

Your argument seems to be that DC would want to control other companies
ability to make distributions derived from Zope - unless they've been 
hiding this nefarious plan from the community, this doesn't seem to
be an objective for them.

As far as a contributor to Zope wanting to keep their work free, then
if the ZPL is GPL compatible, they can make their components GPLd.

Anthony

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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] ZEO Clients, broken servers, and Z2.pid

2001-05-09 Thread Anthony Baxter

As far as I can see, ZEO clients don't write a pid to Z2.pid until
after they've successfully connected to a storage. Is there a reason
for this?

Ta,
Anthony

___
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] ZEO client-server protocol endian-safe?

2001-05-08 Thread Anthony Baxter


Any known gotchas with running ZEO server and ZEO client on boxes of
different endianness? e.g. the server running on sun solaris/sparc,
while the clients are on x86 linux boxes.

I'd expect it to be fine, but am feeling paranoid...

ta,
Anthony.

___
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] Greedy except clauses

2001-02-09 Thread Anthony Baxter


I took the list I generated, and started looking at a number of them.
There seems to be a number of different types of case:

There's the "just too slack to specify the exception" case --
generally easy, if tedious, to fix.
There's the "we're rendering DTML, it could raise an exception
of some sort, let's just eat it" -- this is almost certainly
the worst sort.
Then there's the 'gods only know what this is for' ones -- I 
think these might best be approached by putting a logging
statement in the except body just to get an idea of what
they're doing.

There's certainly ones that are exceptions around too many lines,
when it's obviously just meant to catch the one line.

I just realised the list I put up has a few that are wrong, for
some reason - my simple-minded script was obviously too simple-minded -
will fix.

(hm, in the case where a bare except _is_ genuinely what's wanted, 
could we put a comment in the source to make it easier to strip 
them out).

Anthony, working towards an "except:" free-world :)

 Jeremy Hylton wrote
  "AB" == Anthony Baxter [EMAIL PROTECTED] writes:
 
   AB Now, it's obvious that not all of these are bad - some are
   AB probably fine - but there's also many that are _not_ good. The
   AB one in MailHost.py does eat exceptions. I'm sure there are
   AB others.
 
 I am probably a bit idiosyncratic, but I prefer to avoid bare excepts
 at all costs.  I often use "except Exception:", otherwise I add a
 comment that specifically notes that I intend to catch everything.
 Otherwise, you can't tell the difference between intentional and
 accidental use.
 
   AB I've done a quickie hack script that runs over the source and
   AB produces a list of matches to lines in the file, and links to a
   AB lightly patched viewcvs so that you can jump straight to the
   AB lines. It seems like it would be reasonably easy to make this a
   AB bit more sophisticated to include things like the nesting 'def'
   AB and 'class' method.
 
   AB This, to me, seems like a pretty nice community type task -
   AB people could take one of them off the list of unchecked ones,
   AB and have a look through the code... no?
 
 It would also be interesting to see how many try/except blocks are
 including more code than they should.  The larger the block, the more
 likely that a line of code raises an error that the author didn't
 consider; these errors can mean that real bugs get caught be accident
 and ignore.  When the block is small -- preferably just a line or two
 -- there is litle chance for error.  Of course, there are very good
 reasons to have longer except blocks.
 
 Jeremy
 

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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] Greedy except clauses

2001-02-08 Thread Anthony Baxter

 [EMAIL PROTECTED] wrote
 I've run into several greedy except: clauses now, and have submitted
 patches to make them a little less greedy. Out of curiosity, I searched the
 Zope source for "unfiltered" except: clauses...
 % grep -rl "except:$" . |wc -l
 102

 ... erk

Erk and a lot. This is a major major pain in the backside - e.g. the
one in MailHost that just eats template rendering errors.

 I'm willing to have a go at cleaning some of those except: clauses up, but
 I can't possibly do 102 of them (I have a product dealine coming up :)

Is it the sort of thing where it's just work putting a list of all of
them (line numbers, c) up on a web page, maybe crosslinked into cvsweb?
Then people can go and pick them off, one at a time.

Anthony

___
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] Greedy except clauses

2001-02-08 Thread Anthony Baxter

  Is it the sort of thing where it's just work putting a list of all of
  them (line numbers, c) up on a web page, maybe crosslinked into cvsweb?
  Then people can go and pick them off, one at a time.

ok dokey - so, is DC still running a source view web system? If so, 
you could easily enough run a daily job like:

find . -name '*.py' -print | xargs grep -n 'except:' | cut -d: -f1,2

to get the list of them from the source, and put the root of a viewcvs URL 
on it.  Hm, viewcvs doesn't really cut it for this, but lxr would...

whatcha think?

___
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] Greedy except clauses

2001-02-08 Thread Anthony Baxter

ooo. Richard didn't do it right - there's actually over _600_ bareword
except: clauses in the current zope-2_3-branch

A quick breakdown of some of the biggies:

71 in OFS/
61 in ZODB/
56 in ZServer/
53 in ZGadflyDA
50 or so in what seems to be test scripts or modules (probably ok)
42 in ZPublisher/
42 in DocumentTemplate/
40 in App/
38 in AccessControl/
32 in Shared/DC/ZRDB/
24 in ZCatalog
15 in webdav/
15 in DateTime/
13 in PythonScripts
12 in utilities/ or the install scripts
11 in OFSP/

Now, it's obvious that not all of these are bad - some are probably fine -
but there's also many that are _not_ good. The one in MailHost.py does
eat exceptions. I'm sure there are others.

I've done a quickie hack script that runs over the source and produces 
a list of matches to lines in the file, and links to a lightly patched
viewcvs so that you can jump straight to the lines. It seems like it
would be reasonably easy to make this a bit more sophisticated to include
things like the nesting 'def' and 'class' method. 

This, to me, seems like a pretty nice community type task - people could
take one of them off the list of unchecked ones, and have a look through
the code... no?

Anthony

___
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] Greedy except clauses

2001-02-08 Thread Anthony Baxter

Ok, my last for tonight - I put the output of my horrible script at

http://www.zope.org/Members/anthony/BarewordExcepts

I'll work over it a bit probably early next week - an obviousish next
step is to make it note when the body of the except: contains a 'raise'
statement. 

Anthony

___
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] Linux Zope - Win2K SQL Server?

2000-12-07 Thread Anthony Baxter



Use the Sybase client libraries, with ZSybaseDA. We do that here, and
it works fine (but not for much longer, byebye sqlserver...)

Or FreeTDS, but I don't think it's thread-safe, so you'll need to use
a Thunked adaptor.

 "Neil K" wrote
 
 I'm still trying to figure out what the missing pieces are... if anyone else
 has gotten a Linux Zope talking to a Win2K SQL Server 2000, I would
 appreciate some guidance.
 
 It seems I would have to write my own Product from scratch to do this, no
 matter what. None of the ODBC Products seem to be available for Unix, and
 ODBC from Unix - Windows will require additional software like EasySoft's
 ODBC Bridge anyway. Or I could just not use ODBC at all and make some
 Product customized to MS SQL Server.
 
 Some may suggest using ActiveState's Perl Methods for Zope and DBD::Proxy.
 :)  It's a possibility, but I'd like to see if more conventional solutions
 exist.
 
 --
 Neil Kandalgaonkar, ActiveState
 
 
 
 ___
 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 )
 

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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] The not-very-Super user

2000-12-05 Thread Anthony Baxter


 An example might be: if somehow someone took all permissions
 away from all of your managers, they'd be out of luck. The 
 superuser could still log in and fix that though.

I actually got bit by this with what I suspect was a web browser
having severe mental problems - a submit of the security page cleared
_every_ single button. Double-plus ungood - I plan to make a patch 
that won't allow you to turn off all the buttons.

Anthony

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


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




Re: [Zope] Editing SQL methods from Emacs (+ FTP server)?

2000-12-04 Thread Anthony Baxter

 Anthony Baxter wrote
 I added a patch for ftp-enabling SQL Methods to either the collector
 or the zopeshell patch manager on sourceforge (I forget which right 
 now, and it's late and I'm going to bed right now...) If you can't
 find it, email me and I'll dig it up.

Ok, found it:

http://sourceforge.net/patch/download.php?id=101925

Ignore that note at the top saying it needs other patches, 
this should work by itself fine.

Anthony

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




Re: [Zope] Editing SQL methods from Emacs (+ FTP server)?

2000-11-29 Thread Anthony Baxter


I added a patch for ftp-enabling SQL Methods to either the collector
or the zopeshell patch manager on sourceforge (I forget which right 
now, and it's late and I'm going to bed right now...) If you can't
find it, email me and I'll dig it up.


 Stephane Bortzmeyer wrote
 
 All the texts explaining the wonders of Zope tell that you can edit your DTML
 
 files from (X)Emacs, and not from the lame editor you get from your browser 
 with the default HTML form.
 
 It works great for DTML but ange-ftp (GNU emacs 20.7) refuses to open the SQL
 
 methods ("File exists but cannot be read"). Is there a solution, besides 
 writing it offline and uploading it into Zope?
 
 
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )
 

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


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




[Zope] bunch patches for zopeshell uploaded to sourceforge...

2000-10-16 Thread Anthony Baxter

FWIW, I just posted a series of patches for ZopeShell, and a 
few other bits, that add:

  editing of PythonMethods and Z SQL Methods (also enables ZSQL through FTP)
  Add host:port to the prompt 
  Add a 'login' command to switch to a different Zope Server 
  Don't upload the file if the temp file's mtime hasn't changed. 
  Prompt for username and password if not given. 

see the patch tracker at 
  http://sourceforge.net/projects/zopeshell/
They're patches 101923 - 101927 in the patch tracker. 

I'll copy the relevant Zope patches into the Collector...

Anthony

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




Re: [Zope] mailhosts and mail server speed

2000-08-23 Thread Anthony Baxter


 Chris Withers wrote
 Shane Hathaway wrote:
   It's the call to mailhost.send() which is slow. I'd love to know why :S
  
   How much influence does the the mail server speed have to this? How can
   I measure it? ;-)
  
  Set up Sendmail on localhost and see if the problem goes away.  
 
 localhost is a windows NT workstation ;-)

Note that if you set up sendmail on a local box, make sure it either
handballs stuff off to a smarthost straight away, or you have stuff 
set up to check for sendmail getting upset and just queuing messages
for ever. Normally you'd notice breakages on your mail server - but
your web server might be a different matter entirely.

Course, it doesn't help in Chris' case, but there's nothing that can't be 
fixed with either a single CD of redhat or 3 CDs of debian. (or a 
freebsd CD, if that's what gets you going).

Anthony.
-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


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




Re: [Zope] Microsoft SQL Server Access under Linux?

2000-08-23 Thread Anthony Baxter


Use Sybase. Sybase even provide the client libs for download for
*ahem* evaluation. 

MS SQL == Sybase wearing a pair of bad Groucho Marx glasses/nose/mustache
  (aka an annoying management GUI)

Or FreeTDS, but last time I looked that wasn't threadsafe.

Anthony

 "Darin Lee" wrote
 Zopistas,
 
 Is it possible to access an ODBC data source through Zope running under Linux
? I have perused the literature, and it appears the Zope DA's for ODBC only run
 under the Win32 environment.
 
 I would very much like to setup ZAP (for many reasons), but our "organization
al standard" is MS SQL Server 6.5.
 
 Thanks,
 -Darin Lee
 
 
 
 
 Darin M. Lee 
 Analyst / Web Administrator
 Office of Automation Coordination
 Michigan Department of Environmental Quality
 Phone: 517.241.5214
 [EMAIL PROTECTED]
 
 Darin M. Lee 
 Analyst / Web Administrator
 Office of Automation Coordination
 Michigan Department of Environmental Quality
 Phone: 517.241.5214
 [EMAIL PROTECTED]
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )
 

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


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




[Zope-dev] permission mapping error when importing a ZClass-based product.

2000-08-10 Thread Anthony Baxter


I'm trying to export/import a ZClass based product from one Zope2.2 
system to another, and I'm getting the following:

Error Type: Permission mapping error
  Error Value: Attempted to map a permission to a permission, Edit ekit Partner,
  that is not valid. This should never happen. (Waaa). 

Well, it has happened, and I'd like it to go away. Any ideas what causes
this?

Anthony
--
Anthony Baxter [EMAIL PROTECTED]
It's never too late to have a happy childhood.


___
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] Re: permission mapping error when importing a ZClass-based product.

2000-08-10 Thread Anthony Baxter


Ok, I got a quick workaround by making a new Product, and creating the
permissions it needed inside there.

I _suspect_ the problem was caused by nested ZClasses. 

Uuuugly.

Anthony

 Anthony Baxter wrote
 
 I'm trying to export/import a ZClass based product from one Zope2.2 
 system to another, and I'm getting the following:
 
 Error Type: Permission mapping error
   Error Value: Attempted to map a permission to a permission, Edit ekit Partn
er,
   that is not valid. This should never happen. (Waaa). 
 
 Well, it has happened, and I'd like it to go away. Any ideas what causes
 this?
 
 Anthony
 --
 Anthony Baxter [EMAIL PROTECTED]
 It's never too late to have a happy childhood.
 

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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] AArgh. Zope-2_2-branch and head of CVS breaks SQLMethods.

2000-08-10 Thread Anthony Baxter


The current Zope-2_2-branch and head of CVS is busted - you cannot add or
edit SQLMethods. It appears that Products.ZSQLMethods.__init__.__methods__ 
doesn't get into the namespace of the product properly, as neither
the add or edit screens can see SQLConnectionIDs.

Blah. More to come - I'll try to figure out why it's broken, and when.

Anthony

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




Re: [Zope] AArgh. Zope-2_2-branch and head of CVS breaks SQLMethods.

2000-08-10 Thread Anthony Baxter


Aha! Nailed it. It's the 1.131 version of OFS/Application.py

cvs log entry:

revision 1.131
date: 2000/08/02 17:31:54;  author: brian;  state: Exp;  lines: +71 -46
branches:  1.131.4;
Merged fix for products with old-style initialization not being properly
filtered by permission in the filtered add list.


Ok, the problem is that when it sees an initialize() method, it
stops looking for other stuff. ZSQLMethods has a __methods__ 
thing, tho. Oops. Patch appended to make it always look for
__methods__.

Note that it doesn't break ZSQLMethods from working, just from being added
or edited.

Argh. This would've been much easier to figure out if I hadn't managed 
to confuse myself (tooo many installations of zope, all slightly different -
need to make it better :)

Anthony

 Anthony Baxter wrote
 
 The current Zope-2_2-branch and head of CVS is busted - you cannot add or
 edit SQLMethods. It appears that Products.ZSQLMethods.__init__.__methods__ 
 doesn't get into the namespace of the product properly, as neither
 the add or edit screens can see SQLConnectionIDs.
 
 Blah. More to come - I'll try to figure out why it's broken, and when.
 
 Anthony




Index: Application.py
===
RCS file: /cvsroot/Zope/lib/python/OFS/Application.py,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 Application.py
--- Application.py	2000/08/07 04:22:29	1.1.1.3
+++ Application.py	2000/08/10 12:41:15
@@ -507,20 +507,6 @@
 meta_type['product']=productObject.id
 meta_types.append(meta_type)
 
-for name,method in pgetattr(
-product, 'methods', {}).items():
-if not hasattr(Folder, name):
-setattr(Folder, name, method)
-if name[-9:]!='__roles__': # not Just setting roles
-if (permissions.has_key(name) and
-not folder_permissions.has_key(
-permissions[name])):
-permission=permissions[name]
-if new_permissions.has_key(permission):
-new_permissions[permission].append(name)
-else:
-new_permissions[permission]=[name]
-
 if new_permissions:
 new_permissions=new_permissions.items()
 for permission, names in new_permissions:
@@ -528,6 +514,19 @@
 new_permissions.sort()
 Folder.__dict__['__ac_permissions__']=tuple(
 list(Folder.__ac_permissions__)+new_permissions)
+
+for name,method in pgetattr(product, 'methods', {}).items():
+if not hasattr(Folder, name):
+setattr(Folder, name, method)
+if name[-9:]!='__roles__': # not Just setting roles
+if (permissions.has_key(name) and
+not folder_permissions.has_key(
+permissions[name])):
+permission=permissions[name]
+if new_permissions.has_key(permission):
+new_permissions[permission].append(name)
+else:
+new_permissions[permission]=[name]
 
 if os.environ.get('ZEO_CLIENT',''):
 # we don't want to install products from clients!



[Zope] anyone seen browsers map '_' to '+AF8-' ?

2000-07-23 Thread Anthony Baxter

We're seeing a really strange occasional error crop up in our
web logs - periodic requests for an image with an _ in the name
(e.g. hdr_left) get mutilated to hdr+AF8-left. Out of the last
400,000 requests, there's been about 110 of these errors. There
appears to be nothing much in common in the requests, except that
the browser is always a variant of IE 5.0 (not 5.01, 5.5, or 4.0,
or anything else). IE 5.0 only makes up 35% of our hits, so it's
unlikely to be just random chance.

Ones we've seen with it:
Mozilla/4.0 (compatible; MSIE 5.0; Windows 95)
Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; DigExt; OZEMR1999V01)
Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; ZDNetSL; DigExt)
Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)
Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; Chariot)
Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; TUCOWS)
Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)

Has anyone seen anything similar? I've searched the web, microsoft.com (ha), 
all to no avail. It's not a very common bug, but it's a significant
proportion of the total errors on the site, so it'd be nice to nail it.

ta,

Anthony

--
Anthony Baxter [EMAIL PROTECTED]
It's never too late to have a happy childhood.

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




Re: [Zope] SQLSession path

2000-07-08 Thread Anthony Baxter


Go to the management interface, Properties, and hit 'Change'.

Anthony

 [EMAIL PROTECTED] wrote
 Hi All,
 
 Using SQLSession v 0.2.9, hit by this problem :
 
 Zope Error
 
  Zope has encountered an error while publishing this resource.
 
  AttributeError
 
  Sorry, a Zope error occurred.
 
 !--
 Traceback (innermost last):
   File E:\MYBOOK~2\lib\python\ZPublisher\Publish.py, line 214, in
 publish_module
   File E:\MYBOOK~2\lib\python\ZPublisher\Publish.py, line 179, in publish
   File E:\MYBOOK~2\lib\python\Zope\__init__.py, line 202, in
 zpublisher_exception_hook
 (Object: ApplicationDefaultPermissions)
   File E:\MYBOOK~2\lib\python\ZPublisher\Publish.py, line 165, in publish
   File E:\MYBOOK~2\lib\python\ZPublisher\mapply.py, line 160, in mapply
 (Object: index_html)
   File E:\MYBOOK~2\lib\python\ZPublisher\Publish.py, line 102, in
 call_object
 (Object: index_html)
   File E:\MYBOOK~2\lib\python\OFS\DTMLDocument.py, line 166, in __call__
 (Object: index_html)
   File E:\MYBOOK~2\lib\python\DocumentTemplate\DT_String.py, line 502, in
 __call__
 (Object: index_html)
   File E:\MYBOOK~2\lib\python\OFS\DTMLMethod.py, line 146, in __call__
 (Object: standard_html_header)
   File E:\MYBOOK~2\lib\python\DocumentTemplate\DT_String.py, line 502, in
 __call__
 (Object: standard_html_header)
   File E:\MYBOOK~2\lib\python\Products\SQLSession\SQLSession.py, line 287,
 in __call__
 (Object: Session)
   File E:\MYBOOK~2\lib\python\Products\SQLSession\SQLSession.py, line 320,
 in newSession
 (Object: Session)
 AttributeError: path
 
 --
 
 And I had checked the SQLsession.py, the script stop at :
  response.setCookie(self.cookie_name, sessionName, path=self.path)
 
 But I called the session with cookie.
 
 Any idea what's wrong ??
 
 Please help. Thanks
 
 Wai
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )
 

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


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




[Zope] wierdness with 2.2, Security, and manage_addProduct[' ']..

2000-07-06 Thread Anthony Baxter

Ok, this is driving me slightly nutso.

Why won't this work in Zope 2.2? Make a DTML method containing:

dtml-with "manage_addProduct['ZCatalog']"
  dtml-call "manage_addVocabulary(id='doofus')"
/dtml-with

I cannot find a way to make the security system let this through. method
is owned and executed by a user who is a manager, no wierd permissions,
nothing. I get a permission failure trying to look up and access the
'manage_addVocabulary' method.

The example of ZCatalog.Vocabulary is simply chosen because it is a standard
product that is a) a python product, b) using the "new-style" __init__ 
method (as opposed to the ancient one). The actual product I'm seeing
the problem on is a bit more complex, but Vocab will do.

It's been driving me insane for most of this evening - I'm positive 
you _used_ to be able to do stuff like this, and it works when the 
product is a ZClass-based one... 

I've pretty much convinced myself it's a bug in the 2.2 security system...

Anyone? Brian?

Anthony
--
Anthony Baxter [EMAIL PROTECTED]
It's never too late to have a happy childhood.

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




Re: [Zope] Problem calling SESSION object

2000-07-06 Thread Anthony Baxter

Ugh. This is a stupid bug on my part. Upgrade to 0.2.9

Anthony

 [EMAIL PROTECTED] wrote
 Hi All,
 
 Need Help.
 
 I'm currently using SQLSession v 0.2.3, with access database ( I had
 changed the "value" filed in session_data to item_value and also all sql
 statements that refer to it).
 
 I had no problem generate the session id, but however, I had problem
 calling session object after I insert it into session_data.
 
 I got an error when calling the dtml-var "SESSION['xxx']", i got this :
 
 
  Zope Error
 
  Zope has encountered an error while publishing this resource.
 
  Error Type: NameError
  Error Value: upper
 
 !--
 Traceback (innermost last):
   File E:\MYBOOK~2\lib\python\ZPublisher\Publish.py, line 214, in
 publish_module
   File E:\MYBOOK~2\lib\python\ZPublisher\Publish.py, line 179, in publish
   File E:\MYBOOK~2\lib\python\Zope\__init__.py, line 202, in
 zpublisher_exception_hook
 (Object: ElementWithAttributes)
   File E:\MYBOOK~2\lib\python\ZPublisher\Publish.py, line 165, in publish
   File E:\MYBOOK~2\lib\python\ZPublisher\mapply.py, line 160, in mapply
 (Object: add_cart_html)
   File E:\MYBOOK~2\lib\python\ZPublisher\Publish.py, line 102, in
 call_object
 (Object: add_cart_html)
   File E:\MYBOOK~2\lib\python\OFS\DTMLDocument.py, line 166, in __call__
 (Object: add_cart_html)
   File E:\MYBOOK~2\lib\python\DocumentTemplate\DT_String.py, line 502, in
 __call__
 (Object: add_cart_html)
   File E:\MYBOOK~2\lib\python\DocumentTemplate\DT_Util.py, line 335, in
 eval
 (Object: SESSION['bk_isbn'])
 (Info: SESSION)
   File string, line 0, in ?
   File E:\MYBOOK~2\lib\python\DocumentTemplate\DT_Util.py, line 161, in
 careful_getitem
   File d:\mybookstore\lib\python\Products\SQLSession\SQLSession.py, line
 99, in __getitem__
   File d:\mybookstore\lib\python\Products\SQLSession\SQLSession.py, line
 389, in sqlattr
 (Object: NoBrains)
 NameError: (see above)
 
 --
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )
 

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.

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




Re: [Zope-dev] ZEO and Mountable Fses?

2000-07-05 Thread Anthony Baxter


It's on my list, but I'm not going to get to it for a week or so.

Anthony, building a MountRegistry...


 Bill Anderson wrote
 
 Subject carries the question. Anyone tried this yet, or have any
 insights about it?
 
 I am considering giving a go this week, thought I'd see if there are any
 heads-up notices I should be aware of. :)
 
 Back-to-the-migrations-to-ZEO-ly y'rs Bill
 
 -- 
 "Linux: the operating system with a CLUE...
 Command Line User Environment".
 
 seen in a posting on comp.software.testing
 
 ___
 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 )
 

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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] mozilla and zope play nicely again!

2000-06-28 Thread Anthony Baxter

The basic auth problem of mozilla-on-linux that's been around since
around the 1st or 2nd of June are now fixed, as of 2000-06-27-20-M17
(note that I don't believe that straight M17 has the fixes applied.)

Yay!

Anthony

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




[Zope] Re: [Zope-Moz] mozilla and zope play nicely again!

2000-06-28 Thread Anthony Baxter

 Martijn Pieters wrote
 Don't you mean M16? When M17 comes out it will have the fix. Nightlies are
 marked with the milestone they are working up _to_, not what they are working
 _from_.

*grumble* I'm sure I saw a post to slashdot saying M17 was out...
yep, I did, 
http://slashdot.org/article.pl?sid=00/06/26/1655250mode=nested

"net of a million lies", indeed.

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




Re: [Zope] comercial products using zope

2000-06-20 Thread Anthony Baxter

 Terry Kerr wrote
 Basically I want to know if anyone else has used zope for a commercial
 product b4, and how they did it.  Is there anything in particular that I
 should know about.  Should I just rely on a good software license to
 protect my code?  Also...are .pyc files as platform independent as .py
 files?

Yes. Digital Creations, and the product was called Principia. I don't know
if all the stuff with the mangled and encrypted byte code support is still
there, tho.

Anthony

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




Re: [Zope] Mozilla for mgmt

2000-06-15 Thread Anthony Baxter

 Martijn Pieters wrote
  Has anyone besides me had trouble using Mozilla to manage Zope ie access
  the control panel via log in?
 There are regressions in recent Mozilla builds that prevent the authentication
 dialog from functioning properly. This regression seems to keep popping up
 once in a while. The password textbox is then broken, and Mozilla tries to
 authenticate you with an empty password field.

The current one is bugzilla 42008. ("Basic" auth works, "basic" auth doesn't).
Zope gets it wrong, I just put a patch in the Collector.

Mozilla "bug" at 
http://bugzilla.mozilla.org/show_bug.cgi?id=42008

fix at
http://classic.zope.org:8080/Collector/1328/view

 Often, you can bypass it by typing the password in a seperate text window,
 then copying and pasting it into the password textfield. This has worked for
 me on Linux.

This now works, but was broken by the above Mozilla bug (ok, they're 
technically correct, but it's still a change, and no other browser behaves
this way).

 Other than this problem I have had no trouble managing Zope servers with
 Mozilla, or at least not much.. it all depends on the quality of the nighty
 build. Try a newer or older build, I'd say.

Newer ones are broken since 2000/06/01... 

Anthony

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




[Zope-dev] Re: advice on MountedFileStorage changes.

2000-06-13 Thread Anthony Baxter

 Shane Hathaway wrote
 I looked some more at ZClasses and such today, hoping to solve the
 problem with mounted databases.  Guess what!  It turned out to be a
 simple matter.

Excellent! I've added support in CVS, and I'll do a new release this
evening.

 The latest addition to Mount.py provides the ability for a MountPoint
 to get its ZClass definitions from the root database rather than the
 mounted database.  Anthony, I think you'll want to make
 "classDefsFromRoot" a checkbox available when adding a new mount point.

Done. Cool, it looks like it even handles recursive mounts. 

 Depending on the application, this can be the more sensible (and more
 manageable) approach.  For example, you may want to have a large
 collection of little FileStorages, all using the same ZClass
 definitions.  You certainly wouldn't want to make a copy of all
 ZClasses in each FileStorage.

Exactly. For me, one of the big things about the MountedFileStorage is
the ability to split out the data for various sections of the tree - I
still want to be able to make ZClass instances, but I don't want to have
to manage copying all products all over the place. 

 In doing this I realized, and Jim suggested, that there are other
 situations where you'd really want ZClass definitions to come from the
 mounted database.  This is a larger issue.  We will first need to
 provide a way to manage the databases.  Then there will be a need to
 load/unload products dynamically.  I don't think we want to try to
 finish that for 2.2.0.

The next MountedFS release will have a teeny tiny Control_Panel like 
thing in the root of the mountpoint. I'll try putting a Products folder
in it.

Anthony

___
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] Zope 2.2 beta 1 released

2000-06-13 Thread Anthony Baxter


 Graham Chiu wrote
 I go to the manager interface of my root folder in Zope and it dies with
 a Dr Watson :-(   

?? What's a Dr Watson? I haven't seen that error...

Anthony


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




[Zope] MountedFileStorage 0.02 now available.

2000-06-11 Thread Anthony Baxter


MountedFileStorage 0.02 is now available.

Changes in Release 0.02:

  New help files.

  You can now use MountedFileStorage to create new ZODB files. 
  Nitty-gritty is in the SubApplication.py file - quite possibly
  useful to people doing other sorts of mounted storages. Note 
  the patch in no_repeat_metatypes.patch - not essential, but will
  stop your 'add' menus getting bloated to hell.

README follows:

MountedFileStorage, 0.02.

Ok, so the DC guys have been talking about allowing multiple ZODB support,
but I couldn't see a way to use it. A bit of trawling through the CVS and 
I found the guts of a MountedItem object which has now been removed. Using
that as inspiration and a source of pointers, I've bolted together a really
simple Product for mounting multiple ZODB files onto a Zope installation. 

You should also check out the 
"MountedDatabases":http://www.zope.org/Members/jim/ZODB/MountedDatabases
section of the ZODB Wiki.

First of all, you need to be running a really really recent
"CVS":http://www.zope.org/Resources/CVS version of Zope. 2.2alpha1 isn't 
good enough. Then install this product (it unpacks in 
lib/python/Products/MountedFileStorage).

Sample usage:

  Select 'Mounted FileStorage' from the product add list.

  For 'file' put nifty.fs. Leave 'path' blank, and put 'nifty' as the id, 
  click 'create'.

  You've now got an empty ZODB installed.

_WARNING_: This is really really untested stuff. It Works For Me. Not
To Be Taken Internally. Do Not Come Crying To Me If It Breaks Your
Zope Install.

If you want to play with this stuff, you really should back up your
Data.fs _first_.

For more info, see the online Help. In particular, check out the known
bugs and problems section.

Security Issues: There probably are some. I've no idea what they might
be. The product makes a really simple-minded effort to not allow badness
through (any filename with a '/' or '\' in it). Don't give access to the
permission 'Mount FileStorages' to anyone that you don't trust, though.
Note that this includes anyone with Manager role on the system. Note also,
though that you can only mount existing files that are in var/. 


Anthony Baxter [EMAIL PROTECTED], Sun Jun 11 17:38:20 EST 2000


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




  1   2   >