[Zope-dev] change in product permissions/behaviour in 2.20b1

2000-06-20 Thread Dr. Ross Lazarus

The (heavily modified) Survey product from Piers Lauder is in heavy use
here.

In 2.1.x and in 2.20b1, the links in a folder view point to
[objectname]/manage_workspace

In 2.1.x, this does the right thing - if you have appropriate
permissions on the survey object, you get a management screen. Without
'View management screens' permission, you see a rendered survey form to
fill in. Fine.

In 2.20b1, this is now broken. No matter what permissions you have, the
[objectname]/manage_workspace link turns into a link to [objectname] and
you see the survey.

I've futzed with  __ac_permissions__ =  and added that little tip about
Globals.default__class_init__(Survey) without any joy.

Is this a bug, a deliberate change in behaviour or is it just me?



-- 

Dr Ross Lazarus
Associate Professor and Sub-Dean for Information Technology
Faculty of Medicine, Room 126A, A27, University of Sydney,
Camperdown, NSW 2006, Australia
Tel: (+61 2) 93514429   Mobile: +61414872482  
Fax: (+61 2) 93516646   Email: [EMAIL PROTECTED]

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




Re: [Zope-dev] Catalog acquisition problems?

2000-06-20 Thread Dieter Maurer

Martijn Faassen writes:
 > We've been experiencing some odd interactions between the ZCatalog and
 > acquisition. Inside the  tags things seem to go 
 > screwy. It's picking up the properties in the root folder instead of
 > in the subfolder (the context), where the  is used. Why 
 > would this happen?
I could reproduce this in Zope 2.1.6.

I can understand that the result is not what one wants, but
when I understand aquisition correct, it is in accordance
with the documentation.

  You probably get "catalog" by aquisition. The catalogs
  aquisition context is inherited to the "Result" object
  and then to the "Record" objects representing the
  lookup results.
  As I understand, a feature request to such a record
  first follows the aquisition chain of catalog
  and only then the aquicition chain that led to
  catalog.


 > Another odd thing that happens is that dtml-let variables appeared
 > wiped empty inside the dtml-in:
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > The  will display nothing. 'foo' *does* exist, but it
 > just appears to be empty.
I could not reproduce this in my Zope installation.

Do your Record objects (results of "dtml-in") have a "foo" field
(maybe inherited)?



Dieter

___
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] DA for postgresql?

2000-06-20 Thread Sebastien Douche

Le Tue, Jun 20, 2000 at 11:43:59PM +0400, Jephte CLAIN à écrit:
# Hello,

Hi

# Can anyone tell me about the various Postgresql DA currently available?
# I don't know which to take between ZPoPyDA and ZPyGreSQLDA. I installed
# both of them, and I can't tell the difference between the two...

I use everyday ZPoPY and it works great. But I use only for the
devel, not still in production.

# This will be for a production server. Is PostgreSQL a good choice?

Of course.  It is surely one of best (see the best) 
database server which exists ! 

-- 
(°- Sébastien Douche <[EMAIL PROTECTED]>
//\ IDEALX  
v_/_ Ingénierie Open Source

___
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] LoginManager add trouble

2000-06-20 Thread Scott Parish

Using:

Zope2 (cvs)
ZPatterns 0.3.0
LoginManger 0.8.6

When I try to add a LoginManager, I get the following error and traceback.
Any ideas?

sRp

-

Error Type: KeyError
Error Value: _owner

Traceback (innermost last):
  File /a4/srp/Zope2/lib/python/ZPublisher/Publish.py, line 222, in publish_module
  File /a4/srp/Zope2/lib/python/ZPublisher/Publish.py, line 187, in publish
  File /a4/srp/Zope2/lib/python/Zope/__init__.py, line 221, in 
zpublisher_exception_hook
  File /a4/srp/Zope2/lib/python/ZPublisher/Publish.py, line 171, in publish
  File /a4/srp/Zope2/lib/python/ZPublisher/mapply.py, line 160, in mapply
(Object: manage_addLoginManager)
  File /a4/srp/Zope2/lib/python/ZPublisher/Publish.py, line 112, in call_object
(Object: manage_addLoginManager)
  File /a4/srp/Zope2/lib/python/Products/LoginManager/LoginManager.py, line 230, in 
manage_addLoginManager
  File /a4/srp/Zope2/lib/python/OFS/ObjectManager.py, line 249, in _setObject
(Object: ElementWithAttributes)
  File /a4/srp/Zope2/lib/python/AccessControl/Owned.py, line 267, in 
manage_fixupOwnershipAfterAdd
(Object: SheetProviderContainer)
  File /a4/srp/Zope2/lib/python/AccessControl/Owned.py, line 174, in changeOwnership
(Object: SheetProviderContainer)
KeyError: (see above)

-- 
Scott Parish
http://srparish.net

 PGP signature


Re: [Zope-dev] DA for postgresql?

2000-06-20 Thread Jephte CLAIN

[EMAIL PROTECTED] wrote:
> PostgreSQL should be fine.  A bit slow still, but getting better.
> There is a tuple size limitation, watch that.
What do you exactly mean by 'tuple' ? Suppose I write a query like this:

select * from mytable where value in (1, 2, 3)

the (1, 2, 3) part is autogenerated. It could be, say, 128 terms long.
Is this what you are talking about when you say 'tuple' ?

> Besides, Thierry is French!
cocorico! :-)

regards,
jephte clain
[EMAIL PROTECTED]

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




[Zope-dev] another idea from Refresh

2000-06-20 Thread Scott Parish

Would it be possible to hack out something similar to Refresh that would 
import new products into Zope without needing to restart Zope?

sRp


-- 
Scott Parish
http://srparish.net

 PGP signature


[Zope-dev] DA for postgresql?

2000-06-20 Thread Jephte CLAIN

Hello,

Can anyone tell me about the various Postgresql DA currently available?
I don't know which to take between ZPoPyDA and ZPyGreSQLDA. I installed
both of them, and I can't tell the difference between the two...

This will be for a production server. Is PostgreSQL a good choice?
Actually, I don't have the choice -- I have to use PostgreSQL.

thanks for any input

regards,
jephte clain
[EMAIL PROTECTED]

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




[Zope-dev] censemble communication toolkit and distributed lock manager

2000-06-20 Thread Mark Hayden

I recently announced the availability of censemble
communication toolkit and a distributed lock manager
built using it.  After reading about ZEO and the
plans to turn the Zope Storage Service into a replicated
service, I thought you might find this work useful.

regards, Mark Hayden



CEnsemble Version 0.03

  Download: ftp://24.142.58.202/pub/hayden/

CEnsemble is a toolkit for building reliable distributed
applications.  It provides a library of protocols that can be used
for quickly building complex distributed applications. 

CEnsemble is a rewrite in C of the Ensemble system, which was written
in a dialect of the ML programming language.  More information of
Ensemble can be found at:

  Homepage: http://www.cs.cornell.edu/Info/Projects/Ensemble/index.html
  Download: ftp://cs.cornell.edu/pub/ensemble/

Included with censemble-0.03 is a complete distributed lock manager
(DLM) built using the toolkit.  The DLM can be used either
through a text-based pipe interface or linked into your application
as a C library.  No familiarity with Ensemble is needed to use the
DLM (all the interface is in one header file).  A DLM tutorial is
included (censemble/dlm/README).  The DLM features include:

* Fault-tolerant.  Any of the lock manager processes can fail; the
  system will remain available as long as a quorum (majority) of the
  servers continue running.

* Load balanced: locks are randomly assigned to servers to manage.
  As servers are added or removed from the system, they will reassign
  locks to even the load.

* Reader/writer locks.

___
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] SOAP?

2000-06-20 Thread Brian Lloyd

> I'm trying to find some information about using the SOAP protocol to
> communicate with the Zope server. Not having much luck at 
> this point; any
> hints or suggestions would be appreciated. Thanks.
> 
> David Wilcoxen
> Austin, Texas

Hi David,

Zope doesn't yet support SOAP, though this is expected in the
future.


Brian Lloyd[EMAIL PROTECTED]
Software Engineer  540.371.6909  
Digital Creations  http://www.digicool.com 



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




[Zope-dev] SOAP?

2000-06-20 Thread David Wilcoxen

I'm trying to find some information about using the SOAP protocol to
communicate with the Zope server. Not having much luck at this point; any
hints or suggestions would be appreciated. Thanks.

David Wilcoxen
Austin, Texas





___
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] Unpickleable Error

2000-06-20 Thread Nick Garcia

Brian Lloyd wrote:
> 
> > Well since my product *does* use the SQL class, and the SQL class
> > uses the DA class, and the DA class uses cStringIO, I guess
> > *technically* I am using it.  We create SQL methods then store them as
> > properties of the class.  This may be what it's choking on.
> 
> It shouldn't be - SQLMethods don't ever actually assign a StringIO
> to anything but transient variables. The Results object returned
> from a query could in some cases wrap a StringIO instance - you don't
> do anything in your product where Results objects would be stored
> as object attributes do you? If this were a problem common to all
> SQLMethod objects then I would expect people to be seeing this error
> all over the place. Is anyone else seeing this?

No, although we do have a class that we use to wrap around some of the
results that we sometimes return instead of the results themselves. 
I'll try taking that out and see if that's the problem.

> If you're not storing Results anywhere, it would be helpful to see
> the str() of the 'state' being dumped in commit() - also to know
> what database adapter/version you are using...

Here are the contents of 'state':
{'testID': , '_objects': ({'meta_type':
'SQL Product 
Catalog', 'id': 'testID'},)}

We're using ZMySQLDA v1.1.3.

-- 
Nick Garcia | [EMAIL PROTECTED]
CodeIt Computing | http://codeit.com

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




Re: [Zope-dev] ZPatterns alpha 3 released (was re: ZPatterns0.4.0a2 bug fixes)

2000-06-20 Thread Phillip J. Eby

At 05:49 PM 6/20/00 +0300, Itamar Shtull-Trauring wrote:
>> Huh?  Oh, %&#()@&%...  I fixed that in my working copy, but didn't check it
>> into CVS before building a release .tgz yesterday...   Argh.  Line 137 of
>> DataSkins.py *should* read:
>
>Great, it works!
>

Tell me, were you able to use GenericTrigger(s) to do the cataloging?  It
might be more convenient to update/modify than your cataloging-specific
Agent class.  Also, I noticed that your getMemento routine saves the
object's __dict__, but that's of absolutely no value whatsoever, since the
__dict__ is a mutable object and will thus have been changed by the time
you get the commit-time messages.


___
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] Test request: ZSession - ZPatterns basedsession manager

2000-06-20 Thread Phillip J. Eby

At 10:51 PM 6/20/00 +0800, mike wrote:
>"Phillip J. Eby" wrote:
>> example.  Think of someone creating a Session subclass called "Shopping
>> Cart", with methods for viewing, checking out, adding/deleting items, etc.
>> Or, if they have many subsystems which want to share the same Session
>> objects, they could do this by having each subsystem use a different
>> propertysheet of the same Session object.
>
>Well, well, well. As for me, beter I've set up a Client abstraction
>which have access to CartManager and store cart_id in the session
>object. Mixing Session and Cart is not a good idea just because Client
>can have several carts, for example. The composition is better than
>inheritance in this case, Phillip :-)

I look at components in terms of "value add".  Your SessionManager's
value-add is that it lets you transparently create an instance of something
which is associated with a cookie and which can be expired whenever it's
idle for greater than a certain period of time.  But the idea of a
"Session" has no real value-add to me; it just makes it possible for a
thing to be managed by the SessionManager.  You could in fact do without
the Session class altogether, and have SessionManager simply set the
lastAccessed attribute directly.  This would actually make SessionManager
more useful, because you could use it with ZClasses that hadn't been
explicitly designed to be session-based, as long as there was an
AttributeProvider for lastAccessed.  And you could drop the SessionSource
class altogether as well, since any RackMountable/DataSkin would be
acceptable as a "Session".

Popular opinion to the contrary, I don't believe that there is such a thing
as a "session" object.  Session objects are a hack, to give you a place to
put session-specific objects' data.  In my opinion, if you can have
session-specific objects, you don't really need a "session" object.  If one
can simply call CurrentCart() or CurrentGame() (where CurrentCart and
CurrentGame are SessionManager specialists) to retrieve a session-specific
shopping cart or gameboard, why have a "session" object?  If I want them
both to use the same cookie, I can certainly do that by setting the
properties on both CurrentGame and CurrentCart.  And there's also no chance
that two session-specific objects from different vendors (such as perhaps
my Games and Carts) will accidentally collide with each others attributes
or sheets in the "session" object, since they're being handled by seperate
specialists.


>> IMHO, the basicSheet stuff you've done, while convenient, encourages
>> developers to take the quick-and-dirty route of just using the Session as a
>> place to store variables - and that throws away a lot of the usefulness of
>> ZPatterns.  For one thing, you've guaranteed that Sessions have to be
>> stored as persistent objects in the ZODB, or at least that the basicSheet
>> has to support arbitrary properties.
>
>But without this stuff people will have to code ZClasses each time they
>want sessions. Hmm... I guess the best way is splitting current session
>class into two - simple Session and LazySession.

Yeah, but to my way of thinking, they *should* be coding them, because if
they're not it means they haven't thought their design through enough to
know what *kind* of session-specific object they're making.  To me, there
is no such thing as a session object, only session-specific objects.

In any case, it's not a big deal to make a session-specific object.  Add a
ZClass, base it on DataSkin, set up a "common instance" property sheet, and
boom, you're done.  Now set your session manager's rack to use it, and
you're in business.


___
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] ZPatterns alpha 3 released (was re: ZPatterns0.4.0a2 bug fixes)

2000-06-20 Thread Brian Takashi Hooper


On Tue, 20 Jun 2000 09:46:34 -0500
"Phillip J. Eby" <[EMAIL PROTECTED]> wrote:

[snip]

> >Thank you, Phillip. I've spent all the evening hunting these bugs.
> >By the way, how do you debug? Is there better way than inserting things
> >like
> >
> > print "objectChanging %s, has status=%d" % (
> > self, self.__dict__.has_key('_v_status_')
> > )
> >
> 
> I haven't found one yet.  I'm actually using zLOG.LOG calls, however, to a
> logfile, so I can look back at things easily (and because I didn't realize
> you could use print until you posted this...  :) ).

I recommend pdb; there's a How-To klm wrote on the zope.org site called
'Debugging Zope Python Code', that recommends inserting something like

import pdb
pdb.set_trace()

at the part of the code that you want to have it drop down into the
debugger at, and then you can step through and find out the value of
various expressions as you're running things, call functions, etc.

Mr. Creosote is also my favorite - check out the MrCreosote subdirectory
of pcgi/ in your Zope installation; the nice thing about Mr. Creosote is
you can have it send debugging info to another machine (UDP packets)

--Brian Hooper

___
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] Announce: ZSession-0.0.3a

2000-06-20 Thread mike

In short:

1. URL = http://www.zope.org/Members/RainDog/ZSession
2. It works.
3. I need more comments/suggestions

Mike

___
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] Test request: ZSession - ZPatterns basedsession manager

2000-06-20 Thread mike

"Phillip J. Eby" wrote:
> 
> At 08:58 PM 6/19/00 +0800, mike wrote:
> >
> >http://www.zope.org/Members/RainDog/ZSession/ZSession-0.0.2.tar.gz/view
> >
> >Comments?
> >
> 
> Now that I've had a chance to really look at this (while tracking down one
> of the bugs you found), I do have a few comments.
> 
> First, nice job...  It's a good adaptation use of ZPatterns.  I do have

Thanks.

> some suggestions for fine tuning, though.
> 
> * Rather than putting property manipulation functions right into the base
> Session class, I would simply let users derive ZClasses of their own from
> Session.  They could then actually give the Session a UI of its own, for

I put those get/set/has stuff just for make easier life of some lazy
people (like me :-)

> example.  Think of someone creating a Session subclass called "Shopping
> Cart", with methods for viewing, checking out, adding/deleting items, etc.
> Or, if they have many subsystems which want to share the same Session
> objects, they could do this by having each subsystem use a different
> propertysheet of the same Session object.

Well, well, well. As for me, beter I've set up a Client abstraction
which have access to CartManager and store cart_id in the session
object. Mixing Session and Cart is not a good idea just because Client
can have several carts, for example. The composition is better than
inheritance in this case, Phillip :-)

> IMHO, the basicSheet stuff you've done, while convenient, encourages
> developers to take the quick-and-dirty route of just using the Session as a
> place to store variables - and that throws away a lot of the usefulness of
> ZPatterns.  For one thing, you've guaranteed that Sessions have to be
> stored as persistent objects in the ZODB, or at least that the basicSheet
> has to support arbitrary properties.

But without this stuff people will have to code ZClasses each time they
want sessions. Hmm... I guess the best way is splitting current session
class into two - simple Session and LazySession.

> * Make dead session removal something that doesn't happen automatically, or
> at least have an option to do so.  Your default deletion algorithm would be
> very expensive when executed against a non-ZODB database, and would be more
> efficiently done a few times a day in large batches by a cron job.

Moreover, I found a bug which causes infinite loop :-( You're right,
automatic removal should be optional. Will be fixed in 0.0.3 release.
> 
> * Delegate determining which sessions are dead to the Rack, rather than
> doing it in the Specialist.  This allows an SQL implementation to make use
> of indexes.  Specifically, make removeDead call:
> 
> self._getSource().findIdleSessions(self.session_ttl)
> 
> And then provide a default implementation of findIdleSessions() in the
> Specialist.  (Btw, please note that your current implementation absolutely
> requires that at least *some* session data be stored persistently in the
> ZODB, which if you're using a FileStorage, is a bad place for it to be.)
> Now, the whole thing works the same way when first installed, but if
> someone implements the session ID and lastAccessed attributes in an SQL
> database, they can substitute a different implementation for
> findIdleSessions() by putting it in the Rack.

Agree with you completely.

Thanks,
Mike

___
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: Objet : Re: ZScheduler-0.0.5 problem

2000-06-20 Thread Loren Stafford

This is going to be hard to debug remotely. Can you help me out?

First try getting ZScheduler 0.0.6 which fixes a problem of non-responsive
Zope, though there the problem was on shut-down not on start-up. Be sure you
have STUPID_LOG_FILE working. Then uncomment some of my debugging statements
(calls to loggerr) in the source of __init__.py and  Dispatcher.py -- maybe
add some instrumentation yourself -- all with the goal of observing how far
it runs before Zope hangs. Maybe you'll have to activate one of the #import
pdb; pdb.set_trace() statements (in an appropriate place, of course).

Also, are there any entries in the Zope log or system log that are seem
relevant?

The only other thing that comes to mind is that ZScheduler depends on
Python's threading module, so you must have a version of threading that
works on your OS. I don't know whether there are any "gotchas" with respect
to Python threading on Linux (Linux 6.1, I386, Zope-2.1.7.). Maybe someone
else can step in and let us know if there are.

Please continue to copy [EMAIL PROTECTED]

-- Thanks
-- Loren

- Original Message -
From: "Francois-Regis CHALAOUX"
<[EMAIL PROTECTED]>
To: "Receipt Notification Requested" <[EMAIL PROTECTED]>
Sent: June 20, 2000 06:48 AM
Subject: Objet : Re: ZScheduler-0.0.5 problem


> Hi Loren,
>
> 1. Zope 2.1.7 has been withdrawn due to CVS confusion. Can you
> reproduce the
> problem on another version, such as 2.1.6?. Is there any indication of why
> it won't start (error message)? Did you start it with -D set, so it would
> display errors on the console?
>
> Yes, the script start script contains '-D "$@"' but nothing is displayed
on
> the console when I try to fetch an object from zope.
> Zope is is blocked and that's all :(
>
>
> > Hi,
> >
> > 1/ I'm Trying to use ZScheduler-0.0.5 on Linux 6.1, I386, Zope-2.1.7.
> > Just after to install the product I cannot start Zope !!!
> >
> > 2/ There is also an archive problem when I extract the file from
> > ZScheduler-0.0.5.tgz :
> >
> > srchocolat 138% tar xvzf ZScheduler-0-0-5.tgz
> > lib/python/Products/ZScheduler/
> > lib/python/Products/ZScheduler/__init__.py
> > lib/python/Products/ZScheduler/addOneTimeZEvent.dtml
> > lib/python/Products/ZScheduler/README.txt
> > lib/python/Products/ZScheduler/CHANGES.txt
> > lib/python/Products/ZScheduler/ZSchedule.py
> > lib/python/Products/ZScheduler/version.txt
> > lib/python/Products/ZScheduler/ZEvent.py
> > lib/python/Products/ZScheduler/Loggerr.py
> > lib/python/Products/ZScheduler/Dispatcher.py
> > lib/python/Products/ZScheduler/documentEdit.dtml
> > lib/python/Products/ZScheduler/scheduleView.dtml
> > lib/python/Products/ZScheduler/www/
> > lib/python/Products/ZScheduler/www/OneTimeZEvent.gif
> > lib/python/Products/ZScheduler/www/RecurringZEvent.gif
> > lib/python/Products/ZScheduler/www/ZSchedule.gif
> >
> > gzip: stdin: decompression OK, trailing garbage ignored
> > tar: Le processus enfant a retourné le statut 2
> > tar: Statut d'erreur reporté d'erreurs précédentes.
> > srchocolat 139%
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


___
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] ZPatterns alpha 3 released (was re: ZPatterns0.4.0a2 bug fixes)

2000-06-20 Thread Phillip J. Eby

At 10:25 PM 6/20/00 +0800, mike wrote:
>"Phillip J. Eby" wrote:
>> 
>
>> Huh?  Oh, %&#()@&%...  I fixed that in my working copy, but didn't check it
>> into CVS before building a release .tgz yesterday...   Argh.  Line 137 of
>> DataSkins.py *should* read:
>> 
>> if self._v_status_ is not ChangedStatus:
>> 
>> Sorry, everyone.  I've checked in this fix, along with the one for Mike's
>> "missing _v_dm_" problem, and uploaded an alpha3 release.
>> 
>
>Thank you, Phillip. I've spent all the evening hunting these bugs.
>By the way, how do you debug? Is there better way than inserting things
>like
>
>   print "objectChanging %s, has status=%d" % (
>   self, self.__dict__.has_key('_v_status_')
>   )
>

I haven't found one yet.  I'm actually using zLOG.LOG calls, however, to a
logfile, so I can look back at things easily (and because I didn't realize
you could use print until you posted this...  :) ).


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




Re: [Zope-dev] ZPatterns alpha 3 released (was re: ZPatterns0.4.0a2 bug fixes)

2000-06-20 Thread Itamar Shtull-Trauring

> Huh?  Oh, %&#()@&%...  I fixed that in my working copy, but didn't check it
> into CVS before building a release .tgz yesterday...   Argh.  Line 137 of
> DataSkins.py *should* read:

Great, it works!

Thanks for all the wonderful work, Phillip.

-- 
Itamar S.T.  [EMAIL PROTECTED]
Fingerprint = D365 7BE8 B81E 2B18 6534  025E D0E7 92DB E441 411C

___
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] Test request: ZSession - ZPatterns based session manager

2000-06-20 Thread Phillip J. Eby

At 08:58 PM 6/19/00 +0800, mike wrote:
>
>http://www.zope.org/Members/RainDog/ZSession/ZSession-0.0.2.tar.gz/view
>
>Comments?
>

Now that I've had a chance to really look at this (while tracking down one
of the bugs you found), I do have a few comments.

First, nice job...  It's a good adaptation use of ZPatterns.  I do have
some suggestions for fine tuning, though.

* Rather than putting property manipulation functions right into the base
Session class, I would simply let users derive ZClasses of their own from
Session.  They could then actually give the Session a UI of its own, for
example.  Think of someone creating a Session subclass called "Shopping
Cart", with methods for viewing, checking out, adding/deleting items, etc.
Or, if they have many subsystems which want to share the same Session
objects, they could do this by having each subsystem use a different
propertysheet of the same Session object.

IMHO, the basicSheet stuff you've done, while convenient, encourages
developers to take the quick-and-dirty route of just using the Session as a
place to store variables - and that throws away a lot of the usefulness of
ZPatterns.  For one thing, you've guaranteed that Sessions have to be
stored as persistent objects in the ZODB, or at least that the basicSheet
has to support arbitrary properties.

* Make dead session removal something that doesn't happen automatically, or
at least have an option to do so.  Your default deletion algorithm would be
very expensive when executed against a non-ZODB database, and would be more
efficiently done a few times a day in large batches by a cron job.

* Delegate determining which sessions are dead to the Rack, rather than
doing it in the Specialist.  This allows an SQL implementation to make use
of indexes.  Specifically, make removeDead call:

self._getSource().findIdleSessions(self.session_ttl)

And then provide a default implementation of findIdleSessions() in the
Specialist.  (Btw, please note that your current implementation absolutely
requires that at least *some* session data be stored persistently in the
ZODB, which if you're using a FileStorage, is a bad place for it to be.)
Now, the whole thing works the same way when first installed, but if
someone implements the session ID and lastAccessed attributes in an SQL
database, they can substitute a different implementation for
findIdleSessions() by putting it in the Rack.


___
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] ZPatterns alpha 3 released (was re: ZPatterns0.4.0a2 bug fixes)

2000-06-20 Thread mike

"Phillip J. Eby" wrote:
> 

> Huh?  Oh, %&#()@&%...  I fixed that in my working copy, but didn't check it
> into CVS before building a release .tgz yesterday...   Argh.  Line 137 of
> DataSkins.py *should* read:
> 
> if self._v_status_ is not ChangedStatus:
> 
> Sorry, everyone.  I've checked in this fix, along with the one for Mike's
> "missing _v_dm_" problem, and uploaded an alpha3 release.
> 

Thank you, Phillip. I've spent all the evening hunting these bugs.
By the way, how do you debug? Is there better way than inserting things
like

print "objectChanging %s, has status=%d" % (
self, self.__dict__.has_key('_v_status_')
)

:-)

Mike

___
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] ZPatterns alpha 3 released (was re: ZPatterns 0.4.0a2 bug fixes)

2000-06-20 Thread Phillip J. Eby

At 11:54 AM 6/20/00 +0300, Itamar Shtull-Trauring wrote:
>"Phillip J. Eby" wrote:
>
>> * The missing _objectChanged() message - it was very hard to track down,
>> because everything appeared to be working right, except for the fact that
>> it wasn't working.  Turns out that _v_status_ (the variable, not the
>> method) was an empty string.  Which meant that what looked like
>> self.__dict__['_v_status_'] in code was actually self.__dict__['']. 
>
>Now I'm having problems with changing objects - 
>
>   Error Type: KeyError
>   Error Value: _v_status_
>..
>  File /home/Zope2/lib/python/Products/ZPatterns/DataSkins.py, line 192, in
>__set_attr__
>  File /home/Zope2/lib/python/Products/ZPatterns/DataSkins.py, line 137, in
>_objectChanging
>KeyError: (see above)
>
>
>As far as I can tell _v_status_ is not initialized at any point, which is
>what causes the problem.
>

Huh?  Oh, %&#()@&%...  I fixed that in my working copy, but didn't check it
into CVS before building a release .tgz yesterday...   Argh.  Line 137 of
DataSkins.py *should* read:

if self._v_status_ is not ChangedStatus:

Sorry, everyone.  I've checked in this fix, along with the one for Mike's
"missing _v_dm_" problem, and uploaded an alpha3 release.

___
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] Unpickleable Error

2000-06-20 Thread Brian Lloyd

> > The product isn't using cStringIO.  I didn't even know it 
> existed until
> > now ;)  I stepped through the code, and in 
> lib/python/ZODB/Connection.py
> > in the commit() function, when it gets to the line 
> dump(state) on line
> > 347 where state is (apparently) all the correct information for my
> > object, it gets the UnpickleableError.  I noticed in the 
> Collector that
> > bug #383 was about Unpickleable errors with SQL methods.  The object
> > that's trying to get pickled in this case contains SQL methods.
> > Granted, bug 383 was from around this time last year, but 
> it's the best
> > lead I've got so far.  I don't use cStringIO anywhere in my product.
> 
> Well since my product *does* use the SQL class, and the SQL class
> uses the DA class, and the DA class uses cStringIO, I guess
> *technically* I am using it.  We create SQL methods then store them as
> properties of the class.  This may be what it's choking on.

It shouldn't be - SQLMethods don't ever actually assign a StringIO
to anything but transient variables. The Results object returned 
from a query could in some cases wrap a StringIO instance - you don't 
do anything in your product where Results objects would be stored 
as object attributes do you? If this were a problem common to all 
SQLMethod objects then I would expect people to be seeing this error 
all over the place. Is anyone else seeing this?

If you're not storing Results anywhere, it would be helpful to see 
the str() of the 'state' being dumped in commit() - also to know 
what database adapter/version you are using...


Brian Lloyd[EMAIL PROTECTED]
Software Engineer  540.371.6909  
Digital Creations  http://www.digicool.com 



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




Re: [Zope-dev] Yet another bug. (Re: [Zope-dev] Bug?)

2000-06-20 Thread Phillip J. Eby

At 08:45 PM 6/19/00 +0800, mike wrote:
>It looks like retrieved items have no _v_dm_ set. I fixed it (not sure
>this is right) with:
>
>File: Rack.py
>
>def getItem(self, key):
>"""Get an item from the rack by key"""
>
># Borrow canonicals map for per-transaction item cache
>k = key,
>item = self._canonicalForm(k,_marker)
>
>if item is _marker:
>item = self.retrieveItem(key)
>self._registerCanonical(k,item) # XXX Should we cache
>non-existence?
>
>if item is not None: item._setRack(self.aq_inner)
>^
>return item

Okay, I've tracked this one down now.  It's retrieveItem() that's broken;
the _setRack(self.aq_inner) call should go right before the _setSlot(slot)
call.  Checking this one in now...  Will upload an alpha3 release shortly.



___
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] Catalog acquisition problems?

2000-06-20 Thread Martijn Faassen

Hi there,

We've been experiencing some odd interactions between the ZCatalog and
acquisition. Inside the  tags things seem to go 
screwy. It's picking up the properties in the root folder instead of
in the subfolder (the context), where the  is used. Why 
would this happen?

Another odd thing that happens is that dtml-let variables appeared
wiped empty inside the dtml-in:



...

...



The  will display nothing. 'foo' *does* exist, but it
just appears to be empty.

Am I missing something, or is this a bug?

Regards,

Martijn


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




Re: [Zope-dev] dtml-in: sort is not locale-aware

2000-06-20 Thread mike

Oleg Broytmann wrote:
> 
> Hello!
> 
>Currently dtml-in does not use locale when sorting the sequence. Before
> creating a patch I want to discuss a way dtml-in should handle this. The
> problem is that list.sort() does not sort according to koi8-r cyrillic
> locale; to make sort locale-aware I need to list.sort(locale.strcoll).
>But how I could ask dtml-in to use locale.strcoll? Should I add another
> option to dtml-in? Something like
> ?

I use 
A bit slower but works like hammer.

Mike

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




Re: [Zope-dev] dtml-in: sort is not locale-aware

2000-06-20 Thread Oleg Broytmann

On Tue, 20 Jun 2000, mike wrote:
> >But how I could ask dtml-in to use locale.strcoll? Should I add another
> > option to dtml-in? Something like
> > ?
> 
> I use 
> A bit slower but works like hammer.

   I want to use all power of dtml-in and other zope tools. There are
things where I can just write my functions and methods; and there are cases
so general that it's more correct to extend zope functionality.

   Do you know that latest version of Zope can sort by multiple keys? How
do you extend your ru_sort() to reflect the change?

Oleg.(All opinions are mine and not of my employer)
 
Oleg Broytmann  Foundation for Effective Policies  [EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.


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




Re: [Zope-dev] DTML DTD (or DTML mode for EMACS)?

2000-06-20 Thread mike

Stephan Richter wrote:
> 
> At 01:30 PM 6/20/00 +0800, you wrote:
> >Does anybody have subject?
> 
> Well, I use SGML-MODE. Works for me.

Which DTD do you use? 
If I have 'ignore undefined elements' option set it does not indent
 tags properly (of course). If I unset this option, 'normalize'
command removes all content of  tags.

Mike

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




[Zope-dev] dtml-in: sort is not locale-aware

2000-06-20 Thread Oleg Broytmann

Hello!

   Currently dtml-in does not use locale when sorting the sequence. Before
creating a patch I want to discuss a way dtml-in should handle this. The
problem is that list.sort() does not sort according to koi8-r cyrillic
locale; to make sort locale-aware I need to list.sort(locale.strcoll).
   But how I could ask dtml-in to use locale.strcoll? Should I add another
option to dtml-in? Something like
?

Oleg.(All opinions are mine and not of my employer)
 
Oleg Broytmann  Foundation for Effective Policies  [EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.


___
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] PostgreSQL 7.0.x support??

2000-06-20 Thread Oleg Broytmann

On Tue, 20 Jun 2000, Thomas Weholt wrote:
> Got some problems getting my ZPyGreSQL-adapter working. I`ve installed
> PostgreSQL 7.0.2. Eh ... is there something I should know? Are there any
> PostgreSQL zope-products out there supporting 7.0.x, other than that based
> on PoPy, cuz that was one helluva pain to compile and get to work the last
> time I tried.

   My ZPygreSQL-based site is working pretty nice; I didn't do anything
special when upgraded from 6.5.3 to 7.0...

Oleg.(All opinions are mine and not of my employer)
 
Oleg Broytmann  Foundation for Effective Policies  [EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.


___
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] PostgreSQL 7.0.x support??

2000-06-20 Thread Thomas Weholt

Hi,

Got some problems getting my ZPyGreSQL-adapter working. I`ve installed
PostgreSQL 7.0.2. Eh ... is there something I should know? Are there any
PostgreSQL zope-products out there supporting 7.0.x, other than that based
on PoPy, cuz that was one helluva pain to compile and get to work the last
time I tried.

Thomas

___
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] strange permission errors again

2000-06-20 Thread Robin Becker

In article <[EMAIL PROTECTED]>
, Brian Lloyd <[EMAIL PROTECTED]> writes
>> After the latest round of CVS updates I am again getting 
>> strange requests for authorisation in
>> unusual places. No matter that I use my admin to try and 
>> validate they still occur.
>> 
>> Typical piece of code is
>> 
>>  
>
>Robin - 
>
>The problem was with "_.namespace". If you update cDocumentTemplate 
>to the latest CVS and recompile it, this should go away...
>
>Brian Lloyd[EMAIL PROTECTED]
>Software Engineer  540.371.6909  
>Digital Creations  http://www.digicool.com 
>
>
>
I'll certainly try that out.
-- 
Robin Becker

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