Re: [Zope-dev] product import question

2003-03-11 Thread Max M
Eric Roby wrote:

I attempted to restrict the meta_types in the class that is represented by
dbFolder to just prodA.  In order to gain access to the prodA add form, I
had to import the prodA module into the prodB module and make the assignment
in the class that is represented by dbFolder.  At this point the single
factory method was exposed in the dbFolder as expected.  Unfortuantely, the
constructor for prodA (action of the prodA add form) could not be found.
With numerous tweakings and source searching I settled on duplicating the
constructor function for prodA in the class that is represented by dbFolder.
Now it works.
You need to import the constructor methods and the assing them to local 
constructor methods.

I use something similar in my simpleProduct where I have a base module 
called mxmSimpleItem which has 2 constructors:

mxmSimpleItem.py

manage_addForm = HTMLFile('manage_addForm', globals())
def manage_addAction(self, id=None, REQUEST=None):
 some code

I then have another module mxmObjectManager which is similar to the 
first. So I also need the constructor in the module. Had they only been 
in the class, it would not have been a problem. But I just import them 
and assign them like:

mxmObjectManager.py

import mxmSimpleItem
manage_addForm = mxmSimpleItem.manage_addForm
manage_addAction = mxmSimpleItem.manage_addAction

Which is the right way to do it.

regards Max M

___
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] Proposed installation changes for review

2003-03-11 Thread Guido van Rossum
 Adrian van den Dries writes:
   Debug mode needs to be broken out into directives for its real
   effects.  I always want Zope to run as a daemon, but I also want
   automatic PT/DTML reloading, and immediate tracebacks.  I think there
   should be a separate no-detach for those people who want that
   feature.
 
 I'm happy with this (more so than the single option).  I think it's
 fair for us to get this implemented before we're done; not sure if it
 has to happen before the merge (I'm mostly tied up this week).

The no-detach choice is already separate -- this is now an option to
the separate zopectl program.

--Guido van Rossum (home page: http://www.python.org/~guido/)

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


Re: [Zope-dev] Re: [Zope] Proposed installation changes for review

2003-03-11 Thread Chris McDonough
On Tue, 2003-03-11 at 00:24, Edward Muller wrote:
 Once zope is installed in /opt/zope-2.7.0 can it be moved without
 damaging the install  say to
 /home/virtual/some.host.name/opt/zope-2.7.0 ?

Yes.  Its location is only meaningful to the instance files that need to
find it.

 In our hosting setup some things get run in a chroot, some things
 can't...
 
 Currently zope get's installed in a chroot environment for anyone who
 wants a zope install. It must be a complete install since when the user
 restarts it he will be in his chroot environment.
 
 So I'd ideally like to install zope in a way where all of the core of
 zope is in one place ... say ... /opt/zope/version # (/opt/zope/2.7.0,
 /opt/zope/2.7.1, etc...)
 
 This I can hardlink/symlink into each chroot and make permissions 755
 root/root.

I think this will work.  The only thing that might be a little weird is
tracebacks generated by pyc files, as they may report the filenames of
the Python modules where they were originally installed, instead of
where they live now.  There is some contention about whether this
happens under Python 2.2, but I know it's true for Python 2.1 and prior.


 From there I would like to be able to install an 'instance', which is
 ... in my case meaning the data.fs, /Products directory, log files, etc,
 etc. The stuff that make this users instance theirs. When the install is
 happening, the script executing it would most likely be outside of the
 chroot ... but I guess it could be configured to chroot as well..

You would need to chroot the run of makeinstance currently as it encodes
paths to software within the instance files that start Zope.  So if you
ran it outside the chroot it would work, but when the user logged in to
the chroot, the paths to the software would be wrong.

I think this might be made configurable with a switch to mkzopeinstance
(--sw_location=/some/path), though.  I will add this to the tentative
TODO, thanks.

 I already have start/stop scripts to go through the users that have a
 zope install and chroot into that users 'host' and then start zope as
 that 'hosts' administrative user.

These scripts will unfortunately need to change for Zope 2.7 unless we
create some sort of backwards compatibilty layer for startup.

- C



___
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] PyOpenGL support?

2003-03-11 Thread Edward Duffy

Hello all,

  I've spent the last couple of days going through the Zope docs, mail
archives, and even googling, but I can't find a lot of information on
using PyOpenGL with Zope.  I've found a message from Anthony Pfrunder,
dated July 1999:
Within the next few weeks I'll be releasing an extension patch to allow
the use of the Python Imaging Library and OpenGL with Zope.
And a blurb about PyOpenGL in Zope Newbie News, Jan 2001:
http://weblogs.userland.com/zopeNewbies/2001/01/24 It just mentions its
release but nothing about Zope.

So, has been done before? And if so, is there some documentation/guide
on getting it work?

Thanks!
-- 
Edward Duffy [EMAIL PROTECTED]


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

2003-03-11 Thread Christian Theune
Hi,

I had some conversation with Tres about the SecurityPolicy
implementation. I would like to clean up following problem:

The method validate is not very clear about when it will raise an
exception and when it will return a boolean.

This results in code that expects it to return a boolean, and makes
conclusions about exceptions that are wrong by catching the anonymously,
transforming them all (e.g. AttributeError) into Unauthorized. This
shadows the real source of a problem, also the code that calls validate
probably shouldn't raise Unauthorized on it's own.

But there's where my problem starts: could we get it somewhat clear who
should raise Unauthorized, what can be expected from validate and where
should only boolean values be returned?

I would like to see some discussion, wrap it up in a proposal, and
deliver the code on a branch.

Thanks for listening,
Christian

-- 
Christian Theune, gocept gmbh  co.kg
phone: +49-3641-233526 mobile: +49-179-7808366
mail: [EMAIL PROTECTED]


___
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] LOTS of roles?

2003-03-11 Thread Florent Guillaume
In article [EMAIL PROTECTED] you write:
  Note that you'll also want to change validate() if you go that route.
  It has a short-circuited version of getRolesInContext in it.
 
 are you sure it's not BasicUser.allowed() that you mean?
 there's a comment in there about checking roles manaully
 rather than with getRolesInContext...

Yeah I'm sorry, I meant allowed().
You could also check what NuxUserGroups does, it has to patch this same
area to provide a notion of groups to the security machinery.

Note that I don't remember your exact use cases, but NuxUserGroups could
be useful to you.

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:[EMAIL PROTECTED]

___
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] Re: [Zope-dev] Proposed installation changes for review

2003-03-11 Thread Guido van Rossum
 The point I'm trying to make is that Zope has learned nothing from the
 UNIX philosophy.  Yes, you can extend the config schema.  You can grow
 new, better config files, of extraordinary magnitude.  The
 all-powerful server will grow from being all-powerful to being
 all-powerful + n.  It will be able to read mail.  Its heralds shall
 sit upon mountain high throwns hewn of the finest O'Reilly and New
 Riders scripture.  But lo, still you won't be able to do something as
 mundane as limit the memory the FTP server is able to consume without
 affecting the HTTP server.
 
 Fracture the server infrastructure into small, seperate processes.
 The configuration of the individual pieces becomes trivial.  The
 understanding of the overall data flow improves.  When there's nothing
 left to remove from code, you've won.  Some of the breaks have already
 been made, like the separation of the storage from its front-end.
 Thats good, we need more action along those lines.

You're barking up the wrong tree.  Zope 2 won't change.  Zope 3 is
still in a state of flux, and that's where you should aim your
speech.

--Guido van Rossum (home page: http://www.python.org/~guido/)

___
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] Re: [Zope-dev] Proposed installation changes for review

2003-03-11 Thread Steve Alexander
 But lo, still you won't be able to do something as
mundane as limit the memory the FTP server is able to consume without
affecting the HTTP server.
You can do this with Zope. Just use ZEO and run one ZEO front-end for 
HTTP and one for FTP.

--
Steve Alexander
___
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] Re: [Zope-dev] Proposed installation changes for review

2003-03-11 Thread Jeremy Hylton
 I'm not dismissing it, and I think you need to go back and read what I
 wrote again very very carefully without reading anything into it.  I'm
 not trying to imply that using environment variables to configure the
 current codebase will reduce the code footprint.  Even if it did,
 because of the distributed nature of the technique, its damnedly hard
 to maintain in a project as large as Zope.  Also, I didn't say ZConfig
 was 374k of code, I said it was 374k of *work*.   I chose that word
 very carefully, and obviously thats going to err on the side of
 conservatism as certainly the work was not isolated to that single
 directory tree.

I don't know what work means in this context, but think the ZConfig
project is thorough.  In my checkout there are 180k of document, 180k of
unit tests, and 136k of code.  A measure of work that suggests that
something with 0k of documentation and tests and 136k of code would be
better makes no sense to me.

 The point I'm trying to make is that Zope has learned nothing from the
 UNIX philosophy.  Yes, you can extend the config schema.  You can grow

I don't see where the UNIX philosophy has anything useful to say about
configuration, but maybe I'm just a closet unix hater 0.5 wink.

 new, better config files, of extraordinary magnitude.  The
 all-powerful server will grow from being all-powerful to being
 all-powerful + n.  It will be able to read mail.  Its heralds shall
 sit upon mountain high throwns hewn of the finest O'Reilly and New
 Riders scripture.  But lo, still you won't be able to do something as
 mundane as limit the memory the FTP server is able to consume without
 affecting the HTTP server.

 Fracture the server infrastructure into small, seperate processes.
 The configuration of the individual pieces becomes trivial.  The
 understanding of the overall data flow improves.  When there's nothing
 left to remove from code, you've won.  Some of the breaks have already
 been made, like the separation of the storage from its front-end.
 Thats good, we need more action along those lines.

I don't see that configuration gets any easier if you have multiple
processes.  Even if Zope had N processes, there would still be the same
amount of stuff to configure.  You'd probably still want a single master
config file for the whole thing, and a tool to check the configuration
is valid separate from the process that uses the file to configure
itself.

As I watched everyone working on the ZConfig project, I was impressed
with how many issues are involved in getting a decent configuration
system.  I don't think that break the server into multiple pieces would
make it easier to configure, and I don't see what requirements could
have been eliminated to make the project take less work.

Jeremy





___
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] PyOpenGL support?

2003-03-11 Thread J Cameron Cooper


 I've spent the last couple of days going through the Zope docs, mail
archives, and even googling, but I can't find a lot of information on
using PyOpenGL with Zope.  I've found a message from Anthony Pfrunder,
dated July 1999:
Within the next few weeks I'll be releasing an extension patch to allow
the use of the Python Imaging Library and OpenGL with Zope.
And a blurb about PyOpenGL in Zope Newbie News, Jan 2001:
http://weblogs.userland.com/zopeNewbies/2001/01/24 It just mentions its
release but nothing about Zope.
So, has been done before? And if so, is there some documentation/guide
on getting it work?
 

Dunno, but what sort of integration are you expecting? Most things that 
work in any Python app (with the proper versions) can be made to work 
with Zope without too much trouble. Whether someone's made a Product 
around it is a different story. (Probably not, in this case.)

 --jcc

___
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] Re: [Zope-dev] Proposed installation changes for review

2003-03-11 Thread Guido van Rossum
 On Tue, 2003-03-11 at 15:22, Guido van Rossum wrote:
  
  That's why we're including the correct versions of ZODB and ZEO in
  Zope itself.  That's already the case in Zope 2.6.
 
 Zope 2.6 doesn't yet include ZEO, at least I don't think it does. ;-)

Oops, I stand corrected.  But Zope 2.7 does include ZEO!

--Guido van Rossum (home page: http://www.python.org/~guido/)

___
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] Re: [Zope-dev] Proposed installation changes for review

2003-03-11 Thread Dan L. Pierson
--On Tuesday, March 11, 2003 03:43:33 PM -0500 Guido van Rossum 
[EMAIL PROTECTED] wrote:

On Tue, 2003-03-11 at 15:22, Guido van Rossum wrote:

 That's why we're including the correct versions of ZODB and ZEO in
 Zope itself.  That's already the case in Zope 2.6.
Zope 2.6 doesn't yet include ZEO, at least I don't think it does. ;-)
Oops, I stand corrected.  But Zope 2.7 does include ZEO!
Very good!  But in that case, shouldn't the new Zope 2.7 install and 
startup stuff support it?

___
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] Re: [Zope-dev] Proposed installation changes for review

2003-03-11 Thread Guido van Rossum
  Oops, I stand corrected.  But Zope 2.7 does include ZEO!
 
 Very good!  But in that case, shouldn't the new Zope 2.7 install and 
 startup stuff support it?

Well, in a typical installation, you won't be running ZEO on the same
machine as Zope, right?  ZEO has its own install and config stuff,
which is very similar to that for Zope, but ZEO is not installed as
part of the main Zope install.

--Guido van Rossum (home page: http://www.python.org/~guido/)

___
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] Re: [Zope-dev] Proposed installation changes for review

2003-03-11 Thread Chris McDonough
On Tue, 2003-03-11 at 16:12, Dan L. Pierson wrote:
 Very good!  But in that case, shouldn't the new Zope 2.7 install and 
 startup stuff support it?

It does.  It's just that the default setup is still to use a non-ZEOd
FileStorage for your main database.  But you can change options in the
config file to make it use a ZEO ClientStorage.  This is in lieu of of
requiring you to edit custom_zodb.py as you needed to do in 2.6 and
prior.

It's clear that the Zope source distro should support the use of
ClientStorage out of the box.  It's not however so clear that the Zope
source distro should make it to set up a ZEO server (although it does
happen to include the necessary files to run a ZEO server too, it
doesn't include a 'zeoctl' or a zeo.conf, etc).
 
That's not to say that it shouldn't be easy to set up a ZEO server, but
that making it easy should probably the job of a package other than Zope
proper.  The right thing to do would be to package up a ZEO server
installer separate from Zope 2.7 with a similar kind of buildout,
support files, and configuration file.  At least that's been my idea so
far.

- C



___
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] Re: [Zope-dev] Proposed installation changes for review

2003-03-11 Thread Guido van Rossum
  Very good!  But in that case, shouldn't the new Zope 2.7 install and 
  startup stuff support it?
 
 It does.  It's just that the default setup is still to use a non-ZEOd
 FileStorage for your main database.  But you can change options in the
 config file to make it use a ZEO ClientStorage.  This is in lieu of of
 requiring you to edit custom_zodb.py as you needed to do in 2.6 and
 prior.
 
 It's clear that the Zope source distro should support the use of
 ClientStorage out of the box.  It's not however so clear that the Zope
 source distro should make it to set up a ZEO server (although it does
 happen to include the necessary files to run a ZEO server too, it
 doesn't include a 'zeoctl' or a zeo.conf, etc).

Chris, have you looked at ZEO/mkzeoinst.py?  It uses a somewhat
simpler approach than the new Zope setup, but it creates a zeoctl
script and a zeo.conf configuration file.

 That's not to say that it shouldn't be easy to set up a ZEO server, but
 that making it easy should probably the job of a package other than Zope
 proper.  The right thing to do would be to package up a ZEO server
 installer separate from Zope 2.7 with a similar kind of buildout,
 support files, and configuration file.  At least that's been my idea so
 far.

Not needed; it's all there (though far simpler in approach than the
Zope installer).

--Guido van Rossum (home page: http://www.python.org/~guido/)

___
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] Re: [Zope-dev] Proposed installation changes for review

2003-03-11 Thread Chris McDonough
Cool!  I didn't know.

Do you think we should tell people that if they want to run a ZEO server
to just run mkzeoinst from the software home resulting from Zope's make
install and to edit zope.conf to use a ClientStorage?

 Chris, have you looked at ZEO/mkzeoinst.py?  It uses a somewhat
 simpler approach than the new Zope setup, but it creates a zeoctl
 script and a zeo.conf configuration file.



___
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: [Zope] Re: Proposed installation changes for review

2003-03-11 Thread Evan Simpson
Guido van Rossum wrote:
Well, in a typical installation, you won't be running ZEO on the same
machine as Zope, right?  ZEO has its own install and config stuff,
which is very similar to that for Zope, but ZEO is not installed as
part of the main Zope install.
I routinely run ZEO on all of my sites, on the same machine.  I don't 
gain any scalability benefits this way, but it is fantastic for 
debugging and tweaking a live site.

My creaky old zctl.py auto-starts ZEO when necessary, using the same 
configuration data as it uses for the associated Zope instance, so they 
 both know to use 'var/zeo.soc' to connect.

Cheers,

Evan @ 4-am

___
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] Proposed installation changes for review

2003-03-11 Thread Dario Lopez-Ksten
- Original Message -
From: Guido van Rossum [EMAIL PROTECTED]


   Oops, I stand corrected.  But Zope 2.7 does include ZEO!
 
  Very good!  But in that case, shouldn't the new Zope 2.7 install and
  startup stuff support it?

 Well, in a typical installation, you won't be running ZEO on the same
 machine as Zope, right?

hm... I wonder if this wold be a common case if ZEO was included as a
integral part of Zope. I may be wrong, bur aren't there benefits of running
ZEO even on a single machine (i.e. stability and/or redundancy)?

I know I allready now could need the functionality of ZEO on a single
machine
(and I am about to use ZEO as soon as I fix some non-ZEO-able issues in our
app).

 ZEO has its own install and config stuff,
 which is very similar to that for Zope, but ZEO is not installed as
 part of the main Zope install.

I thought you had to install ZEO on top/inside of an existing Zope
installation. Will this be different in Zope 2.7?

Thanks,

/dario

- 
Dario Lopez-Ksten, IT Systems  Services Chalmers University of Tech.




___
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] Re: [Zope-dev] Proposed installation changes for review

2003-03-11 Thread Guido van Rossum
  Chris, have you looked at ZEO/mkzeoinst.py?  It uses a somewhat
  simpler approach than the new Zope setup, but it creates a zeoctl
  script and a zeo.conf configuration file.

 Cool!  I didn't know.
 
 Do you think we should tell people that if they want to run a ZEO server
 to just run mkzeoinst from the software home resulting from Zope's make
 install and to edit zope.conf to use a ClientStorage?

That should work, yes, as long as mkzeoinst.py, zdctl.py, zdrun.py and
runzeo.py are all on $PATH at that point.

--Guido van Rossum (home page: http://www.python.org/~guido/)

___
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: [Zope] Re: Proposed installation changes for review

2003-03-11 Thread Guido van Rossum
 I routinely run ZEO on all of my sites, on the same machine.  I don't 
 gain any scalability benefits this way, but it is fantastic for 
 debugging and tweaking a live site.
 
 My creaky old zctl.py auto-starts ZEO when necessary, using the same 
 configuration data as it uses for the associated Zope instance, so they 
   both know to use 'var/zeo.soc' to connect.

zdrun takes care of auto-restart.

Sharing config data may be a little trickier; Fred and/or Chris should
know more about that.

--Guido van Rossum (home page: http://www.python.org/~guido/)

___
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] Proposed installation changes for review

2003-03-11 Thread Guido van Rossum
 I thought you had to install ZEO on top/inside of an existing Zope
 installation. Will this be different in Zope 2.7?

Yes, ZEO will be an integral part of Zope then.

--Guido van Rossum (home page: http://www.python.org/~guido/)

___
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] Re: [Zope-dev] Proposed installation changes for review

2003-03-11 Thread Paul Winkler
On Tue, Mar 11, 2003 at 04:25:09PM -0500, Guido van Rossum wrote:
   Oops, I stand corrected.  But Zope 2.7 does include ZEO!
  
  Very good!  But in that case, shouldn't the new Zope 2.7 install and 
  startup stuff support it?
 
 Well, in a typical installation, you won't be running ZEO on the same
 machine as Zope, right?  ZEO has its own install and config stuff,
 which is very similar to that for Zope, but ZEO is not installed as
 part of the main Zope install.

i suppose it's not typical but we run zeo on all our systems including
the dev boxes, because

* we like to have the same environment everywhere for sanity's sake

* interactive debugging is very cool and has saved my butt more
  than once.

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's FAT BOY!
(random hero from isometric.spaceninja.com)

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


Re: [Zope-dev] Proposed installation changes for review

2003-03-11 Thread Dieter Maurer
Chris McDonough wrote at 2003-3-10 16:41 -0500:
  ...
  - Configuration is normally done by editing a config file instead of
passing command line options.  The configuration file is handled by
the ZConfig package.
  
  - Environment variables are no longer used for configuration.

I am *very* sad about this.

Configuration via environment variables is easy and much more
flexible than configuration files:

  We use a single configuration for a farm of Zopes.
  Of course, each Zope needs its own ZEO client cache,
  its own log file, its own pid files, 

  All this is achieved by incorporating the result of hostname
  into the respective environment variables.
  
  I do not know how to do something like this in a configuration
  file (unless it provides for some form of shell functionality).

Howfully, the configuration file supports (at least) definition of
key constants (like hostname) and its interpolation in
other modular (and reusable) components.

  - Building and installing the software have become more clearly
distinct; the installation can be separate from the build.

Seems you make the elementary installation more difficult.

Advanced installations may get easier, though...


Dieter

___
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] Proposed installation changes for review

2003-03-11 Thread Chris McDonough
On Tue, 2003-03-11 at 17:11, Dieter Maurer wrote:
   All this is achieved by incorporating the result of hostname
   into the respective environment variables.
   
   I do not know how to do something like this in a configuration
   file (unless it provides for some form of shell functionality).

ZConfig does allow you to declare and use simple bash-style variables
within a single file, but currently provides no access to the
environment.  I suspect we could add something to obtain an envvar value
within ZConfig.

E.g.:

%define HOSTNAME ${HOSTNAME}

.. then refer to $HOSTNAME in the rest of the config file...

(squiggly brackets would mean obtain from environment).

Do you think this would suffice?  Or maybe we just make HOSTNAME and/or
IP_ADRRESS within the a key constant as you describe.

   - Building and installing the software have become more clearly
 distinct; the installation can be separate from the build.
 
 Seems you make the elementary installation more difficult.

I'm surprised at this assertion.  The most elementary way of install
under 2.7 is this:

$ cd Zope-src
$ ./configure 
{finds suitable Python and reports lack of large file support}
$ make
$ make install
$ /opt/zope/mkzopeinstance /tmp/inst
{user edits /tmp/inst/etc/zope.conf, which has inline docs}
$ /tmp/inst/zopectl start

While under 2.6 it's this:

{need to know to configure Python with largefile support}
$ cd Zope-src
$ /path/to/python/version/you/want wo_pcgi.py 
{user finds and reads doc/ENVIRONMENT.txt for envvars}
{user finds and reads z2.py for command-line switches}
{user edits the 'start' script with the right switches and envvars}
$ ./start

(Forgot to mention the auto-large-file-detection support in the
configure script in the original request for comments, sorry).

I think most folks new to Zope would pick up on the first path sooner
than the latter as it more closely follows the setup directions of
programs they're already used to (Apache, for instance).

It also provides the least amount of suprise in the long term.  For
example, how many times have we had to talk panicked people through a
recovery effort after they've run in to the 2GB limit on some UNIX
variant because they're running a Python without largefile support?

Anyway, I think the requirement to be able to access the environment
under ZConfig is a good suggestion.  If you could expand on why you
think elementary installation is now harder, I would like to hear that.

- C



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

2003-03-11 Thread Dieter Maurer
Christian Theune wrote at 2003-3-11 17:11 +0100:
  The method validate is not very clear about when it will raise an
  exception and when it will return a boolean.
  
  This results in code that expects it to return a boolean, and makes
  conclusions about exceptions that are wrong by catching the anonymously,
  transforming them all (e.g. AttributeError) into Unauthorized. This
  shadows the real source of a problem, also the code that calls validate
  probably shouldn't raise Unauthorized on it's own.
  
  But there's where my problem starts: could we get it somewhat clear who
  should raise Unauthorized, what can be expected from validate and where
  should only boolean values be returned?

In my view, validate should return true or false and never
raise Unauthorized.

At the places where validate is used in an immediate access check,
the caller raises Unauthorized when validate returns false.


The opposite is almost as acceptable:

  validate returns None (if access is granted) or raises
  Unauthorized otherwise.

  Callers that only want to check but not access can catch the
  exception.


The current behaviour where access denied is sometimes
represented as false and sometimes as Unauthorized is
not optimal.


Dieter

___
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] Zope Template Newbie question

2003-03-11 Thread David Cain
I'm trying to pull in another file with the following markup:

span tal:replace=here/level2bannerLevel2banner content goes
here/span

And it does pull the file in, but it quotes the entire HTML in that file
so that my browser doesn't interpret it:
   lt;img src=/images/page2leftbottom-blank.jpg width=331
height=39 border=0 class=banner alt=Categorygt;

This is not what I want.  What am I doing wrong, or how to I prevent the
quoting?

David Cain
Senior Web Developer, Information Systems Department 
Syracuse University Library
Syracuse, New York 13244-2010
(315) 443-5923
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]


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


Re: [Zope-dev] Zope Template Newbie question

2003-03-11 Thread Adrian van den Dries
On March 11, David Cain wrote:
 And it does pull the file in, but it quotes the entire HTML in that file
 so that my browser doesn't interpret it:

http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/AdvZPT.stx

 Normally, the tal:replace and tal:content statements quote HTML
 tags and entities in the text that they insert. For instance, the
 the  character is quoted to amp;lt;. If you actually want to
 insert unquoted text, you need to precede the expression with the
 structure keyword.

a.

-- 
 Adrian van den Dries   [EMAIL PROTECTED]
 Development team   www.dev.flow.com.au
 FLOW Communications Pty. Ltd.  www.flow.com.au

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

2003-03-11 Thread Joachim Werner
Hi!

I've used Pydoc with Dieter Maurer's patches to browse the Zope
sourcecode before.
These patches are quite old and probably incompatible with current Zope
versions.
Is there a HOWTO for using Pydoc with a current Zope? Are there any new
adapted versions of Pydoc? Or is there any better way of browsing the
source code?
Cheers

Joachim

--

iuveno AG

Joachim Werner

_

Wittelsbacherstr. 23b
90475 Nürnberg
[EMAIL PROTECTED]
www.iuveno.de
Tel.: +49 (0) 911/ 9 88 39 84



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

2003-03-11 Thread Manoel Filho



Hi! My name is Manoel from Rio de 
Janeiro, Brazil. 
I'm very early in Zope. 
I was wanting make my jobs with a 
good presentation. So I downloaded "Zope Website Documentation Tool". I followed 
the instructions. Unpacked the file, copy it to the "import" folder, gonne to 
root folder in Zope and then clicked "import" button.Unceremoniousness Zope 
said to me : The object "broken" does not support this operation!Why? 

What this is mean? 
Did I make something wrong? 

Maybe I broke the object?Anybody 
can help me?I'm running Zope 2.6 in a Pentium 233 stand alone, under Windows 
98SE and ZServer.
Manoel Filho(55)(21) 3419-4459 

Cel. (55)(21) 9879-4684[EMAIL PROTECTED]




Re: [Zope-dev] Proposed installation changes for review

2003-03-11 Thread Guido van Rossum
  ZEO client configuration is included in the new configuration schema.
 
  ZEO server configuration has its own schema and tools, also based on
  ZConfig and the new zdaemon; you can check these out in the ZODB 3.2
  alpha release.
 
 Does this mean that Zope 2.7 will require ZODB 3.2 for ZEO users?

Zope 2.7 will *come with* ZODB 3.2 (or later, depending on the timing
of the Zope 2.7 release), so I suppose so.

 As an aside, am I the only one who's confused by this new bundling
 of ZEO as part of the stand alone ZODB product?

I don't know.  What's confusing for you?  The new approach is that:

  Zope includes ZODB includes ZODB

What's confusing about that?

--Guido van Rossum (home page: http://www.python.org/~guido/)

___
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] Proposed installation changes for review

2003-03-11 Thread Dan L. Pierson
--On Tuesday, March 11, 2003 02:39:55 PM -0500 Guido van Rossum 
[EMAIL PROTECTED] wrote:
Does this mean that Zope 2.7 will require ZODB 3.2 for ZEO users?
Zope 2.7 will *come with* ZODB 3.2 (or later, depending on the timing
of the Zope 2.7 release), so I suppose so.
...
As an aside, am I the only one who's confused by this new bundling
of ZEO as part of the stand alone ZODB product?
I don't know.  What's confusing for you?  The new approach is that:

  Zope includes ZODB includes ZODB

What's confusing about that?
Zope doesn't (currently) include ZEO so to get an up to date ZEO we now 
have to obtain
the correct version of the stand-alone ZODB and extract the contained ZEO. 
The version
numbers of the ZEO and stand-alone ZODB are unrelated so figuring out which 
ZODB we
need to get ZEO is a bit of a pain.   Also, ZEO is packaged differently in 
the stand alone
ZODB than it used to be in on it's own.

Dan Pierson



___
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] Proposed installation changes for review

2003-03-11 Thread Guido van Rossum
 Zope doesn't (currently) include ZEO so to get an up to date ZEO we
 now have to obtain the correct version of the stand-alone ZODB and
 extract the contained ZEO. The version numbers of the ZEO and
 stand-alone ZODB are unrelated so figuring out which ZODB we need to
 get ZEO is a bit of a pain.  Also, ZEO is packaged differently in
 the stand alone ZODB than it used to be in on it's own.

That's why we're including the correct versions of ZODB and ZEO in
Zope itself.  That's already the case in Zope 2.6.

--Guido van Rossum (home page: http://www.python.org/~guido/)


___
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] Re: [Zope-dev] Proposed installation changes for review

2003-03-11 Thread Jamie Heilman
Steve Alexander wrote:
  But lo, still you won't be able to do something as
 mundane as limit the memory the FTP server is able to consume without
 affecting the HTTP server.
 
 You can do this with Zope. Just use ZEO and run one ZEO front-end for 
 HTTP and one for FTP.

Sure, but then you carry along all the baggage of 2 zserver instances.
Its a start, but there's still a ways to go.

-- 
Jamie Heilman   http://audible.transient.net/~jamie/
I was in love once -- a Sinclair ZX-81.  People said, No, Holly, she's 
 not for you. She was cheap, she was stupid and she wouldn't load 
 -- well, not for me, anyway.  -Holly

___
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] Re: [Zope-dev] Proposed installation changes for review

2003-03-11 Thread Jamie Heilman
Jeremy Hylton wrote:
 I don't know what work means in this context, but think the ZConfig
 project is thorough.  In my checkout there are 180k of document, 180k of
 unit tests, and 136k of code.  A measure of work that suggests that
 something with 0k of documentation and tests and 136k of code would be
 better makes no sense to me.

How about, a lot of code/documentation was removed, and a lot of new
code/documentation was added.  Don't get hung up on the exact
numbers, my point was, a lot of work has gone into simplifying the
configuration process, but that the bigger picture isn't any clearer
for it.

 I don't see where the UNIX philosophy has anything useful to say about
 configuration, but maybe I'm just a closet unix hater 0.5 wink.

Small programs that do one thing well, written to work together,
communicating via a universal interface, have the golden property of
being easily replaceable.  With this replaceability comes the ease of
configuration.

 I don't see that configuration gets any easier if you have multiple
 processes.  Even if Zope had N processes, there would still be the same
 amount of stuff to configure.

There is more than one way to ease configuration.  Reducing the
amount of stuff is one way, but sometimes, even after you've reduced
till you can't reduce any further, there's still a lot of stuff.
Another way to ease configuration is to make things modular so its
easier to visualize the flow of data.  When the boundaries of
communication are clearly defined between modules it becomes easier to
understand what part each module plays, and how you can affect the
overall result by changing or re-organizing the individual modules.

 You'd probably still want a single master config file for the whole
 thing, and a tool to check the configuration is valid separate from
 the process that uses the file to configure itself.

Not I.  Large applications with a master config file are to be held
with suspicion.  Their longevity inevitably suffers because they are
difficult to adapt to new situations.

 As I watched everyone working on the ZConfig project, I was
 impressed with how many issues are involved in getting a decent
 configuration system.

Indeed.

 I don't think that break the server into multiple pieces would make
 it easier to configure, and I don't see what requirements could have
 been eliminated to make the project take less work.

Well, when you've got some cycles to burn, give it some more thought.
It may not be as obvious to you if you don't deal with it on a day to
day basis like sysadmins do, but I assure you UNIX owes much of its
longevity to the philosophies upon which it was built.  Adaptability is
a big deal.

-- 
Jamie Heilman   http://audible.transient.net/~jamie/
We must be born with an intuition of mortality.  Before we know the words
 for it, before we know there are words, out we come bloodied and squalling
 with the knowledge that for all the compasses in the world, there's only
 one direction, and time is its only measure.  -Rosencrantz

___
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] Re: [Zope-dev] Proposed installation changes for review

2003-03-11 Thread Chris McDonough
On Tue, 2003-03-11 at 17:48, Jamie Heilman wrote:
 How about, a lot of code/documentation was removed, and a lot of new
 code/documentation was added.  Don't get hung up on the exact
 numbers, my point was, a lot of work has gone into simplifying the
 configuration process, but that the bigger picture isn't any clearer
 for it.

Given the circumstance, what would you propose to do?

- C



___
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] Re: [Zope-dev] Proposed installation changes for review

2003-03-11 Thread Jamie Heilman
Chris McDonough wrote:
 On Tue, 2003-03-11 at 17:48, Jamie Heilman wrote:
  How about, a lot of code/documentation was removed, and a lot of new
  code/documentation was added.  Don't get hung up on the exact
  numbers, my point was, a lot of work has gone into simplifying the
  configuration process, but that the bigger picture isn't any clearer
  for it.
 
 Given the circumstance, what would you propose to do?

Merge and move on, I'm not asking anyone to throw out their work,
just to give thought to what I've said.

-- 
Jamie Heilman   http://audible.transient.net/~jamie/
We must be born with an intuition of mortality.  Before we know the words
 for it, before we know there are words, out we come bloodied and squalling
 with the knowledge that for all the compasses in the world, there's only
 one direction, and time is its only measure.  -Rosencrantz

___
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] Proposed installation changes for review

2003-03-11 Thread Dan L. Pierson
We currently rely on two scripts for running our Zopes:

1. A modified version of zctl.py.  I originally got it from a moribund wiki 
on the Zope site.
The main changes we've made have been to better separate parameters for 
Zope clients from
parameters for the ZEO server and to run an additional server of our own 
along side the ZEO
server (a simple distributed RAM Cache invalidation server).

2. A very simple sysv-init script that implements everything by calling the 
correct zctl.py.

It looks like the new install and startup world will be a huge improvement 
over the current
setup on the whole.  I like moving the log files to their own directory.

The things that seemed to be missing from your writeup were:

Almost no mention of ZEO (only one mention of a zeo client name 
parameter).  How does
ZEO fit into this?

I don't see an equivalent to ./zctl.py debug anywhere.  This starts up an 
interactive Python as
a ZEO client with ZServer and Zope imported and app = Zope.app().  I use it 
constantly.  Please?



___
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] Proposed installation changes for review

2003-03-11 Thread Guido van Rossum
 The things that seemed to be missing from your writeup were:
 
 Almost no mention of ZEO (only one mention of a zeo client name
 parameter).  How does ZEO fit into this?

ZEO client configuration is included in the new configuration schema.

ZEO server configuration has its own schema and tools, also based on
ZConfig and the new zdaemon; you can check these out in the ZODB 3.2
alpha release.

--Guido van Rossum (home page: http://www.python.org/~guido/)

___
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] Re: [Zope-dev] Proposed installation changes for review

2003-03-11 Thread Paul Winkler
On Tue, Mar 11, 2003 at 10:01:53AM -0500, Dan L. Pierson wrote:
 I don't see an equivalent to ./zctl.py debug anywhere.  This starts up an 
 interactive Python as
 a ZEO client with ZServer and Zope imported and app = Zope.app().  I use it 
 constantly.  Please?

+1.  I also use zctl.py debug nearly every day.

of course it's just a convenience, but it's an important
convenience because nearly every document i can find
on debugging Zope says roughly ...and of course you
can use ZEO, but that's beyond the scope of this article...

-- 

Paul Winkler
http://www.slinkp.com

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