Re: [Zope-dev] Two visions?

2006-03-06 Thread Jean Jordaan
> Or "Zed is the part of Zope that can be used without Zope".

Yes, it's always been the "Zed" Object Publishing Environment. Now
the "Zed" can get a job :-](I'm neutral regarding the suggestion.)

-- 
jean
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Where are all the good docs?

2004-07-20 Thread Jean Jordaan
Also have a look at:
  http://zopewiki.org/ZopeWiki
  http://zope.org/Members/ZQR/normal (aging but still useful)
--
Jean Jordaan
http://www.upfrontsystems.co.za
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: Unexpected Behaviour iterating over catalog search...

2004-03-08 Thread Jean Jordaan
Surely the thing returned by a Catalog search should be immutable?
Nope, it is "lazy";  immutability would require "realizing" it first, 
which would be prohibitively expensive in many cases.
Yes .. thing is, wrapping with list() or tuple() will therefore
also be prohibitive in those cases, so can't be done routinely.
In those cases, what would be better? Something like
for brain in Catalog(some_index=some_value):
# delete the object, and then
brain_to_delete = Catalog(unique_index=brain.unique_prop)
Catalog.uncatalog_object(brain_to_delete.getPath())
.. can't really think why that would work if Chris's original
doesn't, though.
--
Jean Jordaan
http://www.upfrontsystems.co.za
/courses.html<-- Zope/Plone training!
   /kursusse.html
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Environment for Python Development

2003-12-12 Thread Jean Jordaan
Hello. Do any of you know of an IDE(preferably open source) that I can use
to develop/debug/test python code in? Thanks.
Don't forget Boa Constructor:
  http://boa-constructor.sourceforge.net/
--
Jean Jordaan
http://www.upfrontsystems.co.za
___
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] xron does not work with python 2.2

2003-09-23 Thread Jean Jordaan
it seams that the Product XRON does not work with python 2.2.
Perhaps you should be thankful .. We tried to use xron a year
or so ago, and it bit us repeatedly. We dropped it and use
cron to tickle a Zope URL or to call an external method. For
those, see:
http://mail.zope.org/pipermail/zope/2003-February/131882.html
http://article.gmane.org/gmane.comp.web.zope.plone.user/2490
--
Jean Jordaan
http://www.upfrontsystems.co.za
___
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] Announce: new www.zope.org is LIVE!

2003-08-06 Thread Jean Jordaan
Yay :)  I'm sure this ushers in a new era of Zope UI
respectability ;>
So, sorry to start with the quibbles already, but ..
 Too many pages are way too wide
 http://collector.zope.org/ZopeOrg/106
This has always bugged me about Plone too.
It seems like every second page is way wider than
my browser window. This is partly the result of long
 lines, which is made worse by the fact that
the content area is a table cell .. this means that
the longest  line sets the width of all the text.
It would be much better if only the too-long lines
extended off the side of the screen, and the other
lines wrapped. IMHO this consequence of the table-
based layout is a major downer :/
The table on a member's page (eg.
http://zope.org/Members/jens/view ) also gets much too
wide very easily.
I like to bump up the text size to 120% or so for easy
reading on my laptop, and on new zope.org I can't,
unless I want to scroll horizontally a lot.
--
Jean Jordaan
http://www.upfrontsystems.co.za
___
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] Mailinglists

2003-08-04 Thread Jean Jordaan
I fixed all lists this morning.
Dunno if this is related, but they're still AWOL from
  http://mail.zope.org/mailman/listinfo .. (only shows 6 lists now).
--
Jean Jordaan
http://www.upfrontsystems.co.za
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.python.org/mailman/listinfo/zope-announce
http://mail.python.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: TALES idea: tuple unpacking

2003-07-29 Thread Jean Jordaan
If DTML used TALES expressions, it would be just as clean as ZPT.
With the one caveat that ZPTs are valid XHTML, while DTML methods needn't
balance tags and needn't mark empty tags as such (i.e. "",
instead of ""). DTML tags can straddle HTML tags in
completely non-XML ways: ""; limiting the
tools that may work with DTML..
The "MTOWTDI" pseudo-entity &dtml-dict.key; alternate syntax might also
count against cleanliness.
That said, I agree that using TALES would be a big win. We try to use it
wherever we can! (Not only in ZPTs :)
j

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


Re: [Zope-dev] Re: TALES idea: tuple unpacking

2003-07-24 Thread Jean Jordaan
I only use 2 because it's there :-)  Thinking more about it, it
occurs to me that python expressions in TALES provide a huge hole
in the separation of presentation from logic. 
Perhaps it's worthwhile for this thread to have a look at 
http://www.eby-sarna.com/pipermail/transwarp/2003-July/000606.html
http://www.eby-sarna.com/pipermail/transwarp/2003-July/000607.html
and following to see what Phillip Eby is cooking up. 

The templates he proposes have only two or three attributes, 
keeping logic rigorously out of the template.

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


Re: [Zope-dev] Re: TALES idea: tuple unpacking

2003-07-23 Thread Jean Jordaan
int:-- Look up an item by index
Hate this.  Looks like a typecast of some kind, int is way to overused
Aesthetically, I also find it ugly. The attractiveness of a *path* 
expression lies in its resemblance to a *path*. 

But I realise it's like the weird ++elements in Zope3 paths that
I hope never to need to deal with but will have to swallow sometime
willy nilly, and that no-one could think of anything better in that
case :|
--
Jean Jordaan
http://www.upfrontsystems.co.za
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: TALES idea: tuple unpacking

2003-07-23 Thread Jean Jordaan
It is absolutely amazing how slippery this stuff is to pin down.
The same ideas keep popping up and then slowly subsiding under 
the weight of exceptions, prefixes and caveats. 

I kinda suspect the only way is to deliver a specific take on
the whole thing, like Evan did with the current ZPT, and to see 
how that pans out, instead of teasing the current ZPT to creep 
after features.

That said (he continues blithely), the one bit about the current
one that bugs me is the behaviour of callables in path expressions.
This is the one I like::
 tal:define="value here/func/dict-returned-by-func/key"
 tal:define="value here/obj/method/returned-dict/key"
 tal:define="value here/dict/key/obj-stored-under-key/method"
That's the one with the downer that func can't get parameters. 
I'm totally fine with that. For parameters:: 

 tal:define="dict python:here.func('parameter'); 
 value dict/key"

--
Jean Jordaan
http://www.upfrontsystems.co.za
___
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] TALES idea: tuple unpacking

2003-07-23 Thread Jean Jordaan
Say a method listFilesByUser returns a list of (user, [files]) it'd be nice to 
be able to::

   tal:repeat="user,files here/listFilesByUser"

or similar. Currently we would have to use a python: expression to manually 
unpack the tuple. Kinda yucky.
yeah, or make listFilesByUser return {'username': user, 'files': files} and::

 
   
 
also not ideal. I think the format in your example works well.

--
Jean Jordaan
http://www.upfrontsystems.co.za
___
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] registerClass ignoring permissions defined in the class?

2003-07-18 Thread Jean Jordaan
Hi all 

For the second time in a couple of months, I found myself 
wrestling with security on FSPythonScripts (and eventually
thinking hell with it, and just moving the functionality 
to a class method). Anyway, I found this, which looks like
an inconsistency between docs and implementation:

In ProductContext.registerClass the docstring says:

   permissions -- Additional permissions to be registered
  If not provided, then permissions defined in the
  class will be registered.
However, registerClass only handles permissions that are 
passed in:

   if permissions:

It doesn't look at permissions defined in the class at all. Am
I missing something?
The reason I thought this matters is that this works fine in a
CMF .metadata file:
"""
[security]
View=1:Anonymous
"""
but this doesn't:

"""
[security]
Use LDAPService=1:Anonymous
"""
AccessControl.Role.manage_permission complains: 
"Invalid Permission: The permission Use LDAPService is invalid."
The permission does, however, show up on the ZMI security tab, 
and if I set it for Anonymous on a parent of the script, the script 
executes fine.

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


Re: [Zope-dev] ZCatalog Indexes tab crawl reason confirmed

2003-07-17 Thread Jean Jordaan
so... would anyone mind?
Well, I've often been interested to note the numbers. It gave me
a feeling for which indexes are heavily used. Sure, I could figure
this out without looking at this page, but the (lack of) speed 
hasn't bugged me .. 

--
Jean Jordaan
http://www.upfrontsystems.co.za
___
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: FHS, zopectl, #925, Re: [Zope-dev] 2.7 installation

2003-06-20 Thread Jean Jordaan
I think the default Zope install should not have dependencies other
than that Python is required and the user has some shell system
(bash/sh/MS batchfiles).
... and aap apparently ;)
I'm thinking that ZC needs a more capable make replacement. That
isn't quite the topic of this thread, but Aap (eg.) would be cool
already if it was just used by ZC to manage their checkout/builds,
and was available as option for outsiders to use. The releases
needn't have a new dependency.
It's based on the winning design for 
software construction tools (ie. "make" replacement) in the Software 
Carpentry contest 
Yes, like Roundup :)

It's certainly been around for longer than aap :)
I'd bet that Bram has been brooding on Aap for a long time, and he
certainly has masses of experience managing complex build environments,
with Vim compiling on about a million architectures with or without
myriads of compilation options, language bindings, GUI toolkits, etc.
, and is more stable than 0.14 alpha
I note with a grin that up until this month aap was at release 0.150 :)
That's the hundred and fiftieth release, ne :)

--
Jean Jordaan (using WindowMaker 0.80.2)
http://www.upfrontsystems.co.za
___
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: FHS, zopectl, #925, Re: [Zope-dev] 2.7 installation

2003-06-20 Thread Jean Jordaan
It *sounds* like it's being suggested that we replace "make" 
That's correct, though Aap can usefully do much more than make,
such as fetching remote sources and managing CVS checkouts/-ins.
Has anyone used SCons? http://www.scons.org/
Well, they feature neck-and-neck in July, so if someone (or
someone someone knows) is around there, they could compare and
ask pointed questions:
2003 May 15: BOF session at O'Reilly conference
The proposal to organize a BOF session on A-A-P has been accepted. It 
will take place on Thursday evening July 10, from 8 to 9 pm. This is 
directly after the BOF session on SCons, in the same room. A nice 
occasion for people to talk about modern building tools! More 
information about the conference here.
(links at http://www.a-a-p.org/index.html )

--
Jean Jordaan
http://www.upfrontsystems.co.za
___
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: FHS, zopectl, #925, Re: [Zope-dev] 2.7 installation

2003-06-19 Thread Jean Jordaan
There's only one possible way! A-A-P! (A good match for Ape, Shane ;)
It's a replacement for make by Bram Moolenaar, the author of Vim, and
it looks like it does a lot of things Right.
http://www.a-a-p.org/index.html

In fact, Aap would fit very well with Gentoo. Gentoo's emerge system
takes care of package metadata, fetching the source, and unpacking
it. Once it's unpacked, it gets compiled, usually with the standard
.configure; make; make install steps. Individual packages could use
aap instead of make. Actually, Aap also takes care of the fetching
phase. Then Gentoo installs the compiled package, keeping track of
what files went where, so that they can be uninstalled, and queried
for what package they belong to. This Aap doesn't do, AFAIK.
--
Jean Jordaan
http://www.upfrontsystems.co.za
___
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] The Return of the Son of Session Errors, redux

2003-05-29 Thread Jean Jordaan
Hi Chris

I just checked in a change that disables the "low conflict connection"
feature of temporary storage.
We've patched, and so far it looks good. We've seen one KeyError,
but that was after leaving the session to expire. Will 2.6.2 get
the patch?
Thanks!
--
Jean Jordaan
http://www.upfrontsystems.co.za
___
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] The Return of the Son of Session Errors, redux

2003-05-29 Thread Jean Jordaan
Dieter Maurer wrote:
What have session errors to do with XMLWidgets?
XMLWidgets stores the state of the document that you're editing
in the session. We don't want to hack and fork XMLWidgets, so
we're not in a position to change the way it uses the session.
--
Jean Jordaan
http://www.upfrontsystems.co.za
___
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] The Return of the Son of Session Errors, redux

2003-05-28 Thread Jean Jordaan
Our errors are triggered in the bowels of XMLWidgets, so I don't
think 1) is a simple solution, and we don't want to do 2) if we
Err, swap 1) and 2) .. that'll teach me to use gratuitous lists :/

--
Jean Jordaan
http://www.upfrontsystems.co.za
___
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] The Return of the Son of Session Errors, redux

2003-05-28 Thread Jean Jordaan
Hi all

We're being chowed heavily by the KeyError discussed from the
13th to the 18th March in this thread:
  http://mail.zope.org/pipermail/zope-dev/2003-March/019081.html
Has there been any definite resolution of that issue? We're running
Zope 2.6.1, has the issue gone away on Zope 2.6.2?
In that thread a patch to TemporaryFolder.py was suggested
to deal with ReadConflictErrors, but we don't get those. The
suggestions regarding the KeyErrors was:
 1) to move to a different storage, such as BerkeleyStorage or
DirectoryStorage, for the session data, or
 2) to "touch the objects that are likely to change early in the
transaction." (Toby Dickenson).
Our errors are triggered in the bowels of XMLWidgets, so I don't
think 1) is a simple solution, and we don't want to do 2) if we
can avoid it. Have specific alternative session storages been
found to be free of this issue?
The initial report has been logged as a 'critical' error as
  http://collector.zope.org/Zope/848
but it's still Pending.
--
Jean Jordaan
http://www.upfrontsystems.co.za
___
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] Trying to understand the nuances of a VerboseSecurityreport ..

2003-03-04 Thread Jean Jordaan
Notice that the closing square bracket is not 
present, and something printed three asterisks.  
Myeah, 'grep -r "\*\*\*" *' in the Zope 2.5.1 source and
instance Products directories doesn't turn up any AttributeError
line ..
> I don't know what code would do that... perhaps Python 1.5.2?

It's running: python2.1 -V
Python 2.1.3
[EMAIL PROTECTED] creme.jean-ZopeTestCase-branch $ cat start
#! /bin/sh
PYTHON=/usr/bin/python2.1
ZOPE_BASE=/usr/local/zope/2-5-1
ZOPE_SECURITY_POLICY=PYTHON
reldir=`dirname $0`
INSTANCE_HOME=`cd $reldir; pwd`
export INSTANCE_HOME ZOPE_SECURITY_POLICY

exec $PYTHON $ZOPE_BASE/z2.py \
-D -X -w 17085 -W 17805 \
-u jean >> $INSTANCE_HOME/var/z2.log 2>&1 &
--
Jean Jordaan
http://www.upfrontsystems.co.za
___
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] Trying to understand the nuances of a VerboseSecurityreport ..

2003-03-04 Thread Jean Jordaan
In case it's relevant, the Folder at the bottom of the aq_chain
for license is a ZUnit temporary folder:
(116)doRemindersForLicense()
(Pdb) license.aq_chain
[, , 
, , *** 
AttributeError: testsRun
(Pdb) license.aq_chain[3].__dict__
{'title': '', 'id': 
'00022_Products.CremeTests.LicenseTests.LicenseTests.testAddFekoDongleLicense', 
'__ac_local_roles__': {'jean': ['Owner']}}

The two Specialists are just part of our app:
/Licenses/LicenseDocs
--
Jean Jordaan
http://www.upfrontsystems.co.za
___
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] Trying to understand the nuances of a VerboseSecurityreport ..

2003-03-04 Thread Jean Jordaan
Hi Shane, Toby ..

Set Tardis for
http://mail.zope.org/pipermail/zope-dev/2003-February/018837.html
All I can think is that that object 'basic' lacks context for
some reason (i.e. lacks an acquisition wrapper?). I can't think
why it lacks context .. we use that idiom all over the app, and
don't normally get any problems.
That's all I can think of also.  Try examining basic.aq_chain.
It looks like bad interaction with ZUnit:

(Pdb) license.propertysheets.basic

(Pdb) license.propertysheets.basic.aq_chain
[, , , , , , *** AttributeError: testsRun

'testsRun' is an attribute that is set in ZUnit.TestMonitor
I'm poking about in ZUnit now .. benightedly ..
Here is the code context in which the above obtains::

# Create a new reminder and reference it from the License
reminder = container.addInstance(no_redir=1)
import pdb; pdb.set_trace() #DBG We are here. This fails:
license.propertysheets.basic.manage_changeProperties(
   {reminder_id_property: reminder.id})
That is in a Script (Python). The 'license' instance was
created in the calling Script (Python), and passed in as parameter.
Calling sequence:
  addLicenses (called from a ZUnitExternal test suite) ->
  addLicense (creates license instance) ->
  doRemindersForLicense(license) (creates reminder instance;
 calls license.propertysheets.basic.manage_changeProperties)
Perhaps interestingly, reminder and AUTHENTICATED_USER seem to be
OK, and license and context do not:
(Pdb) reminder.aq_chain
[, , 
, ]
(Pdb) license.aq_chain
[, , 
, , *** 
AttributeError: testsRun
(Pdb) context.aq_chain
[, , 
, , *** 
AttributeError: testsRun
(Pdb) context.REQUEST.AUTHENTICATED_USER.aq_chain
[jean, , , ]

--
Jean Jordaan
http://www.upfrontsystems.co.za
___
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] Index errors revisited: KeywordIndex unindex_objectcould not remove documentId -883140122 from index ComponentVersions. Thisshould not happen.

2003-02-28 Thread Jean Jordaan
Yo Chris

> If not, please file a collector issue when you have a patch and I'll
> make sure it's applied on the 2.6 branch as well as the HEAD.
http://collector.zope.org/Zope/828

--
Jean Jordaan
http://www.upfrontsystems.co.za
___
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] Index errors revisited: KeywordIndex unindex_objectcould not remove documentId -883140122 from index ComponentVersions. Thisshould not happen.

2003-02-27 Thread Jean Jordaan
Dieter:
The reason is very simple:
Indeed! You make it clear as day :)

The fix: fix "KeywordIndex" such that is removes duplicates
  from "_unindex[documentId]".
We're looking to see if we can fix it for us ..

--
Jean Jordaan
http://www.upfrontsystems.co.za
___
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] Index errors revisited: KeywordIndex unindex_object could not removedocumentId -883140122 from index ComponentVersions. This should not happen.

2003-02-27 Thread Jean Jordaan
Hi all

We've posted about this before, but never managed to pin down
the issue nicely. It doesn't interfere with our application,
as far as we could tell, so we've let it slide. Here's another
attempt at formulating the problem.
We run a script which iterates over 719  instances.
For each instance, either one or two  instances
are created and edited. The script completes, logging all the way:
2003-02-27T09:43:44 INFO(0) MyDebugLog
recreate_reminders> INFO: creating reminders for License_99
Then, Zope starts spitting out 657 errors like the following:

2003-02-27T09:43:49 ERROR(200) KeywordIndex unindex_object could not 
remove documentId -883140119 from index ComponentVersions.  This should 
not happen.
Traceback (innermost last):
  File 
/usr/local/zope/2-5-1/lib/python/Products/PluginIndexes/common/UnIndex.py, 
line 168, in removeForwardIndexEntry
(Object: ComponentVersions)
KeyError: -883140119

Most of these errors are identical. There are 172 unique errors,
the rest are all retries. The 172 keys are not in the catalog.
The only indexes involved are ComponentVersions and NodeNames,
both 'lines' properties of .
Does anyone know how to cause this, so that I can stop doing it?
I'm trying to narrow it down again ..
 (Zope 2.5.1 (source release, python 2.1, linux2), python 2.1.3, linux2)

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


Re: [Zope-dev] How to trigger Zope externally (mail)

2003-02-27 Thread Jean Jordaan
I can't remember where I cribbed from ;]
Remembered:
  http://www.zope.org/Members/phd/cron-zope/pack-db_fs/view
--
Jean Jordaan
http://www.upfrontsystems.co.za
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] How to trigger Zope externally (mail)

2003-02-27 Thread Jean Jordaan
Andy McKay wrote:
Or just write a simple HTTP post using Python. Have a look around for 
the MailIn Product, or CMFMailIn which does this very simply and works 
fine for low volume traffic (eg: fine listening to [EMAIL PROTECTED]).
Here's a very simple example that we're using to glue cron to
Zope. It does a GET, but you could just as easily make it do a POST.
I can't remember where I cribbed from ;]
--
Jean Jordaan
http://www.upfrontsystems.co.za
#!/usr/bin/python

username="user"
password="secret" # this is only example, of course
zope="http://localhost:17081";

import sys, urllib

class NoGUI_URLopener(urllib.FancyURLopener):

   def __init__(self, username, password, *args):
  apply(urllib.FancyURLopener.__init__, (self,) + args)

  self.username = username
  self.password = password
  self.asked = 0


   def prompt_user_passwd(self, host, realm):
  if self.asked:
 raise "Unauthorised"
  else:
 self.asked = 1
 return self.username, self.password



urllib._urlopener = NoGUI_URLopener(username, password)
urllib.urlretrieve("%s/cron_hook" % zope )


[Zope-dev] ZLDAP and replication

2003-02-25 Thread Jean Jordaan
Hi Jeffrey & all

I'd just like to check something ..

When running LDAP in a master/slave setup, if a client of the
slave tries to update the directory, the slave returns a referral
(pointing at the master) to the client, and the client has to
retry the update at the master. That's steps 3 and 4 in this
diagram:
http://www.openldap.org/doc/admin20/guide.html#Replicated%20Directory%20Service

It doesn't look like ZLDAPConnection does this, or am I being
obtuse?
--
Jean Jordaan
http://www.upfrontsystems.co.za
___
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] Offtopic: it's vs. its

2003-02-25 Thread Jean Jordaan
> I'm sorry to bring forward the topic of grammar,

I, for one, think that proper grammar in checkins, source code
and wikis is wonderful, and beneficial in the same way as syntax
highlighting in editors.
While reading Zope source in the past, I have, a couple of times,
made diffs fixing niggly grammatical issues (I can be compulsive
that way .. ) but have always refrained from submitting them as
issues, because I was afraid they'd be considered noise. Is this
a justified fear?
--
Jean Jordaan
http://www.upfrontsystems.co.za
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: RDF Musings and TinyTables

2003-02-21 Thread Jean Jordaan
Just a link:

> - RDF is hard to read,

http://brownsauce.sourceforge.net/

--
Jean Jordaan
http://www.upfrontsystems.co.za


___
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] Trying to understand the nuances of a VerboseSecurity report ..

2003-02-20 Thread Jean Jordaan
Hi all (and Shane in particular :)

I'm triggering this error:

  Unauthorized: The owner of the executing script is defined
  outside the context of the object being accessed.  Access to
  'basic' of (License_PropertySheetsClass instance at e204528)
  denied. Access requires Access_contents_information_Permission,
  granted to the following roles: ['Administrator', 'Manager',
  'Owner', 'Supporter']. The executing script is (PythonScript
  instance at e208eb8), owned by jean.

I can't understand why .. there is exactly one acl_users in this
Zope instance, in the root, where user 'jean' is defined. The
whole application normally works fine. Currently, the error is
being triggered by a ZUnit unit test. All the other unit tests
(adding, editing and deleting instances of various kinds) works
fine. The code where the error is occuring is this:

"""
# Create a new License instance and grab its propertysheet
license_id  = context.ObjectCounters.newID('License')
new_license = container.newItem(license_id)
new_license_propertysheet = new_license.propertysheets.basic
"""

All I can think is that that object 'basic' lacks context for
some reason (i.e. lacks an acquisition wrapper?). I can't think
why it lacks context .. we use that idiom all over the app, and
don't normally get any problems.

I'm trying to see if reading VerboseSecurity's source will
help, but all I've found so far is a suspect double negation:

"""
def userHasRolesButNotInContext(user, object, object_roles):
'''Returns 1 if the user has any of the listed roles but
is not defined in a context which is not an ancestor of object.
'''
"""

Surely either one of those 'not's should go?

--
Jean Jordaan
http://www.upfrontsystems.co.za


___
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] ExternalEditor losing its lock?

2003-02-04 Thread Jean Jordaan
Hi all

A couple of times now, I've noticed this:

 - I open a Python Script using ExternalEditor. A GET is issued,
   My editor starts up, and a LOCK gets set.

 - Now I view and execute the script (more GETs) while editing
   and saving in my editor (PUTs get issued).

 - That's fine. But then the lock goes away, and I successfully
   edit the script in the ZMI: a POST goes thru. But there hasn't
   been any UNLOCK yet. This shouldn't happen, right?

(Zope 2.5.1 (source release, python 2.1, linux2), python 2.1.3, linux2)

Excerpt from Z2.log:

192.168.1.5 - jean [03/Feb/2003:18:25:38 +0200] "GET /externalEdit_/test 
HTTP/1.1" 200 1088 "http://blommie:17081/manage_main"; "Mozilla/5.0 (X11; 
U; Linux i686; en-US; rv:1.1) Gecko/20021212"
192.168.1.5 - jean [03/Feb/2003:18:25:40 +0200] "LOCK /test HTTP/1.1" 
200 789 "" "Zope External Editor/0.6"
192.168.1.5 - jean [03/Feb/2003:18:25:56 +0200] "PUT /test HTTP/1.1" 204 
251 "" "Zope External Editor/0.6"
192.168.1.5 - jean [03/Feb/2003:18:25:58 +0200] "GET 
/test/manage_workspace HTTP/1.1" 302 467 
"http://blommie:17081/manage_main"; "Mozilla/5.0 (X11; U; Linux i686; 
en-US; rv:1.1) Gecko/20021212"
192.168.1.5 - jean [04/Feb/2003:10:32:25 +0200] "PUT /test HTTP/1.1" 204 
251 "" "Zope External Editor/0.6"
192.168.1.5 - jean [04/Feb/2003:10:46:11 +0200] "POST /test HTTP/1.1" 
200 12877 "http://blommie:17081/test/ZPythonScriptHTML_editForm"; 
"Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20021212"
192.168.1.5 - jean [04/Feb/2003:10:46:11 +0200] "GET 
/manage_page_style.css HTTP/1.1" 200 3014 "http://blommie:17081/test"; 
"Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20021212"
192.168.1.5 - jean [04/Feb/2003:10:46:16 +0200] "PUT /test HTTP/1.1" 204 
251 "" "Zope External Editor/0.6"
192.168.1.5 - jean [04/Feb/2003:10:46:18 +0200] "GET 
/test/manage_workspace HTTP/1.1" 302 467 "http://blommie:17081/test"; 
"Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20021212"

--
Jean Jordaan
http://www.upfrontsystems.co.za


___
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] How about some details about SGI's Supportfolio?

2003-01-27 Thread Jean Jordaan
A couple of Zope Announce's ago, our attention was drawn to
this press release:

  http://www.zope.com/News/PressReleases/SGI-2003-01-22

I was wondering if there are any stories behind that --- what
technologies were used, what problems there were, how many
people were involved in building it, what SGI's degree of
participation was in the design, whether SGI now has inhouse
Zope expertise with the ability to extend Supportfolio .. any
interesting bits that the community can learn from.

Actually, I'm not interested in Supportfolio exclusively ---
I'd appreciate any stories about significant Zope
implementations, if anyone has time to tell them, and is not
bound by confidentiality issues.

--
Jean Jordaan
http://www.upfrontsystems.co.za


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-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] http://cvs.zope.org/Products/Scheduler vs Xron forcron-like functionality. Advice?

2002-10-05 Thread Jean Jordaan

>  From the code it doesn't seem to do any strange things, but I would
> like to know if anybody has experience of using it in a production
> environment, 

We have seen the following happen a couple of times: we have Reminders,
subclassed from XronDTMLMethod. When a Reminder triggers, it sends
email (using MailHost). When this fails, Xron goes into a spin,
the Reminder retriggering forever, bloating Data.fs with a Gb or more
overnight. We've started looking at the code a couple of times, but
everything looked fine ..

-- 
Jean Jordaan
Upfront Systems http://www.upfrontsystems.co.za


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



Re: [Zope-dev] KeywordIndex errors: This should not happen.

2002-09-30 Thread Jean Jordaan

> It would be fine if we could get a reproducable testcase
> for this problem. 

Absolutely. When the error we see occurs, the RID that is looked for
has already gone missing. It looks like the real error happens silently
sometime before, and not in all cases: the majority of the instances of
the affected class are cataloged OK.

-- 
Jean Jordaan
Upfront Systems http://www.upfrontsystems.co.za


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



Re: [Zope-dev] KeywordIndex errors: This should not happen.

2002-09-30 Thread Jean Jordaan

>> Have you tried it in 2.6? 
> 
> Yeah, this'd be my suggestion having suffered more terminally from 
> exactly these bugs :-S

Hmm! That's interesting. I was worried that we might be causing it
by tickling the Catalog the wrong way .. Did you ever get to the
bottom of the bugs? Do they have collector issues, perhaps?

-- 
Jean Jordaan
Upfront Systems http://www.upfrontsystems.co.za


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



Re: [Zope-dev] KeywordIndex errors: This should not happen.

2002-09-30 Thread Jean Jordaan

> If you feel this is a bug, you should file a collector issue for it.

We don't have a deep enough understanding of the Catalog to diagnose :/
We're not sure if it's a Catalog issue, or something we're doing wrong;
i.e. we don't know how the Catalog gets into that state.

-- 
Jean Jordaan
Upfront Systems http://www.upfrontsystems.co.za



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-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] KeywordIndex errors: This should not happen.

2002-09-30 Thread Jean Jordaan

Hi all

Our app has been hitting these errors for months:

2002-09-30T11:06:27 ERROR(200) KeywordIndex unindex_object could not remove 
documentId -444153566 from index ComponentVersions.  This should not happen.
Traceback (innermost last):
   File 
/usr/local/zope/2-5-1/lib/python/Products/PluginIndexes/common/UnIndex.py, line 
168, in removeForwardIndexEntry
 (Object: ComponentVersions)
KeyError: -444153566

Here is the relevant piece Zope code::

 def removeForwardIndexEntry(self, entry, documentId):
 """Take the entry provided and remove any reference to documentId
 in its entry in the index."""
 global _marker
 indexRow = self._index.get(entry, _marker)
 if indexRow is not _marker:
 try:
 indexRow.remove(documentId)
 if not indexRow:
 del self._index[entry]
 try: self.__len__.change(-1)
 except AttributeError: pass # pre-BTrees-module instance
 except AttributeError:
 # index row is an int
 del self._index[entry]
 try: self.__len__.change(-1)
 except AttributeError: pass # pre-BTrees-module instance
 except:
 import pdb; pdb.set_trace() #DBG

I inserted that 'set_trace' just before the error is logged. At this
point, the app state looks like this::

 (Pdb) self
 
 (Pdb) p self.id
 'ComponentVersions'
 (Pdb) entry
 '44.131'
 (Pdb) p indexRow
 
 (Pdb) len(indexRow.keys())
 566
 (Pdb) indexRow.remove(documentId)
 *** KeyError: -444153566

 (Pdb) [self._index.keys()[n] for n in range(0,69)]
 ['', ' 2.13', '1', '1.14', '1.22', '1.25', '1.3', '1.6', '1.8.7',
 '1.9.8', '17.9', '2.0.6', '2.1', '2.15', '2.2.1', '2.2.3m', '2.2.7',
 '2.2.7m', '2.3.4m', '2.4', '2.4.2m', '2.4.3m', '2.4.4m', '2.4.5',
 '2.5', '2.6.6m', '2.7.7m', '2.8.5m', '2.8.6m', '2.8.7m', '2.9',
 '20.13-37', '22.13-42', '22.42-47', '22.5-42', '24.12-49',
 '24.13-49', '24.19-49', '4.4', '4.9', '40.54e', '41.184', '42.95',
 '43.11', '43.96', '43.96 ', '44.120', '44.131', '45.11', '7.3',
 '7.7', '8.0', '8.1', '8.2', '8.4', '8.4.1', '8.5.9', '8.7.2m',
 '8.7.6m', '8.8.9m', '8.9.6m', '8.9.7m', '9.0', '9.12', '9.2', '9.3',
 '9.4   ', '9.8', 'x']
 (Pdb) [indexRow.keys()[n] for n in range(0, len(indexRow.keys()))]
 [-1948802264, -1018656130, -444153568, -111852827, -32258423,
 -32258421, -32258398, -32258397, -32258396, 226891955, (and so on)

 (Pdb) catalog = self.restrictedTraverse('Catalog')
 (Pdb) catalog.getpath(-444153566)
 '/Licenses/LicenseDocs/License_377'
 (Pdb) catalog.getIndexDataForRID(-444153566)['ComponentVersions']
 ['2.4', '8.9.7m', '44.131', '44.131', '2.4.3m', '4.9', '9.12',
 '24.13-49', '1.25', '2.15', '9.3', '2.8.6m']

Rephrasing that, I'd say: we're trying to remove the RID -444153566
from the list returned by: indexRow.keys()['44.131']

That RID is absent from that list, which raises a KeyError that
"should not happen". There *is* an entry in the Catalog for that RID,
which *has* '44.131' in the list under the 'ComponentVersions' key in
the dict returned by getIndexDataForRID.

Did the RID get removed from the KeywordIndex list of RIDs prematurely?
Or did it never get inserted? Can anyone shed any enlightenment? Where
else should I be looking?

-- 
Jean Jordaan
Upfront Systems http://www.upfrontsystems.co.za



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-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] In 'unindex_object': path is an OOSet, not a string

2002-09-27 Thread Jean Jordaan

Hi Andreas

> please submit a collector issue 

Here you go http://collector.zope.org/Zope/594

> and if possible add a small unittest that reproduces the problem.

At the moment I don't know how to bring this about .. :/  I'll keep
looking for a small reproducible case.

-- 
Jean Jordaan
Upfront Systems http://www.upfrontsystems.co.za


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-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] In 'unindex_object': path is an OOSet, not a string

2002-09-27 Thread Jean Jordaan

Hi all

I'm getting an error when calling 'unindex_object'::

Error Type: AttributeError
Error Value: split

   File 
/usr/local/zope/2-5-1/lib/python/Products/PluginIndexes/PathIndex/PathIndex.py, 
line 151, in unindex_object
 (Object: path)

From
.../zope/2-5-1/lib/python/Products/PluginIndexes/PathIndex/PathIndex.py
::

 def unindex_object(self,documentId):
 """ hook for (Z)Catalog """

 if not self._unindex.has_key(documentId):
 return

 path = self._unindex[documentId]
 comps = path.split('/')

At the point when 'comps = path.split('/')' is called, the value of
'path' is: OOSet([('Reminders', 0)])

This does not look as though it was ever supposed to happen.

-- 
Jean Jordaan
Upfront Systems http://www.upfrontsystems.co.za



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



[Zope-dev] Is the aliasing of 'hasRole' correct?

2002-09-25 Thread Jean Jordaan

In AccessControl/User.py::

 def hasRole(self, *args, **kw):
 """hasRole is an alias for 'allowed' and has been deprecated.

 Code still using this method should convert to either 'has_role' or
 'allowed', depending on the intended behaviour.

 """
 import warnings
 warnings.warn('BasicUser.hasRole is deprecated, please use '
 'BasicUser.allowed instead; hasRole was an alias for allowed, but '
 'you may have ment to use has_role.', DeprecationWarning)
 self.allowed(*args, **kw)

Shouldn't that be::

 return self.allowed(*args, **kw)

?

-- 
Jean Jordaan
Upfront Systems http://www.upfrontsystems.co.za



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-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...

2002-08-30 Thread Jean Jordaan

[EMAIL PROTECTED] wrote:
> I have lots of scripts, dtml methods etc. everywhere which are
> perfectly well-known to the ZODB, nothing wrong with that, but which
> are simply not used by me anymore. No usage from other scripts nor
> methods nor documents. And these buggers I'd like to find.

They're impossible to find :))  Take for example the 'index_html' of
a folder: nothing else in my Zope app refers to it. But whenever
someone browses to http://my.zopeserver.com/folder they see that
'index_html'. No automatic method can guess what objects have become
irrelevant.

If you want to find everything that isn't refered to by another Zope
object, you could use 'sitecopy' to make a filesystem copy of everything
in your ZODB, 'ls -R' to get a list of filenames, and
'grep -r filename *' for each filename in the list. If the grep returns
nothing, nothing refers to that object.

You could do the same kind of thing ('ls -R' and 'grep') from the Zope
Management Interface using Jerome Alet's zshell.

-- 
Jean Jordaan
Upfront Systems http://www.upfrontsystems.co.za


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-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] OT: folding editors

2002-08-15 Thread Jean Jordaan

 > > # {{{ ... #}}} crutches ;^)
 >
 > I use a folding editor (jed) and these are the folding marks.

Use Vim, it folds based on indentation (or anything else you care to
teach it)!  ;>

-- 
Jean Jordaan
Upfront Systems http://www.upfrontsystems.co.za



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-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] Marshalling of records in REQUEST.form

2002-03-14 Thread Jean Jordaan

Hi Dieter

Roughly, I do this:

  FSSession.set('query_form', REQUEST.form)
  ... 
  context.log('query_form: %s'%FSSession(query_form))

where the 'log' external method is:

  import zLOG
  def log(message,summary='',severity=0):
  zLOG.LOG('MyDebugLog',severity,summary,message)

The output I quoted in the previous message appears in the logfile. My
Zope is 2.4.3

-- 
Jean Jordaan
Upfront Systems http://www.upfrontsystems.co.za


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-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] Marshalling of records in REQUEST.form

2002-03-14 Thread Jean Jordaan

Hi all

I've just noticed this. In my form I have, for example:

 
 
 
 
 

When I log this after submission, I see:

 {'HostType': ['Sequential'], 'properties_to_show': ContactPerson: 
 ['ContactName', 'DirectEmail'], Customer: ['CustomerName', 
 'CustomerStatus']}

In other words, not a valid dictionary. As a valid dictionary, that 
would be:

 {'HostType': ['Sequential'], 'properties_to_show': {'ContactPerson': 
 ['ContactName', 'DirectEmail'], 'Customer': ['CustomerName', 
 'CustomerStatus']}}

Is a bug or a feature? Is the reason for the representation the fact 
that 'properties_to_show' is a record, and not a dictionary?

-- 
Jean Jordaan
Upfront Systems http://www.upfrontsystems.co.za


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-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] Required final newline in Script (Python) in Zope 2.4.3

2001-12-17 Thread Jean Jordaan

Hi people

I'm moving an app to Zope 2.4.3, and one thing I've discovered is
that methods that don't end with a final newline are invalid::

  Script line 13
REQUEST.RESPONSE.redirect(url)
 ^
  SyntaxError: invalid syntax

If I go press return after the ), everything is fine. 

Is this a feature? An inevitability? Is it Good For Me?

Regards,
Jean Jordaan

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-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] Don't try to index URL (or any other REQUEST property)

2001-12-03 Thread Jean Jordaan

Hi all

Turns out that one major cause of my ZCatalog hassles was 
that I had an index called 'URL'. That is, my ZClass had 
a property called URL, and I was indexing on this. It makes
everything in the ZCatalog vanish. "No objects in Catalog".
Deleting this index makes everything re-appear again! :)

It seems that having indexes with names that appear in the 
REQUEST object is a definite no-no.

Regards,
Jean

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-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] ZCatalog becoming empty when using "Update" in conjunction with ZPatterns

2001-12-03 Thread Jean Jordaan

Hi all

I had a ZCatalog with about 3500 DataSkin instances indexed. Then 
I started to index instances of a regular ZClass as well. Then I 
added another index, to catalog an additional property of this 
ZClass, and hit "Update Catalog".

When Zope returned from updating, there were no records in the 
Catalog, though the Vocabulary was intact. I see that I cannot
search for the DataSkin metatypes using the "Find Objects"
ZCatalog tab: they don't show up in the "Find objects of type"
field. So perhaps this is why updating failed.

However, now the Catalog is not accepting any entries. I originally
did the cataloging using this kind of loop on all the classes I 
wanted indexed::

  ids = container.Roundup.Issues.defaultRack.getPersistentItemIDs()
  for id in ids:
  object = container.Roundup.Issues.defaultRack.getItem(id)
  Catalog.catalog_object( object
, string.join( object.getPhysicalPath()
 , '/'))

When I try to run that again, I still get "There are no objects in 
the Catalog." upon return. When I run it using a newly created catalog 
('testCatalog') instead, it works fine.

Could anyone perhaps explain what's happening here? 

Regards,
Jean


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-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] ZMailIn patch (index 'date' as DateTime object)

2001-11-09 Thread Jean Jordaan

Hi Steve

> Jean Jordaan wrote:
> 
> > But it's still a string, and can't be used in comparisons 
> > with DateTimes. Why not just use 'datetime', also sortable?
> 
> DateTime objects are huge.

Hmm, OK, I'll keep that in mind .. For sorting my mails, though, I'll
stick with the DateTimes. 

It would be cool if ZMailIn was more flexible as to which catalog it
uses and what properties are indexed, without requiring one to hack the
source .. I'll see if I can think of a way to make it so. 

Thanks for the answer,
Jean

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-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] ZMailIn patch (index 'date' as DateTime object)

2001-11-09 Thread Jean Jordaan

Hi Andy & all

There I was, trying to select last week's mail messages from
the ZMailInCatalog, when I realized that the 'date' index was
a simple string. 

Here's a patch, adding a property 'datetime', which can be 
used as an index of type DateTime. 

Anything I'm missing here? In particular, I'm not sure I
understand what 'sortableDate' is meant for. It's a string 
like this::

  str('%04d%02d%02d%02d%02d%02d' % (dateTuple[0],dateTuple[1],
  dateTuple[2],dateTuple[3],dateTuple[4],dateTuple[5]))

But it's still a string, and can't be used in comparisons 
with DateTimes. Why not just use 'datetime', also sortable?

Regards,
Jean Jordaan

[jean@blommie ZMailIn]$ diff -u ./ZMailMessage.py ./ZMailMessage_hacked.py 
--- ./ZMailMessage.py  Tue Mar  6 12:33:03 2001
+++ ./ZMailMessage_hacked.pyFri Nov  9 11:42:32 2001
@@ -61,6 +61,9 @@
 self.subject = subject
 self.date = date
 self.sortableDate = self._convertToSortableDate(date)
+# njj: index the date as a date.
+import DateTime
+self.datetime = DateTime.DateTime(date) 
 self.to = to
 self.sender = sender
 self.replyto = replyto


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



[Zope-dev] RE: Component Architecture / A modest proposal: Replace medusa with Twisted

2001-10-11 Thread Jean Jordaan

Hi all 

I don't know if you're all familiar with this already, but reading 
about Twisted didn't immediately bring to mind Medusa, but rather
certain aspects (specifically, *aspects*) of TransWarp, and of the 
Component Architecture (interfaces).

I'm including a bite from
  http://twistedmatrix.com/page.epy/twistedphil.html

Interesting?

Regards,
Jean

Adverb Oriented

Twisted is "adverb oriented", which takes this one step further.
Using inheritance and a simple naming convention, Twisted classes
indicate what sort of events they are responding to.  This allows
for conveniently extensible protocols along defined "vectors" for 
extension.

Let's say you wanted an object to be both a Twisted Reality player, and
also an object accessible through Twisted PerspectiveBroker. You could
define a class that looked like the following::

class RemotePlayer(reality.player.Player, spread.pb.Referenced):
def ability_kill(self, sentence): #kills another player
foo()
def remote_killPlayer(self):  #remote callable method.
bar()

Reality objects can have abilities, which you define by making a method
prefixed with ability_. pb objects have remotely callable
methods, which you define by making methods that begin with
remote_; so this is effectively the same as a class, a
snippet from the configuration file for a multi-user dungeon, and a
remote interface definition file; the three of which are normally
defined in different languages.  Using "adverb orientation" and some
simple python features, we can avoid the need for macros or complex
parsing to achieve this effect.

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