Re: [Zope-dev] Python core dump zope 2.6.1+CMF1.3

2003-02-12 Thread R. David Murray
On Tue, 11 Feb 2003, Barry Pederson wrote:
 Sounds like you need the THREAD_STACKS_SIZE patch for FreeBSD's Python 2.1

Well, the others seeing the problem are *not* running FreeBSD.
I was able to confirm that one saw it with Windows2000.  Not
sure about the others at the moment.

 If you've cvsup-ed your ports tree lately, there may already be a patch in
 place in that same directory named patch-Python-thread_pthread.h-stacksize
 that looks like it does basically the same thing.

I sup regularly, and rebuild regularly.  That patch is already
applied.  Also, 2.2 appears to not need the patch, and it crashes, too.

--RDM

___
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: Bare except dangerous to ZODB? was Re: Accept-Charset hearderscausing 500 internal server error.[correct but not lenient]

2003-02-11 Thread R. David Murray
Paul Winkler [EMAIL PROTECTED] wrote:
$ cd /usr/src/Zope-2.6.1-src/lib/python/Products/
$ find . -name *py -exec grep -H except: {} \; | wc -l
170

well, this is all stuff that comes with Zope, hopefully
they have been vetted... but then there's all these

'fraid not.  These days they tend to get fixed when someone touches
the nearby code for other reasons, but no one has yet mounted
a campaign to fix them all, despite this having been a known problem
for quite some time now.

And it's generally easier just to never use a bare except than it
is to prove to yourself that the bare except isn't going to have
unintended consequences.  There are exceptions where a bare
except is needed, of course.

--RDM

___
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] Python core dump zope 2.6.1+CMF1.3

2003-02-11 Thread R. David Murray
I haven't touched Z2 in a while.  But I need a Plone site (I think).
So I downloaded 2.6.1, CMF1.3, and Plone 1.0.  Installed all on
FreeBSD 4.7.  Created a plone portal.  Going to the plone site URL
causes a python core dump.  Created a plain CMF site.  Going to the
site URL causes a python core dump.  Going to the /manage version
of the same URL works fine, by the way.

Others have seen this, so it should be easy for Concerned Parties
to reproduce this.  I have to run off to a meeting so I can't do
any more deubgging on this tonight.  NB: python 2.2.2 also core
dumps under the same scenario.

--RDM

___
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] Track modification

2002-12-16 Thread R. David Murray
On Mon, 16 Dec 2002, Cornel Nitu wrote:
 I want to track modifications of objects and I don't know when Zope
 changes the bobobase_modification_time. Is there a method I could
 overwrite for this?

No.

Bobobase_modification_time is the timestamp in the ZODB (the database)
when the object record was last modified.

If you want to track modification times that have some other definition,
you'll have to create your own tracking infrastructure (a property
on your objects and appropriate code to update it).

--RDM

___
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] Bugfix release?

2002-12-02 Thread R. David Murray
On Fri, 29 Nov 2002, Toby Dickenson wrote:
 On Wednesday 27 November 2002 5:50 pm, Brian Lloyd wrote:
  FYI I'd like to have a 2.6.1 beta out next week. Jeremy is still
  looking at a few ZODB bug reports - as soon as he's done we'll
  make the beta.

 Im not sure this is a good plan.

 Jeremy's sortKey changes look like they deserve a longer beta testing period
 than I would have thought the demand for a DateTime fix would allow.

This whole discussion makes it sound like a more automated release
process would be a very very helpful goal as far as supporting the
community-supported nature of zope.  If such a thing existed, we
could have easily followed ChrisW's suggestion and rolled a 2.6.1 release
with just the DateTime bug fixed.  It seems to me that is an
important capability to have, especially if we want to start doing
security fixes as dot releases instead of as hot fixes.

--RDM


___
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] Moving forward with Zope 2.7

2002-11-26 Thread R. David Murray
On Tue, 26 Nov 2002, Tino Wildenhain wrote:
 Tried it:

  os.environ['MYENVIRON']='FooBar'
 ^D

 echo $MYENVIRON

  nothing.

 What is wrong?

rdmurray@stage:~cat temp.sh
export TEST='abc'
echo $TEST
rdmurray@stage:~sh temp.sh
abc
rdmurray@stage:~echo $TEST

^ equally nothing.

export (and the equivalent python above) sets the environment
variable in the current process environment space, *not* the parent
(that's a *much* trickier operation).  The obverse (TEST='abc'
somecommandhere) sets the environment variable only in the *sub*process
environment space (the one being created) and does not affect the
current process.  The python equivalent of *that* would be to supply
a modified *copy* of the ENVIRON dict to execve or similar.

To do the python equivalent of what happens when you set a variable
in a script *without* using export (the current process environment
is changed but the change is not passed to subprocesses), you'd
have to make a copy of the environ before modifying it, and pass
*that* to execve or equivalent.

--RDM


___
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: user roles authentication

2002-11-11 Thread R. David Murray
On Sat, 9 Nov 2002, Grant K Rauscher wrote:
  This is how the HTTP 1/1 specification requires it to be.
  Your browser follows this spec.

 Dieter,

 I understand the HTTP spec... but ZOPE does not work that way.

 I can use methods which require roles above where I logged in.  The
 methods used for returning the roles themselves do not correlate with ZOPE's
 own actions.  Therefore ZOPE has an internal inconsistency regarding user
 authentication with basic HTTP authorization.

Zope has one security policy (you are authed from the user folder
you appear in on down), but basic auth has a different one that
requires that the browser only *send* the auth credentials at the
folder you *log in at* and down.  So if you've logged in at the
below location, and subsequently visit a location between the
user folder and the log in point, the *browser* will not *send* the
auth credentials, so you are anonymous.  If you then auth on that
new (higher) page, the browser will start sending the auth credentials.

--RDM

PS: it seems to me that not all browsers obey this, or perhaps some
send the auth for the higher level folders if challenged and if it
works don't prompt the user.


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



Re: [Zope-dev] 2.6.1 Plan?

2002-10-30 Thread R. David Murray
On Wed, 30 Oct 2002, Chris Withers wrote:
 The flurry to get features into a 'stable' release is what I was on about.
 If you flurry, the release won't be stable.

 I like the pattern of having stable releases and CVS or nightly builds for
 people who want the latest and greatest. That way everyone gets to contribute
 easily and freely and yet we still get truly stable versions.

That's how FreeBSD tries to handle it (except that you do your
own nightly builds if you want that).  But every time, just before freature
freeze time, there is a flurry of commits.   Once feature freeze happens,
however, there are only bug fixes.

Likewise, with Zope my impression is that once the Beta is cut, we are in
feature freeze.  Now, ZC may not have operated that way in the past *entirely*,
but I think we should from now on.

A flurry of commits *before* feature freeze seems unaviodable, however.
That's what deadlines are for, after all grin.

--RDM


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



Re: [Zope-dev] Can't edit CMF/Plone content if the creator is deleted

2002-10-11 Thread R. David Murray

On Fri, 11 Oct 2002, Adrian Hungate wrote:
 I don't know if this is a Zope, CMF, Plone or DCWorkflow issue, but I just
 got bitten by what appears to be a bug in someone's security handling.

 If you create some content as user A, then delete user A, no one can edit
 the content, or change it's ownership.

I suspect this is due to a Feature of the base Zope security.  A
user is only allowed to do things in the intersection of his
privileges and those of the owner of the code being executed.
Otherwise you have the same situation that having a '.' in your
root path puts you in in unix.

--RDM


___
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 Structured Annoyances

2002-09-05 Thread R. David Murray

On Wed, 4 Sep 2002, Jeffrey P Shell wrote:
 Um, how does one escape * in STX-NG?  As in - what if one is entering an
 equation inline like 2 * 2 * 3 = 12?  Or, does one just fall back on using
 x?

How about '2 * 2 * 3 = 12'?

--RDM


___
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 Structured Annoyances

2002-09-05 Thread R. David Murray

On Thu, 5 Sep 2002, Jeffrey P Shell wrote:
 Doesn't work.  At least, not where I tested it (ZWiki 0.7-ish).  :\

Worked for me.  Using StructuredText.py from 2.7, I think.

--RDM


___
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: Future of StructuredText

2002-09-04 Thread R. David Murray

On Wed, 4 Sep 2002, Jeffrey P Shell wrote:
 When writing books, however, you're most likely using an editor that makes
 it easy to reformat blocks at the proper indentation level.  For a lot of
 web input where you still want to allow some simple structure, indentation

It would be really sad if the quality of a format were limited
by the fact that web browsers aren't smart enough to launch
real editors for editing text fields.  It may be necessary, but
it would be really sad.  So if that is a ruling criterion, I'd
vote for two versions of structured text, preferably with a
translator between them.

NB: having looked briefly at the rest usage guide, I must say that
I agree that all this anchor-plus-separate-line-with-the-real-info
stuff does *not* appeal to me.

--RDM


___
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] find unused objects: hopefully the last misunderstanding...:o)

2002-08-30 Thread R. David Murray

On Fri, 30 Aug 2002 [EMAIL PROTECTED] wrote:
 Consider a tab for methods... which allows to parse them and produces
 a sortable list of links to the other referenced methods...

Just to make it clear what I'm talking about when I say effectively
impossible, consider the following bit of DTML:

dtml-var somefolder[myvar](_.None,_)

How are you going to figure out which objects that references?  And
this is a *very* simple example, just in DTML.  You should see some
of the indirection gyrations certain of my python code goes through grin.

--RDM


___
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] find unused objects: hopefully the last misunderstanding...:o)

2002-08-30 Thread R. David Murray

On Fri, 30 Aug 2002 [EMAIL PROTECTED] wrote:
 Consider a tab for methods... which allows to parse them and produces
 a sortable list of links to the other referenced methods...

Good luck grin.  You might manage a Quick and Dirty implementation,
but to guarantee you've not missed anything you pretty much have to
run the site as a program, which leads you to the classic computer
science halting problem, I think.  And that still doesn't address
the question of external references.

 By the way, new question:
 Is this the correct mailing list for such suggestions?
 If not, which one is it?

For the original has anyone implemented question, probably 'zope'.
For a discussion of how to implement this (or rather the effective
impossiblity of implementing this reliably) this is probably the
appropriate place.

--RDM


___
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] find unused objects: hopefully the last misunderstanding...:o)

2002-08-30 Thread R. David Murray

On Fri, 30 Aug 2002, Oliver Bleutgen wrote:
 If there is a central part in zope (ZPublisher?) which always runs when
 methods/scripts/etc  are called, one could patch it to also log the path
 of the object which is called (the physical path!).
 Then just use a web spider which crawls the whole site, and after that
 compare the list which has been produced by the method above to the list
 of objects in your ZODB.

 Everything which hasn't been touched is an orphan.

Combine this with a regression test suite that exercised all of
the site's functionality and pages, and you'd have something.

As with Unit Tests, if it isn't tested, it should be deleted grin.

--RDM


___
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] ZSQLMethod is stupid :o|

2002-08-14 Thread R. David Murray

On 14 Aug 2002, Axel Bock wrote:
 I tried the suggestion of Leonardo, but I got one simple - but
 nonetheless annoying - problem right now:

Simple enough for the zope list rather than zope-dev grin.

 I defined an SQL method with the two parameters title and plicense.
 Now if I call self.save_license(something, something_else) he keeps
 complaining
   missing input variable plicense,
 which I truly do not understand. (I even named the variables in the
 function call title and plicense, and nothing happened!).

self.save_license(title=something,plicense=something_else)

--RDM


___
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 Modest Proposal Concerning Monkey Patches

2002-08-13 Thread R. David Murray

On Tue, 13 Aug 2002, Jim Penny wrote:
 B)  If so, he makes whatever checks he can to determine if he can
 update the file in $(INSTANCE_HOME)/tmp.

Updating a (disk based) file and monkey patching don't seem to
go together in my mind.  I'm really unclear what you are proposing
here.

   2)  If the monkey patch is installed, then the installed file is
  written in $(INSTANCE_HOME)/tmp.  I.e., the new manage_main.py
  is written to $(INSTANCE_HOME)/tmp.

Again, monkey patching doesn't modify source code, so I don't know
what would be getting written into tmp.

 Comments?

Didn't someone else make a proposal (with code) to handle this?
Was it PatchKit?

But yes, some standard would be helpful, possibly with supporting
utilities, to allow multiple monkeypatches coexist, I think.

On the other hand, in Zope3 you just change the zcml files...although
I think there was a discusion of an analogous issue there (coexistence
of multiple modifications to the same area) and I'm not sure
a conclusion was reached (but I can't remember for sure).

--RDM


___
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 Modest Proposal Concerning Monkey Patches

2002-08-13 Thread R. David Murray

On Tue, 13 Aug 2002, Casey Duncan wrote:
 That is why it would be beneficial to make the thing being patched extensible
 in the first place thereby alleviating the need to patch it.

This is a very good point.  Now that we have comitters outside
zope corp, Product authors probably ought to think of this as
an opportunity to refactor the base zope code.  In other words,
if you need to monkey patch, instead refactor the code so that
there's a hook you can use, and submit the patch for inclusion in
the next version of zope.  Then you can monkey patch if you need
to make your product work with the current zope version, but you
won't have to worry about upgrade issues.

--RDM


___
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] saving dictionaries in MySQL database with usingexisting connection

2002-08-13 Thread R. David Murray

On 13 Aug 2002, Axel Bock wrote:
 it into the database), but this is not what I intend.
 I want to say something like this (very, very roughly!):
   db.save(dictionary)
 ...and Zope should put my dict into the db. Serialized.

 Does anyone know whether this is possible or not, and if yes, how?

Pickle it into a string and store the string.  Unpickle it when you
retreive it.  But why not just store it in the zodb?

--RDM


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



Re: [Zope-dev] Adding Items to Object Manager and Folders

2002-07-17 Thread R. David Murray

On Tue, 16 Jul 2002, Ross Boylan wrote:
 The Zope Developer's Guide and the API docs (Zope 2.5) present
 different stories about how to add things to object managers.  I don't
 really follow what the API stuff is doing.  This is a request for
 clarification.

 Devguide says do
 def addFunction(dispatcher, id):
Create object and add to self
p = SomeProduct(id)
dispatcher.Destination()._setObject(id, p)

 This makes sense, though, as commented at
 http://www.zope.org//Members/michel/Projects/Interfaces/ObjectManager,
 it relies on a private, undocumented method.  addFunction is in outer
 scope of a module, and is hooked up wtih various calls in ___init__.py.

Call this the add function.  Defined by the product, it is passed
the dispatcher for the ObjectManager to which the object is being added.
As you say, it apparently uses a private function, however despite
it's (historical artifact of a) name, it is the proper way to do
this operation.  And it is documented, in the Dev Guide wry grin.

 On the other hand, the ObjectManager API says to do
 self.manage_addProduct['OFSP'].manage_addFolder(id, title).

This is the action that non-Product code uses to add an object from
the Product to an arbitrary object manager.  'self' being the object
manager in question (eg: when called from an External Method, self
will be the folder the External Method was called on).  This sequence
*calls* the add function defined above.  In this case, it is
calling the add function defined by the Folder object in the OFSP
Product.

 First, what scope should that be done in?  Second, this seems to
 create one product (OFSP) and then add a folder to it, so that it
 creates two, nested products.

Actually, it doesn't.  This syntax has bothered me since I first
encoutered it, and I'm sure I'm not alone.  But we are stuck with
it (for now).  manage_addProduct[someproductname] is, essentially,
a lookup in a registry keyed by product name.  So that part looks
up the Product from the registry, and then you have access to the
module level functions in that Product, such as the add function
defined above.

 The API for Folder mentions manage_addFolder as a constructor, but
 again the scope is unclear to me.  Presumably it needs to know what to
 add it to, but that is not passed in.

You are calling the method on 'self' in the API example, or on some
other reference to an ObjectManager in some other context.
(Literally 'context' if you were doing this from a pythonscript.)
'manage_addProduct' gets acquired (from where I'm not quite sure
wry grin), and some magic that I haven't had a need to look in
to arranges things so that your add function gets passed a dispatcher
that has that ObjectManager as its Destination() as its first
argument, followed by whatever arguments (id, title) in the API
example) you pass it explicitly.  This is an example of Zope2
magic that we are trying hard to eliminate from Zope3 grin.

 Finally, the use of id in two places in the first code snippet (one
 apparently associated with the container, the other with the object)
 seems like an invitation to trouble.  Why is it done that way?

Tell us about it.  This is an old Zope2 (or was it bobo?) design
decision that has been revisited in Zope3.  In Zope3, only containers
know about ids in the general case, not the objects referenced by
them.

 One reason I want to know this is that I'm considering having a
 container that would automatically label (or set id) of its contents
 (e.g., 'a' is first, 'b' is second).

 Thanks for any light you can shed.

Hopefully I haven't told you anything untrue up above, but if I have
someone will doubtless correct me grin.

--RDM



___
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] Buglet in Zope, or Bug in Python, you decide...

2002-06-24 Thread R. David Murray

Zope 2.5.1, Python 2.2.1 (yes, I know it's not supported yet grin).

I just spent a day tracking down a weird initialization problem
in Zope2.  If you have the following circumstances:

1) an instance of a calss from a Product already in the ZODB
2) your Product 'initialize' uses __import___ to do the import
of the module containing the class that defines the instance
3) you introduce a bug into the module imported via __import__

then the end result is that the bug in the imported module is
completely swallowed.


The possible Zope buglet:

This happens because the ClassFactory does a bare try/except when
importing the module needed to resucitate the existing object.
This is a reasonable thing for it to do:  if the import fails
for *any* reason it marks the object as broken. It then
logs an error.

I did not, by the way, to figure out why the object got activated
before the install_products call (it was in the top level folder;
that may have something to do with it), but pretty much anything
that touched the Control_Panel (or maybe even app itself) triggered
the load.  I didn't try very hard to figure out why this was
happening.

When install_products *does* later run, in normal situations
the product install triggers the same error that ClassFactory saw,
and the developer gets to see the traceback for the bug
he introduced.  But because of the semantics of __import__
(see below), if __import__ was used to load the module-with-bug,
the traceback will *not* happen; and likely some other
error will instead, because the module was not completely loaded.

(NB: It took longer for me to find this bug than it should
have because I forgot to delete my Product from the Control_Panel;
because it was still in there from when it had been working,
ClassFactory did not print it's helpful error message.
I don't know why it didn't, and have not tried to find out).

To fix this theoretical buglet, it might be appropriate for
ClassFactory to log the error rather than just a generic can't
load error message.  Yes, normal errors will then appear in
stupid_log twice, but I'd rather two copys of a traceback than a
misleading one.


The Possible Python Bug:

The, um, interesting semantics of __import__ are demonstrated by
this short test program:

test.py
---
try: module = __import__('test2')
except: pass
module = __import__('test2')
print dir(module)

test2.py

aaa = 'bbb'
raise KeyError
bbb = 'ccc'

If you do 'import test' from the python shell, you will see that
you get no traceback from the second __import__, and further that
'aaa' and only 'aaa' is in the resulting module's __dict__.

It seems to me that this is a bug, but since __import__ is
normally-behind-the-scenes magic, there may be a good reason
for it.  However, if that is the case, how can I check,
when doing an __import__, that I've gotten a valid module?


Concluding Question:

So, which bug tracker does this one go in, zope's or python's?

--RDM



___
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] RFC 2616, side effects, and idempotence (was:Last-Modified....)

2002-06-18 Thread R. David Murray

On Tue, 18 Jun 2002, Oliver Bleutgen wrote:
 Toby Dickenson wrote:
   Rendering may produce side effects. But HEAD requests
   are required by HTTP not to have side effects.
 
  RFC 2616 section 9.4 states that HEAD is identical to GET in this respect,
  and both should have no side effects.

This bugged me the first time this discussion went around, and I
feel impelled to clearify it now, even though it is a little
tangential to the core of the discussion.  I guess I'm just a
precisionist when it comes to terminology grin.

The RFC does *NOT* say that GET and HEAD must have no side effects.
That is just the simplist implementation of what it *dees* say,
which is that GET and HEAD must be idempotent.  When Tim (I think it
was) mentioned this in the first round of this disucssion, I had to look
it up even though it is a good math term and I was a math major.

What it means is that once you do a GET or HEAD request, any
*subsequent* GET or HEAD request for that same URI may not change the
state of the system.  But the *first* access to that URI *can* change
the state of the system.  (See section 9.1.2.)

So it seems to me that some of the concern I have seen in Zope code
with avoiding write on read, where a GET request would otherwise
trigger the one-time initialization of something in the database,
is misplaced if the concern that motivates it is adhering to this
spec.  There may well be other reasons to wish to avoid idempotent
write-on-read (although I haven't thought of any yet), but RFC 2616
isn't one of them.

NB: There seems to be a small bug in the spec, in that it does not say
that any sequence of GET and HEAD requests on the same URI should
be idempotent, but that is clearly the intent.

--RDM

PS: somehow, I don't think the spec writers thought
much about hit counters...



___
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] RFC 2616, side effects, and idempotence (was:Last-Modified....)

2002-06-18 Thread R. David Murray

On Tue, 18 Jun 2002, Oliver Bleutgen wrote:
 First, your quoting is wrong, I didn't write that - talk about
 precisionist *g*.

Check the number of s.  I don't know who lost the attribution
of the inner part, but I just replied to your message and
cut off everything after the last line quoted.  The joys of
email grin.

 But, there's also the attribute safe, which is described in 9.1.1:
[...]
 Which is IMO exactly what we were talking about in that thread.

Good point.

 Perhaps it is. I don't know the areas of the code where you have seen
 that, but it might be inspired not by the problem of idempotence, but of
 safeness

It's not in the one example I could quote you, in Z3 (some hoops
Casey jumped through to try to get the first call to look up a
non-existent annotation in an AttributeAnnotatable from causing
a ZODB write).  But in other cases it might well be.

In light of the hit counter use case, safety probably is much more
important than idempotence.

--RDM



___
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] Last-modified and bobobase_modification_time

2002-06-16 Thread R. David Murray

On Sun, 16 Jun 2002, Chris Withers wrote:
 Why do you think that? Surely all zope users will care about this? ;-)
 Besides, that's not the point, re-read Casey's email more carefully...

  Although I'm new to Zope, I'm not new to mailing list. I know the
  mailing list rule but I just don't agree with your classification of my
  question.

 Well, I second Casey's opinion :-P

Well, there's two aspects to this.  The first one is the quesiton of
*why* the last modified header is currently that of the outermost
page template.  That's a [EMAIL PROTECTED] question.  The second is
the question of whether or not that is the right behavior, and what
it would take to make Zope smarter such that the last modified header
would actually be accurate.  The answer to that may be, there is no
implementable algorithm that will work.  That question still probably
doesn't belong on zope-dev, though, but instead on zope3-dev grin.

--RDM



___
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] 2nd Zope Instance

2002-06-14 Thread R. David Murray

On Thu, 13 Jun 2002, William Trenker wrote:
 I appreciate the good advice I got here on starting a 2nd instance of Zope
 using a separate INSTANCE_HOME folder and a different HTTP port.  That
 works great!

I think maybe you wanted to post this to zope, not zope-dev

 Now I'm wondering where I can get a bare-bones copy of the data.fs file for
 the 2nd instance without having to re-install Zope using the Windows
 installer.  (I got the 2nd instance working with a copy of my production
 data.fs, but I'd like to do my debugging with a stripped down database.)

Just start it with no Data.fs.  It'll make the bare bones one.

 Also, I noticed in my production var folder that there are a lot of files
 named data.fs.tr0, data.fs.tr1, etc.  Can I delete these?

I have no clue about these.  Never seen any myself.

--RDM



___
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] Disseminating big picturn info (was: Changes toZCatalog)

2002-06-13 Thread R. David Murray

On 13 Jun 2002, Casey Duncan wrote:
 We have weekly jam sessions where we often hash out new ideas.
 Certainly the CVS is commented, but it is at quite a low level. I think
 we (ZC'ers) all know we can do a better job desseminating our ideas to
 the community. It really a question of bandwidth (or lack thereof).

An audio stream wouldn't take much bandwidth :) :)

--RDM



___
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] Testing Zope Products with Python Debugger

2002-06-06 Thread R. David Murray

On Wed, 5 Jun 2002, Robert Rottermann wrote:
 Just install a second Zope and have it running from an other Port.

You don't even have to install a second zope.  Just use an
INSTANCE_HOME setup to start zope with a different port and
different Data.fs.

--RDM



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

2002-06-04 Thread R. David Murray

On Tue, 4 Jun 2002, Lennart Regebro wrote:
 From: Brian Lloyd [EMAIL PROTECTED]
  I suggest we leave this one deferred then, as I really
  would like any changes to the security architecture to
  be strongly informed by Zope3 work.

 I'm pretty sure it *is* informed, to be honest. :-)

Well, since as far as I know there hasn't been any real Z3 work on
groups, and not much discussion (recently, at least), I suspect
having Florent get in there and push is the best way to get Z3 and
Z2 in sync on the subjectgrin.

--RDM



___
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 3 Installation

2002-06-03 Thread R. David Murray

On Mon, 3 Jun 2002, Eddie Moench wrote:
 After correcting the verify-import (there was a case-problem), I get the
 error message cannot import name Interface by the command from
 Interface import Interface - which is called by many scripts. Does
 anyone had the same problem and knows a solution?

Do you have the 'lib/python' subdirectory of your Z3 checkout
set in your shell PYTHONPATH variable?  Interface is there, so
it sounds like you don't, and you won't get very far starting
zope3 unless you do grin.

--RDM



___
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] Best practice for Zope-private copy of Python 2.1 onLinux?

2002-05-07 Thread R. David Murray

On Mon, 6 May 2002, Jeff Kowalczyk wrote:
 Python 2.2, I'll ask if there is, or suggest if there isn't, a shift due
 in the installation procedures on Linux to optionally use a private copy
 of Python 2.1, much like the Windows version of Zope does. That version

Personally, I just do a 'make altinstall' on my python2.1, and then
install Zope using the python2.1 command.  That way, python2.1 is
available for any other package on my system that might need the
older python version.  I don't really see any benefit, myself, to
giving zope a private copy.

--RDM



___
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] Does 'undo' scan the entire ZODB?

2002-05-02 Thread R. David Murray

On Thu, 2 May 2002, Toby Dickenson wrote:
 and all of them are eligible to be shown on the page. However if you
 are looking at the undo tab of an insignificant leaf object that
 rarely changes, it might have to scan through a very large number of
 transactions before it finds 20 relevant ones to show.

Which means if the object only has a couple transactions it will scan
the entire DB

--RDM



___
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 and Zope

2002-04-24 Thread R. David Murray

On 24 Apr 2002, Tim Hoffman wrote:
 I have check the WebServices in cvs.zope.org, but it appears to me
 that it is a standalone implementation.

 Has anyone tackled this yet.

If you search the mailing list archives for SOAP you might be able
to find references to work someone did a while back on SOAP for
Zope.  I'm not sure how complete the code was, but it might at
least give you a starting point if you can get hold of it.

--RDM



___
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] PHP vs Zope cost benefit

2002-04-24 Thread R. David Murray

On Wed, 24 Apr 2002, Joseph Cheek wrote:
 nope.  that's a function of the DB, not PHP.  if the DB is written right
 it will roll back/commit transactions automatically.  so this becomes an
 argument for zope over php+some really lame DB, not zope over php
 regardless.

 8-)

 [agreed that the linuxjournal commit/rollback code is hairy, but the
 folks there seem to like mysql for some strange reason].

The DB provides the transaction commit/rollback *capability*, but
it is up to the application to *use* it.  The DB can't commit or
rollback automatically, because it doesn't know where the transaction
boundaries are unless the application tells it.  In PHP, that means
*you* have to write the trasaction-start/-end/-rollback calls.  Zope,
on the other hand, wraps every web request in a transaction to the
DB *automatically*, and does the rollback *automatically* if an
error occurs in the web transaction.

This is a very very cool feature of Zope, and saves a *lot* of
programming effort.

--RDM



___
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] PHP vs Zope cost benefit

2002-04-24 Thread R. David Murray

On Wed, 24 Apr 2002, Jason Spisak wrote:
 This means that every Update/Insert command make sthe ZODB
 grow, right?  Has anyone had experience with Packing a site
 with high traffic in a case like this (RDBMS backend)?  What
 happens?

No, and RDBMS update or insert does *not* cause the zodb to
grow (unless zodb data is changed at the same time).

Perhaps you are confusing current-transaction-rollback and Undo?
Zope supports the former with RDBs, but not the latter.  That is,
once the transaction is *comitted*, it can't be rolled back by Zope.
Might be a nice feature to add, though, for databases that support
it grin.

--RDM



___
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: death to index_html; ObjectManager?

2002-04-16 Thread R. David Murray

On Tue, 16 Apr 2002, Casey Duncan wrote:
 However, you should know that the crux of this change is really to the
 publisher, the mixin is just the management piece. *any* object can
 define a browser_default hook that overrides 'index_html', not just
 objectmanagers.

All the more reason to make it a mixin, yes?

--RDM



___
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: ZClasses useful! [Was: ZMI / JavaScript brainstorm]

2002-04-09 Thread R. David Murray

On Tue, 9 Apr 2002, Martijn Jacobs wrote:
  I will not stop dissing them until people stop using them and then
 complaining
  when they break, don't do what they want or behave unexpectedly.

 What's your efford on this task? If people like to use them, let them!
 It's not up to you to decide for THEM what's best or not. The choice for
 YOURSELF not to use them is just as fair as other peoples choices.

Actually, we find on #zope-dev that if we steer newbies away from
zclasses and toward Products to begin with, they thank us later,
and it reduces our support burden.  The same can be said for this
list.  Chris does tend to be a little vociferous about it grin.

We aren't generally dealing with content devloper types in either place.

Learning ZClasses (because that's what was documented in the manual
at the time) rather than going straight to python products was
the *worst* mistake I made in starting to use Zope, myself.  It
probably set me back six to nine months.

--RDM



___
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] isecure XML-RPC handling.

2002-04-06 Thread R. David Murray

On Sat, 6 Apr 2002, Rossen Raykov wrote:
  BUT: The developer has access to the system, and the dump doesn't have to
 be
  included in the HTML output. Maybe error dumps could be sent to a disk-log
  of some sort?
 

 Exactly that's my point.
 Log it with as many details as you can!

From what he says, Shane's new better tracebacks code, which I
believe will be in 2.6, does the equivalent of this.

--RDM



___
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] isecure XML-RPC handling.

2002-04-03 Thread R. David Murray

On Tue, 2 Apr 2002, Eron Lloyd wrote:
 The problem here seems to be that you are trying to do XML-RPC communication
 with a version of Zope that doesn't support XML-RPC out of the box. You

I think most people missed the point here.  I don't think Rossen
is asking for help on running zope or getting xml-rpc to work with
it.  He's observed a security problem: he believes the fact that
a traceback including path names is included in the error response
is a security exposure.  This has been discussed on zope-dev before,
but the fact remains that the security community *does* treat
exposure of filesystem path information as a security issue.

I believe the addition of the variable to control what happens with
tracebacks addresses this issue from a security standpoint, which
is probably all that Rossen cares about with regards to letting
bugtraq know that the security bug has been fixed.

The fact that zope.org itself is still insecure in this
sense may also be an issue, but not one that is going to
get addressed before the new zope.org goes online.

--RDM


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



Re: [Zope-dev] FW: Catalogs, Imports, and Path Awareness (was Re:[Zope-dev] ZClass Constructor Cleanup for 2.6)

2002-04-02 Thread R. David Murray

On Mon, 1 Apr 2002, Jeffrey P Shell wrote:
 subobjects and calls that.  That's probably the right thing, but it is
 what's causing the double cataloging, regardless of how the item is
 cataloged.  Catalog*Aware objects call into the catalog during
 manage_afterAdd, and I'm sure that the same thing is happening to my WHEN
 OBJECT ADDED... triggers as well.

Ah, I get you.  So the issue is with import and manage_afterAdd,
not with import and CatalogAware specifically.  That's what confused
me in your message wry grin.  Zope probably needs some refactoring
to fix that one

--RDM


___
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] Simplification via custom protocol handlers:cvs://server/project, zope://foo ?

2002-04-01 Thread R. David Murray

 is bad.   What happens
 when we switch to some other revision control tool (like clearcase,
 subversion, sourcesafe)?  Either you
 have multiple classes like CVS-XSLTFile, Clearcase-XSLTFile, etc. or a
 single class that knows
 about every possible version control system.   yuk.   Clearly,
 inheritance and mixins are not the answer.

If I understand you correctly, you are hitting exactly the problem
that the Z3 CompoentArchitecture is designed to solve, which it
does in a more general way than your URI based scheme.  You might
want to take a look, though it probably doesn't do you any
immediate good.

--RDM


___
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: Catalogs, Imports, and Path Awareness (was Re: [Zope-dev] ZClassConstructor Cleanup for 2.6)

2002-04-01 Thread R. David Murray

On Mon, 1 Apr 2002, Jeffrey P Shell wrote:
 If other people have come across this, I think finding a resolution to this
 would be a more-than-worthy 2.6 project.  If I'm just smoking crack and it's
 only a ZPatterns/TransactionAgents behavior that I'm witnessing, then I'll
 just leave my huffing and puffing and whining and yelling and fainting to
 myself and immediate coworkers next time I have to go through this
 situation.  :/

I thought that with ZPatterns one was recommended to avoid the
Catalog mixins and instead use something like SteveA's
catalog trigger from ZPAddOns (I think that's the right product
name).

--RDM


___
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] Tracing transactions

2002-03-26 Thread R. David Murray

On Tue, 26 Mar 2002, [iso-8859-1] Dario Lopez-Kästen wrote:
 I need it mostly to log what transacations failed, why they failed and what
 was involved.

 Any pointers in a general direction towards this are appreciated.

The -M option of Z2 might get you part of what you want.

--RDM


___
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] Getting the count of hits while searching zcatalog

2002-03-26 Thread R. David Murray

On Tue, 26 Mar 2002, Deniz, Metin wrote:
 can you tell me how to get the count of hits searching a zcatalog.

This is a [EMAIL PROTECTED] rather than a zope-dev question.

The answer, I think, is 'sequence-length'.

--RDM


___
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] variables in zope (beginner question)

2002-03-12 Thread R. David Murray

On Mon, 11 Mar 2002, Mike Guerrero wrote:
 I the code below I want to be declare a variable 'tot_net_amt' and add
 'net_amt' to it for each record returned.  How can I: 1) declare the
 variable  2) add to it within the loop.

 Thanks.  Is it in the Zope book?  I'll read some more tonight.

This question is much more suitable for the 'zope' mailing list
rather than 'zope-dev'.

The short answer is (a) download the 'dtml-set' product and use
it or (b) dtml-call REQUEST.set('yourvar',value)

The long answer is: think about using pythonscripts instead grin.

--RDM



___
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: zope3 tutorial (was Re: Zope vs. Cocoon)

2002-02-25 Thread R. David Murray

On 25 Feb 2002, seb bacon wrote:
 But IMO the tutorial doesn't really demonstrate *why* the component
 architecture is a Good Thing.  If you're not familiar with the design
 patterns used, then I suspect it looks overly verbose and fairly
 opaque.  If you are familiar with GoF or suchlike, then you'll drool.

Maybe reading GoF should be listed as a pre-req.  I'm about 1/2 serious.

--RDM


___
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] Newbie: manage_add DTML access to product variables

2002-02-08 Thread R. David Murray

On Tue, 5 Feb 2002, John Hall wrote:
 1.  How do I format an object to use in a dtml-in loop?  (I'm thinking
 it needs to be a list of dict's).

dtml-in will accept four differen formats:  a list of objects with
attributes, a list of values, a list of dicts, or a list of pairs.

A list of objects is the most common case, and you get access to the
attributes by name inside the loop.  A list of values can only
be accessed using dtml-var sequence-item, which gives you access
to each item in the list in turn.  For a list of dicts you want
to specify the 'mapping' keyword on dtml-in, in which case the
keys of each dict can be used in dtml-var statements.  I'm not
100% sure what the list of pairs does, but I think one of the
two items in the pair goes into sequence-key and the other into
sequence-item.

 2.  How do I access a function or variable in a Product's python code
 directly from DTML (or how do I add a callable method in Zope's DTML
 namespace from a Product's python code?)  I think my major problem
 here is lack of understanding of how Products are accesible within
 the DTML namespace.

If you make the right security declarations you can probably access
a class variable from dtml.  What might be easier, though, is to
use the binding feature of DTMLFile to make the list available
when the method is called, via pre-declaration in your Product:


  [code that defines your class, including the class variable listOfMethods]

  yourAddMethod = DTMLFile('dtml/addForm',globals(),
listOfMethod = yourclass.listOfMethods)

I'm not 100% sure this is going to solve your problem, but I've some
some stuff along these lines successfully, so it might.

--RDM


___
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] Module changes not taking in external method

2002-02-08 Thread R. David Murray

On Fri, 8 Feb 2002, Ted Skolnick wrote:
 Hi I am a zope newbie getting started by using external methods.   I am
 importing modules from another package in my external methods and having
 some problems.  When I change code in the external method, I see thos
 changes take right away when I call the method from the browser.  But when I
 change code in the imported modules, I don't see the changes take until I
 reboot zope.   Is zope cacheing my modules?  Any thoughts?

No, but it *is* actively rereading the external method when the timestamp
on the source file changes (assuming you are running in -D mode).  Zope
has no way to notice changes to the imported module source files, so
it doesn't know to reread things when they change.

--RDM


___
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] dynamically using inheritance

2002-02-03 Thread R. David Murray

On Sat, 2 Feb 2002, Ed Colmar wrote:
 dtml-call REQUEST.set('skinname', 'skins.default')
 dtml-with _.string(skinname)

This is a [EMAIL PROTECTED] question rather than a zope-dev
question, but:

dtml-with _[skinname]

should solve your problem.  That looks the string held in
skinname up in the namespace and passes it to dtml-with.

--RDM


___
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] Dynpersist.so and makefile.pre.in

2002-02-01 Thread R. David Murray

On Thu, 31 Jan 2002, Jeffrey P Shell wrote:
 On 1/31/02 5:02 PM, Ed Colmar [EMAIL PROTECTED] wrote:
  Are there any other (simple) solutions to doing authentication through a SQL
  DB?  Jumping through hoops to get Zpatterns working seems silly when all I
  need is basic authentication.  Though it would probably make my life easier
  once I figure it out.

 You might want to check out http://www.zope.org/Members/otto/userdb,
 although it looks rather old.  If it's what I think it is, it's based on

You might also want to check out

http://www.zope.org/Members/TheJester/exUserFolder

--RDM


___
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] Generating abstracts in ZCatalog

2002-02-01 Thread R. David Murray

On Fri, 1 Feb 2002, Cuthbertson, Mark wrote:
 Hi, I'm quite new to all this Zope development but seem to be picking
 things up quite nicely.  However, I am having a problem generating
 abstracts for my Search Engine.  It's something that I used to be able

Probably you should post to [EMAIL PROTECTED] rather than here, as this
is a question about using zope, not developing code for it.

I'm not sure what you mean by abstracts for my search engine, but
the metadata feature of the ZCatalog would seem to be a logical
candidate.

--RDM


___
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] Dynpersist.so and makefile.pre.in

2002-01-31 Thread R. David Murray

On Thu, 31 Jan 2002, Christian Theune wrote:
 On my systems it is located at somewhere like

 /usr/lib/python(version)/config/Makefile.pre.in
 or
 /usr/local/lib/python(version)/config/Makefile.pre.in

Just an FYI, Makefile.pre.in no longer exists (as far as I can
tell) under python 2.2.

--RDM


___
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] Python 2.1.2 causes Error code 6?

2002-01-28 Thread R. David Murray

On Mon, 28 Jan 2002, Chris Withers wrote:
 I tracked it down to a python script that returned a data structure consisting
 of nested lists and dictionaries. Now, I remember there being a bug in
 RestrictedPython that would affect Zope 2.4.2, but why would the upgrade of
 Python suddenly trigger this?

Well, my understanding is the new python is catching memory corruption
bugs the old one wasn't, and that the compiler for python scripts
in 2.4.2 has bugs...so maybe you were just lucky zope wasn't crashing
before?

--RDM


___
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] Use sql database in ZCatalog

2002-01-25 Thread R. David Murray

On Fri, 25 Jan 2002, Howard Zhang wrote:
 Does anyone use sql database to store index and meta data for
 performance and still provide same zcatlog api to keep compatibility ?.

Why do you think storing metadata in an sql database would improve
performance?  I'm not saying it wouldn't, but it's not obvious to
me that it would.

--RDM


___
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] How to automatically redirect publishing request toanother folder?

2002-01-25 Thread R. David Murray

On Fri, 25 Jan 2002, Joachim Schmitz wrote:
 How about creating a body-dtml method in the root, with

 dtml-with firstSlide
 dtml-var body
 /dtml-with

Or have that body method to a RESPONSE.redirect, if having
the page have the wrong URL confuses things.

--RDM


___
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] Product upgrades

2002-01-24 Thread R. David Murray

On Wed, 23 Jan 2002, Max M wrote:
 Generally Zope uses pickle to save the objects. And pickel will not save
 the methods, nor the class attributes::

I'm surprised to have seen no mention of __setstate__ in this
thread.  Is doing simple upgrade-on-the-fly via __setstate__
now considered Bad Form?

--RDM


___
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] proxy role inheritence (was REQUEST.AUTHENTICATED_USERquestion)

2002-01-24 Thread R. David Murray

On 24 Jan 2002, Leonardo Rochael Almeida wrote:
 When you give a method one or more proxy roles, the user that can
 view/call it assumes these roles instead of his own. That means he has
 the permissions these proxy roles have, instead of the permissions his
 own roles would give him (which means proxy-roles can enhance as well as
 reduce permissions). This means proxy roles only work for that method
 that is being viewed/called (and other methods called from it as well),

Actually, I believe this is not true.  My understanding is that
the proxy is only good for the method it is on.  If it calls another
DTML method, that sub-DTML method runs with the original user's
roles.  I believe the same is true for called pythonscripts.

Actually, writing that down calls forth a question.  If you put
a proxy role on a method to *reduce* priviledges, shouldn't the
reduction apply to called methods even if an increase in permissions
doesn't apply to called methods?  Does it?

--RDM


___
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] Searching

2001-12-14 Thread R. David Murray

On Wed, 5 Dec 2001, Dieter Maurer wrote:
 Not out of the box.

 You could place something before ZCatalog (which parses subquerie for
 search term and expands them into a set of synonyms).
 But you would need to work quite hard to get true semantic search...

A while back when I was working with ZCatalog I thought I saw
support for a synonym table in the default Splitter.  I don't
think there was any management interface to using it, though.

--RDM


___
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] Competition

2001-12-06 Thread R. David Murray

On Fri, 30 Nov 2001, Chris Withers wrote:
 Stephan Richter wrote:
  And they have their own issues, what with needing to make money out of
  Zope, which means intrinsically that all of us
  outside of Zope Corp are in competition with them.
 
  No that is not true. In Germany for example, noone feels in competition
  with Zope Corp., since they are not even looking for projects there.

 Yet ;-)

I don't know why people assume that competition=difficult to work
together.  One of our closest competitors in the ISP business is
also one of our closest collaborators.  True, our primary markets
have different centers, but they do overlap considerably, especially
when it comes to the higher end customers.

I see the competition between ZC and other Zope solution providers,
not to mention *between* the other solution providers, as a good thing.
It keeps us all on our toes.

--RDM


___
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] from Globals import Persistent

2001-11-15 Thread R. David Murray

On Wed, 14 Nov 2001, Benjamin Buffereau wrote:
 I'm using the binary version of Zope 2.4.3 for Windows. I'm trying to run the
 PollProduct example of the Zope Developper's Guide, and it seems to me that
 there is a big problem with the import of the name Persistent. Here is what I
 get trying to import Persistent from the Python interpreter:

Persistent is magic.  Don't ask me how and I can't remember why, but
Zope does some magic with regards to the Persistent module.  If you
do:

import Zope
from Globals import Persistent

I believe you will find that it works.  At least, it does for me.

--RDM


___
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] Extending Zope with Eiffel

2001-10-26 Thread R. David Murray

On Thu, 25 Oct 2001, Eric Roby wrote:
 I like Python ... but I don't think (as a scripting language) it is up to
 the challenge of an expert system.  A language that I feel is up to the
 challenge is Eiffel (especially in conjunction with ISE EiffelStudio .. an
[...]
 Am I way off base here ?  Or am I wrong about my assessment of Python's
 ability to build an expert system ?

I can't give you any feedback on python's suitability for building
expert systems, but I can say that Python is *not* a scripting
language.  It happens to be very useful for that, but it is a real,
full blown, sophisticated, Object Oriented programming language.
It is, however, primarily an *interpreted* language rather than a
compiled one, though you can optimize around that with the appropriate
use of modules written in C or C glue code calling modules
written in other compiled languages.

If you already have an expert system in Eiffel or some other compiled
language, then taking advantage of Python's facility for acting as
a glue language would make a lot of sense...

--RDM


___
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: [Bug+Patch] Microseconds in DateTime

2001-10-25 Thread R. David Murray

On Wed, 24 Oct 2001, Nicola Larosa wrote:
 OK, so nobody cares. Anyway, the BugCollector is down, what is a poor guy to
 do to get the fix in?

 Of course, if it is a very stupid thing to do, I would really like to know. :^)

Well, I like the idea personally, but let me play devil's advocate here
for a minute.  Suppose there are platforms where those extra couple
of digits are not valid.  Suppose further that the common paradigm of
using str(int(DateTime())) as a unique id is employed.  Now suppose you
move that code from a Unix platform to some platform that doesn't
supply the extra digits.  Suddenly your code that used to provide
uniqueness down to a fairly tight hit interval is much more
fragile.

Is this a real concern?  I don't really think so.  But it's the
only objection I can think of grin.

--RDM


___
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 or FEATURE?

2001-10-24 Thread R. David Murray

On Wed, 24 Oct 2001, Sidnei da Silva wrote:
 But i still dont understand why the first time i call REQUEST.set, and use
 dtml-var variable the variable has the value i set, and subsequent calls to
 REQUEST.set modify REQUEST['variable'] but not variable. This is not right
 for what i think. Or it modify the variable ALL the times or NONE.

 Do you agree?

I agree.  It looks like a bug to me grin.  I think the correct
behavior would be for all the sets to work, regardless of the
with.  My guess is that if you look in the code you'll find some weird
interaction happening between the namespace stack code and acquisition.

And by the way, I was under the impression that the dtml-with REQUEST
idom was a pretty common way to handle just the case you chose it for.
In fact, I think that idom appears in DC code here and there, though
I could be misremembering that part.

--RDM


___
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] STX and underline symbology

2001-10-23 Thread R. David Murray

On 19 Oct 2001, Alastair Burt wrote:
   1) there are no spaces in strings to underline, only more '_'
  (_this_is_an_example_), or

I'd vote for this.  I think it makes underlining more visual when reading
the stx in text mode.

--RDM


___
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] Versions (still)

2001-10-23 Thread R. David Murray

On Tue, 23 Oct 2001, Andy McKay wrote:
 and got into ZODB stuff I didnt understand. I would have thought having a
 little refactoring to give two more methods: getVersionContents and
 commitObject would be possible, but Im scratching my head at FileStorage
 now.

To my understanding, versions are implemented as long running transactions
against the ZODB.  So I think to do anything with them you have to put in
hooks at the level of the ZODB transaction machinery.  That might have some
interesting byproducts if you were to do it grin.  The zodb-dev list
is probably the place to inquire

---RDM


___
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 or FEATURE?

2001-10-23 Thread R. David Murray

On Tue, 23 Oct 2001, Sidnei da Silva wrote:
 I dont know how it was supposed to work, but i think that if the REQUEST was
 immutable inside a dtml-with, it should be not allowed to call REQUEST.set
 inside it.

It isn't immutable.  The second and subsequent sets should work.

 dtml-call REQUEST.set('var', sequence-item) == only works first time it

Well, I don't know quite what you are observing, but this code is broken.
Inside the quotes you are in python mode, and 'sequence-item' in python mode
is the variable sequence minus the variable item.  Since it didn't throw an
error, you must have variables by those names that understand substraction.

Try _.getitem('sequence-item') instead.

I suspect this thread belongs on zope, not zope-dev.

--RDM


___
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: Install doesn't start properly

2001-10-23 Thread R. David Murray

On Mon, 22 Oct 2001, Martijn Pieters wrote:
  First, actually, untarring as root sets the ownership of a lot of the
  stuff in my solaris bindist to 506:100 (brian:users, it says in the
  listing.)

 Default behaviour when using tar as root; it'll preserve the UID and GID of
 the person that created the tar.

Just FYI, this works right (IMO) under FreeBSD: files untarred as root are
owned by root unless you use the p flag.  Of course, this note only applies if
you are just handling this item via doc changes; if you have install do the
chown, it's moot.

--RDM


___
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] GUF and SQL

2001-10-11 Thread R. David Murray

On Thu, 11 Oct 2001, Andre Schubert wrote:
 I'am using GUF with ZSqlMethods and found out, that every time a object
 is accessed the sql-method is called,
[...]
 Is there a why to implement such a AUTHENTICATION-String cache in the
 GUF-Product, it brings a lot of performance, when using GUF with SQL.

Did you try using the caching built in to sql methods?  Granted that
doesn't address 100% of the issue, but it might address high-90s% of it.

--RDM


___
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] file descriptors on Solaris

2001-10-03 Thread R. David Murray

On Tue, 2 Oct 2001, John Ziniti wrote:
 Yeah ... something tells me it's a little more complicated than that.

Like recompiling the kernel, quite possibly.  On FreeBSD there's
a sysctl, although you may still have to recompile the kernel in
some cases I think; on Linux you can zap a variable in proc.  On
solariswho knows wry grin.

 Any advice on the other front?  If I can reduce the number of files
 Zope needs to process this request, I'd grumpily agree to do that,
 is Zope opening a file for every input name=x.name:records?
 Will using input name=x_names:list help?

I don't see why zope should need so many file descriptors.  But
you may have to start tracing code frown.

I have previously noticed a related phenomenon: on FreeBSD when
I start zope, *something* tries to open every possible port
number using a separate file descriptor. They must
then be closed, because after startup only the ports requested
are still open.  I determined this by running lsof and capturing
the output.

In this case, it appears to be benign; the only negative consequence
is the appearance of the Too many open file descriptors message
in /var/log/messages.

--RDM


___
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] Create directory in LocalFS

2001-09-26 Thread R. David Murray

On Tue, 25 Sep 2001, Jeff Nielsen / UgoFast wrote:
 I don't think I'm understanding you. I want to create the subdirectory
 programmitcally inside a DTML Document. Are you suggesting something
 like:

 dtml-call
 /images/Companies/100/manage_addProduct/OFSP/folderAdd(187)

OFSP is Zope's Object File System Product.  So no, you wouldn't be using
one of its methods to create a subfolder in a LocalFS folder.

What Dieter was asking/suggesting, is that you look at LocalFS's management
system.  *If* it has a way of creating a subdirectory inside a
LocalFS folder, then you could just take a peak at how it does it,
to find out how to code it yourself in your own product.  If, however,
LocalFS does *not* have a way of creating a subdirectory through
its management interface, then you'll probably need to write an
external method that uses python file system library functions to
create the subdirectory.  I've never looked at LocalFS, so I don't
know if that would be enough, or if you'd also have to call some
LocalFS routines to let it know that the subdirectory now exists.

--RDM


___
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] Z2.log file not showing user name correctly

2001-09-26 Thread R. David Murray

On Wed, 26 Sep 2001, George Nguyen wrote:
 I was looking in the entries in the Z2.log file and it
 lists the user as being Anonymous when I'm actually
 logged in as a validated user.

This is very likely the result of an authentication...optimization?...done
by the security machinery:  if the resource requires only Anonymous
permission to access, then no further security checks are done,
including identification of the user.  This leads to various unexpected
behaviors, presumably this among them, and there has been at least
one motion to change this behavior.  I don't know if it has made it
into the Fishbowl yet or not.

--RDM


___
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] DISCUSS: Community checkins for CVS

2001-09-25 Thread R. David Murray

On Tue, 25 Sep 2001, Paul Everitt wrote:
 Repugnancy aside :^) your second comment is on the mark.  It isn't so
 much that you need to assign and lose ownership.  Rather, the
 committer needs to ensure that they aren't violating your rights.

 We'll probably work up some boilerplate such as, I'm going to commit
 your patch to Zope.  It's going to be available under the ZPL and the
 joint ownership model of the Zope Contributor Agreement.  Please respond
 agreeing that you understand the ZPL, the joint ownership model, and
 allow this contribution under these terms.

 How does that sound?

Sounds like a workable process, if an email acknowledgement is enough.
Perhaps you could also make some such language part of a click through
during the process of submitting a patch to the server?

I think for myself just labeling things as public domain will work
fine, but I know that won't work for everyone.

--RDM


___
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] Structure-text : html

2001-09-21 Thread R. David Murray

On Thu, 20 Sep 2001, Jens Vagelpohl wrote:
 AFAIK this is the right behavior and not a bug. you ask for the
 StructureText document to be rendered and you inform the rendering
 machinery that the document is in structured text. the rendering process
 will output HTML.

 i think what you want is to simply say dtml-var StructureTextDoc without
 the fmt flag. that should get you the raw structured text. the rendering
 process then assumes the document is already in some kind of HTML format
 and does not try to generate HTML tags.

 On Thursday, September 20, 2001, at 07:14 , Sin Hang Kin wrote:
  When I use dtml-var StructureTextDoc fmt=structured-text
 
  I got html /html in the result. Are there any reason that it should be
  there? I wounder how can structured text generate valid html or be used in
  wap applications.

I think you misread what Sin Hang Kin was getting at.  Consider:

dtml-var standard_html_header
dtml-var StructuredTextDoc fmt=structured-text
dtml-var standard_html_footer

Yes, you want StructuredTextDoc to be output using html formatting.
But what you *don't* want is to have html/html (or header or
body) tags; those are all handled by standard_html_header/footer.

Unless nesting html documents inside html documents is allowed by
the html standards?  And supported correctly (for some useful
definition of correctly) by almost all browsers?

--RDM


___
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] Patching Zope Products .. next Question

2001-07-11 Thread R. David Murray

On Wed, 11 Jul 2001, Ulrich Eck wrote:
 the CMFDefault.Document for example is still subclassed from 
 CMFCore.PortalContent (the default) and therefore doesn't behave
 like a dataskin ..
 
 any ideas ?

You can hotpatch the __bases__ attribute of the derived class.

--RDM


___
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] Speed up the learning curve

2001-06-25 Thread R. David Murray

On Sun, 24 Jun 2001, Dieter Maurer wrote:
 Rene Pijlman writes:
   A suggestion to cut the Zope learning curve down by half a day...
   
   When the programmer forgets the docstring in a method of a Python-based
   product, instead of saying
   
  Sorry, the requested resource does not exist.
   
   Zope could say:
   
 Sorry, this method has no docstring.
 Doesn't it do precisely this when you run Zope in debug mode?

I didn't loose half a day to this one, but I did loose at least
fifteen minutes.  And I'm a fairly experienced Zope/Python programmer.

Furthermore, I do not in general run in debug mode during development.
Most of the time I am developing with continual customer review, and
the customers get confused and worried if the tracebacks appear on
the error pages, so it's easier just to not use debug mode.  I do,
however, run with stupid log enabled.  So if it is unacceptable to
have a more informative non-debug message, it would be nice to have
something show up in the stupid log.

--RDM


___
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: PossitionIndex (was: Re: [Zope-dev] ZCatalog phrase indexingrevisited)

2001-06-18 Thread R. David Murray

On Sun, 17 Jun 2001, Chris McDonough wrote:
 index_object, because the splitter return has all the words
 in order, even the dupes... as you iterate, you can mutate

Is this part of the current formal Splitter Interface? If not,
it needs to be if other code is going to depend on it.

Oh, yeah, and where is the formal Splitter interface documented grin?
I don't see anything in SearchIndex, and a search for splitter interface
on zope.org didn't turn up anything useful.

--RDM


___
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] [Announce] API Documentation Fishbowl Project

2001-06-07 Thread R. David Murray

On Wed, 6 Jun 2001, jimbo wrote:
   I believe that if you are a true developer you will/can figure out the api given 
the vast information available today.
   For example the dcworkflow product was just released. I believe the best 
documentation would be  how-to actually use the product.

Ah, not really.

Or, rather, maybe, with the *new* products whose APIs are being
constructed/documented better from the start, but if and probably
only if there are either comprehensive examples or the framework
docs mentioned in the proposal. 

IMO the biggest issue here for developers, as others have said, is
clarifying/documenting the old Zope interfaces.  If we get that,
then new products will be even better/better integrated.  This
includes ZClasses.  Half the problem with ZClasses is that they
sort of almost work, but they break down partly because the interfaces
really aren't documented very well.  (I strongly recommend learning
python.  It's an easy language to learn.  Then use real Python
classes instead of ZClasses.  ZClasses have their place, but if
you are doing serious development they tend to get in the way more
than they help, IMO).

In short enough geek speek.  Change the language into something the rest of masses
can understand.  How can I use zope/API to get PAID!  How can I actually make the
dcworkflow or the core session or the ZPT do something.  Plenty of example uses. I
think they might call them case studies or something to that effect.

How can I actually make x do something sounds an awful lot like
what I think the framework docs portion of the proposal is
addressing, when you are talking about components like workflow
and coresessiontracking that are used to *develop* applications.
I think you will find that good API+framework documentation will
either provide a good deal of the info you are looking for, or,
for products that are less in the way of infrastructure components
and more in the way of end user products, provide the essential
foundation upon which more end-user directed documentation can
built.  Good end user stuff is best written by someone who understands
how the product works in detail, and the API/framework docs provide
the foundation to acquire that knowledge (assuming the product
author himself doesn't go straight on to providing the end user
docs).

How to get use the API to get paid is, I think, outside of the
scope of the proposal grin.

As for the proposal itself, the mechanism outlined sounds OK to me.
I do also have an issue with the Interface scarecrow in that it does
not seem to cover stuff that is not specifically a Class interface.
I'm thinking of module level functions in particular, but also
the documentation of Protocols mentioned by another poster is of
concern.  So Interfaces by themselves do not seem to be enough.
Where they are enough, though, I should think there would be nothing
stoping someone from writing one for an existing Zope internal
interface, without modifying the code (ie: no automated verification
in that case).  Of course, I suspect that anyone doing that grubby
job would tend to want to start tinkering with the code to clean
up the interface...which come to think of it might be something
that should go in the risks section wry grin.

On the third hand, there's nothing to stop the community from
generating some this is how I think it works documentation
that people with inside knowledge can then help tune.  I think
some of this happened during the original Interfaces Wiki days,
and it seems to have produced good results.

I also want to say that I really like the fact that this proposal
makes it clear that DC understands the long term value of good
developer documentation grin.

Oh, and one final thought.  It seems to me that the Developer's Guide
needs to evolve into a meta framework document: a place to learn
how the whole system fits together, and how you use the various
components to build working systems.  I think it's a solid start
in its current form.

--RDM


___
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] Streaming and PCGI

2001-06-06 Thread R. David Murray

On Wed, 6 Jun 2001, Andre Schubert wrote:
 Can anybody explain me why streaming over PCGI doesn't work, or has
 anybody a solution of streaming with PCGI ???

Perhaps the PCGI has its own timeout that doesn't wait even if it has
been given some headers.  I wonder if Apache ProxyPass has the same
issue?

--RDM


___
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] ANNOUNCE: Zope 2.4.0 alpha 1 released

2001-06-03 Thread R. David Murray

On Fri, 1 Jun 2001, Ng Pheng Siong wrote:
  Actually I have wondered something about that... Why does it always show
  up as linux2 even when not on linux?  I'm on FreeBSD using a compiled from
  source python and Zope and it still shows up as Linux.
 
 lib/python/version.txt
 
 Just edit it.

This smells like a bug to me.  If the software is compiled from
source, I expect it to tell me what system/software it was
*actually* compiled with, and in the case of python *actually*
running on, not some string hardcoded into a text file.  If
the string is not dynamically generated, I'd rather it not
lie; ie: it should just give the Zope version.

--RDM


___
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] Does creating REAL over-the-web Python code becomerealistic with Zope 2.4?

2001-06-01 Thread R. David Murray

On Fri, 1 Jun 2001, E. Seifert wrote:
 at http://dev.zope.org/Resources/ZopeDirections.html:
 The major goal will be to simplify how components (now called products)
 are built and used. For example, currently some products are built in the
 filesystem and some are built in the object database. We want to remove
 this distinction so that all components can be edited via the filesystem
 and
 live in the object database.

This does worry me.  I think I understand at least one motivation (ZEO),
but...

Well, as long as it doesn't compromise my ability to write Zope python code
using filesystem tools, it should be OK.  It just makes me nervous grin.

--RDM


___
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] ANNOUNCE: Zope 2.4.0 alpha 1 released

2001-06-01 Thread R. David Murray

On Fri, 1 Jun 2001 [EMAIL PROTECTED] wrote:
 My impression is that FileStorage implements a 32-bit id-type-thingy
 somewhere (look at ZODB docs, I think there is something about this
 somewhere), which limits it (in addition to the Linux kernel ext2 fs limit),
 to  2GB.  With 7.5 GB, I'd use a more advanced storage like the new - well,
 not quite released ;) - Berkeley (libdb3 based) storages, though I haven't
 tried anything like that myself...  

FileStorage does *not* have a 2GB limit.  The only 2GB limit is the old
Linux filesystem limit.  I know this, because I've had 2GB Data.fs
files on FreeBSD.

--RDM


___
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] Browser Timeout

2001-05-31 Thread R. David Murray

On Thu, 31 May 2001, Andre Schubert wrote:
 I tested with lynx. If i type http://somewhere.com/foo/test i got no
 response because timeout, this means, that RESPONSE.setStatus and the first
 RESPONSE.write are sent back to the client if the body processing is done,
 but i would send every command as it is processed back to the client.
 Or is it my Zope( 2.2.4 ) on Immunix 6.2 RedHat.

I presume you tested it first without the large processing to make
sure the method was otherwise working.

I haven't used RESPONSE.write myself.  I know that others on this
list have, so hopefully someone will chime in with a working example
or a debuggin suggestion.  Of course, it's always possible that
streaming got broken at some point; I'm not sure that it gets used
by very many people so breakage may take a while to get noticed...

--RDM


___
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] Browser Timeout

2001-05-30 Thread R. David Murray

On Wed, 30 May 2001, Andre Schubert wrote:
 Is it right, the the browser send a request and got the response when
 the site is completly rendered( all queries executed ) ?
 If yes, how can i directly write to the client. First all headers, and
 after every query send the data to the client, if i can do this, then
 there will be no timeout.

RESPONSE.write

--RDM


___
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] What would *you* like to have in PropertyManager andfriends?

2001-05-29 Thread R. David Murray

On Tue, 29 May 2001, Chris Withers wrote:
  As for nicer interface... I guess you' ll have to elaborate a
  bit ;-)
 
 Well, I think it's manage_changeProperties (nasty name for starters) that
 deletes any property you don't include in its arguments, see the interfaces
 wiki for details.

Nope, that's manage_editProperties, and it's just that the values get
set to '', not that the property is deleted.  manage_editProperties
is suitable *only* to be called as the action of a web form that
edits all the properties.  Otherwise you want to use manage_changeProperties.

 How about just replacing it with:
 
 def modifyProperties(**kw)
 
 ...where kw is a dictionary mapping property name to property value. If it
 property specified in kw didn't exist, it would be created.

You can already pass manage_changeProperties a dictionary instead
of REQUEST, and you can also pass it keyword arguments in addition
or instead, which will cause the specified property values to get
set.

An interface for batch adding fields would be nice, but I would
not want automatic property creation in the modify method.

--RDM


___
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] Fwd: [Zope] ZCatalog + Directory product question

2001-05-21 Thread R. David Murray

On Thu, 17 May 2001, Casey Duncan wrote:
 You should create an instance method (It will need to be a Python
 script, DTML methods cannot be indexed)to return the result of the value

To my understanding, this is not true.  DTML Methods *can* be indexed,
they just can't make use of REQUEST in whatever processing they do.
However, I can't think of a good reason to use a DTML Method as a
Catalog index.

--RDM


___
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] New IOBTrees have no 'map' method

2001-05-11 Thread R. David Murray

On Fri, 11 May 2001, Chris Withers wrote:
  Probably not appreciably... unless it is, of course. ;-)  It depends how
  many things you're iterating over. 
 
 Hehe, I'll leave it then, unless someone complains abotu Squishdot being dog
 slow...

If you haven't already read it, you might be interested in this article:

http://www.python.org/doc/essays/list2str.html

--RDM


___
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] New IOBTrees have no 'map' method

2001-05-07 Thread R. David Murray

On Tue, 8 May 2001, Chris Withers wrote:
 Chris McDonough wrote:
  Have you read the Interfaces.py file in the BTrees directory?
 
 I have now, and to be honest, it didn't mean a lot to me :-(
 
 Sorry, it's late here, what am I missing?

My guess, after searching for the keyword 'map' and finding an
interface that calls for the implementation of __getitem__ and says
this allows 'for' loops and 'map' iterations, is that you can just
drop the call to the .map method and use the IOBtree directly as
the argument to the map function.  But in the absence of real
knowledge about what the .map method of the old IOBTree does, that
is just a guess.

--RDM


___
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] ZCatalog comments

2001-04-30 Thread R. David Murray

On Fri, 27 Apr 2001, Chris Withers wrote:
 Wildcards? Hmmm... that's enticing, where and how will they be supported? 

Wildcards are supported (and have been for a while) in text index searches
if you specify a globbing vocabulary at Catalog creation time.

--RDM



___
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] how to add to the pythonscript allowed import list?

2001-04-19 Thread R. David Murray

I've got a little Product that does some init hacks.  One of the
things I want to do is expose a couple of python fuctions such that
they can be imported into pythonscripts.  After much spelunking in
the mailing list and the PythonMethods wiki on zope.org, I *think*
that what I need to do is something like this:

--
from AccessControl import ModuleSecurityInfo

security = ModuleSecurityInfo()

security.declarePublic('SignedEditions')
security.declarePublic('stripCardNum','verifyCardNumber')
from cccheck import stripCardNum, verifyCardNumber

security.apply(globals())
--

Now, that SignedEditions one is my attempt to solve the following
error message when I attempt to do 'from SignedEditions import stripCardNum':

Error Type: ImportError
Error Value: import of "SignedEditions" is unauthorized

However, it does not solve the problem.

Hmm.  I just noticed that I forgot to prefix that with "Products.".
Which would seem to make that error message a bug, since SignedEditions
shouldn't exist in the import path.  If I do

from Products.SignedEditions import stripCardNum

then ZDebug tells me:

Unauthorized: Access denied for lt;module 'Products.SignedEditions' from 
'/usr/local/zope/sites/signededitions/Products/SignedEditions/__init__.py'gt; because 
its container, lt;module 'Products' from 
'/usr/local/zope/Zope231b1/lib/python/Products/__init__.pyc'gt;, has no security 
assertions.

What do I need to do to assert that it is OK to import from the
SignedEditions product? The wiki does not seem to address this
question at all, though it implies that it is possible, since it
*does* talk about the above assertions to declare things *inside*
the product as importable.

(Oh, BTW, I tried changing 'security' to "ZopeSecurity", but that didn't
seem to change the behavior).

--RDM


___
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] how to add to the pythonscript allowed import list?

2001-04-19 Thread R. David Murray

On Thu, 19 Apr 2001, Chris McDonough wrote:
 http://www.zope.org/Documentation/ZDG/Security.dtml (see Using
 ModuleSecurityInfo Objects)
 
 I think it will be something along the lines of:
 
 from AccessControl import ModuleSecurityInfo
 ModuleSecurityInfo('Products').declarePublic('SignedEditions')
 ModuleSecurityInfo('Products.SignedEditions').declarePublic('stripCardNumber
 ', 'verifyCardNumber')

Thanks, that worked!

I'm going to file a collector report on that misleading error message.

Also, I did read stuff very similar to the text you pointed me to above,
in the PythonMethods wiki.  Clearly, it did *not* tell me as a developer
how to do what the text is saying it is telling me how to do: make it
so I can import a function in a pythonscript.  So I think you should
add a note about the need for the ModuleSecurityInfo('Products').declarePublic
call, and incorporate it into the example (or another example).

Also, the text makes a distinction between marking "external" modules
and marking "embedded" modules.  The former uses the spelling above,
the latter the "security = ModuleSecurityInfo()" spelling.  As far as
I can see, what I am doing is the *latter* case, and what I tried
naively following the directions did not work, but this external
spelling did.  So something needs to be clarified there, as well.

I've filed this as a tracker comment on the ZDG, as well.

--RDM


___
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 checkin?

2001-04-16 Thread R. David Murray

On Mon, 16 Apr 2001, Andy McKay wrote:
 I suppose, its just not really a bug and I've always thought of the
 collector as bug db.

One of the options when you submit is "feature request w/patch".
So the "bug collector" probably needs a name change...

On the other hand, we all know about the slippery distinction between
a "bug" and a "feature" grin.

--RDM


___
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] un-own an object

2001-04-12 Thread R. David Murray

On Thu, 12 Apr 2001, Tim McLaughlin wrote:
 Ok, so imagine a DTML method has an owner, and as the docs say the method
 can do no more than the authenticated user and the owner's permissions
 combined.  So, now delete the owner.

No, it is the *intersection* of the two ownership sets, not the union
("combined").

 The DTML method will no longer be functional, since the owner does not
 exist, and has no permissions.  I found this to be true with ZClass

Not quite.  It will execute as if it were owned by nobody (the anonymous
user).  So it has very minimal privileges.

 constructors at least.  I believe that the method should take the
 permissions of the authenticated_user only in this scenario, but it does
 not.

Like I said (and the docs say), it is the interesection of the two
sets of privileges, so it is effectively just the permissions of
user nobody.

--RDM


___
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] DTMLOverride

2001-04-08 Thread R. David Murray

I came across a need to modify a couple DTML Methods of a Product I was
using.  (It's my own product, but ignore that for now grin).  I didn't
want to modify the code of the product, because then I'd loose changes
if I upgraded the product.  First I just wrote a little product whose
init method went in an repointed the appropriate methods to new DTMLFile
objects.  But that doesn't work with Refresh.  So instead I wrote
a little product that modifies the __init__ method of ClassicHTMLFile
to check a configuration file to see if there is an alternate source
specified.

This is a proof-of-concept thing, as I'm not sure how useful such
a facility is (I have a use for it in mind with regards to EMarket,
but I haven't tried it out yet to see if it's really a good way to
reach my goal there).  So comments of the type: "cool idea",
"terrible idea" (and why), are welcome.

The product is at http://www.zope.org/Members/rdmurray/DTMLOverride

--RDM


___
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] Medusa and HTTP/1.1

2001-03-31 Thread R. David Murray

On Fri, 30 Mar 2001, Dieter Maurer wrote:
 This can be quite tricky, as it is not obvious at all what are the
 components of a page.

You can also fairly easily envision a case where none of the elements
of a page has changed, but the content of the page itself is
different from the last time that URL was requested.

In other words, it is not at all obvious what the Last Modified date
of a page generated by DTML is, other than 'now'.

--RDM


___
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] FTP interface being worked on?

2001-03-27 Thread R. David Murray

On 26 Mar 2001, Karl Anderson wrote:
 Is there a particular set of tools or editing paradigms that we have
 in mind when we say that a non-XML representation is suited for client
 side tools?

I think the prime current example of this is the way you can use
any text editor to edit the serialized format of a pythonscript:
metadata is included in the serialized format as header lines.
The fact that this is *very* pythonscript specific is the motivation
for a class-implemented serialization format, IMO.  When possible,
the metadata *ought* to go in the same file as the body, simply
because it makes the human edit cycle more convenient/faster, thus raising
productivity.  Again, I'm focusing on "editing via arbitrary external
text editing tools" here, and not CVS, but if the conversion is
invariant, it works for CVS too.

--RDM


___
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] Deleting objects by the users

2001-03-22 Thread R. David Murray

On Thu, 22 Mar 2001, Rik Hoekstra wrote:
 one small correction: 
 
 the line:
  dtml-call expr="manage_delObjects(getId())"
 should read:
  dtml-call expr="manage_delObjects([getId(),])"
 
 as the manage_delObjects takes a list as argument

Well, but the other would work, since the first line of manage_delObjects is:

if type(ids) is type(''): ids=[ids]

I can't decide whether I think that's a good thing or not wry grin.

--RDM


___
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] Comment on CVS change of default textindex search operator

2001-03-21 Thread R. David Murray

On Tue, 20 Mar 2001, Casey Duncan wrote:
  It's so broken with OR for large datasets that the search results are
  virtually meaningless.  We see this first-hand on Zope.org (which is now
  ANDed after an upgrade) and in most of our consulting projects.
  
  I strongly agree that there should be an easy way to switch textindex
  default queries between OR and AND on a per-index basis.
  
 
 I'd even be happy with a per catalog basis.

Likewise.  But this is the can of worms I alluded to.  Another
approach would be to allow the default operator to be specified at
query time grin.

My main concern, though, is having a major behavior change happen
with a release upgrade.  I think this is OK as long as it is clearly
documented and there is a way to get the old behavior back; in
which case a per-catalog setting is sufficient.

Whether the default should be AND or OR is still a point of debate, though,
and one I have no clue how to resolve.

--RDM


___
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: Subject: Re: [Zope-dev] Comment on CVS change

2001-03-21 Thread R. David Murray

On Wed, 21 Mar 2001, Tres Seaver wrote:
 Given that any site manager can override the policy trivially, using
 only two lines of DTML, should we really be switching the (admittedly
 arbitrary) existing polciy embedded in the core?
[...
   dtml-let search_terms="_.string.split( search_text )"
 search_with_and="_.string.join( search_terms, ' and ' )"
dtml-var searchCatalog
   /dtml-let
 
 OK, so it is two and a half lines.

Well, actually it's a *lot* more than that, unless you have both
a regular search and an 'advanced search' box.  Consider what happens
if the user enters the following search string:

foo or bar

The code above produces the search "foo and or and bar".  I'm actally
not sure what Catalog will do with that, but I doubt it is what the
searcher intended.

Even if you have regular and advanced search boxes, having the default
operator in one be the opposite of the default operator in the other
would be a bad thing from a user interface design standpoint, IMO.

Making the default operator settable strikes me as simpler/better
design than writing a method that will do the transformation
correctly, since the latter basically requries duplicating the top
level of the text index search input parser.

--RDM


___
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] Comment on CVS change of default textindex search operator

2001-03-20 Thread R. David Murray

To: [EMAIL PROTECTED]
Date: Mon, 19 Mar 2001 19:47:31 -0500 (EST)
From: [EMAIL PROTECTED] (Chris McDonough)
Subject: [Zope-Checkins] CVS: Zope2  - UnTextIndex.py:1.33.2.9

Update of /cvs-repository/Zope2/lib/python/SearchIndex
In directory korak:/home/chrism/sandboxes/2_3Branch/lib/python/SearchIndex

Modified Files:
  Tag: zope-2_3-branch
   UnTextIndex.py 
Log Message:
Changed default query operator to 'AND' instead of 'OR' (way improved search results).


This strikes me as a Very Bad Thing.  Not the idea of having AND be the
default query operator, but the fact of *changing* the default.  If I
remember correctly the default is documented (insofar as it is documented)
as being AND, but the default has been OR for so long that I'm sure there
are many sites that will break if this change is committed to a release.
Worse, the behavior of a site as seen by end users will change.  Finally,
it is my experience that most search engines use OR as the default operator.
I prefer AND myself, but OR appears to be something of a defacto standard.

I'm willing to be convinced, though grin.

A way to set the default would be cool, but might open up a can of worms.

--RDM


___
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] FTP interface being worked on?

2001-03-20 Thread R. David Murray

On Mon, 19 Mar 2001, John D. Heintz wrote:
 I'm not sure that in the most general case this would solve the problem 
 either.  :-(  How do we know when the value (or rather the change in 
 value) of a property for some Zope object should trigger some method? 

This is a definate advantage of having the class of the object implement
(have the opportunity to implement) the read/write interface.  It can
do whatever needs to be done at write time.

This applies most clearly if you are talking about an edit cycle
using an external editor.  When the new version is committed back,
whatever triggered actions are necessary can be done.  But I think
it applies even if you are serializing a collection of objects,
editing them, and committing the collection back.  The complication
there is that the order in which the objects are committed can
affect the outcome.  However, the outcome is still self consistent.

Now, if you are talking about reconstructing a collection back to a
previous (CVS) version, things get more complicated.  I'm not
sure that one is solvable in the general case, other than by the
system that Zope itself uses (whole-db transaction based versions).

--RDM


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



Re: [Zope-dev] Adding a property to a batch of objects ?

2001-03-20 Thread R. David Murray

On Tue, 20 Mar 2001, Holger Lehmann wrote:
 I wanted to do sonething like this:
 dtml-in "objectIds(['DTML Document'])
 dtml-call manage_addProperty('foo','bar','string')
 /dtml-in
 
 But I am missing the  part :-(
 I can happily add the property to myself or the folder above (if a DTML
 Method is used) but I just cant seem to be able to add the property to an
 object I want.

I would have thought that this would work.

dtml-call "_.getitem('sequence-item',0).manage_addProperty('foo','bar','string')"

ought to.  Or, if they are zclass instances, 
.propertysheets.yoursheet.manage_addProperty...

Of course, I'm saying this without testing anything, so caveat emptor.

This would be a good thing to do in a pythonscript rather than a dtml method,
by the way.


--RDM


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



  1   2   3   >