[Zope] Why the same directories:instance and skel

2007-01-09 Thread Steve Han

I found thar subdirectory instance has completly the same as subdirectory
skel in  zope's home directory.What consideration for that from point of
view of software designing?Thanks a lot.

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


[Zope] How to setup and show zope server's homepage to clients?

2007-01-08 Thread Steve Han

Forgive me for unpatience.I installed zope as server to serve business's
content as homepage.How can I do that using ZMI?First make a folder and
then..

Thanks a lot.

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


Re: [Zope] Simple high-level question - mabye about WEBDAV?

2006-09-15 Thread Steve
Chris McDonough wrote:
 How does it not work?
I enter an URL which would render the index_html method as a Network
Place and all I get is an error message:

The folder you entered does not appear to be valid. Please choose
another.
 Webfolders doesn't allow setting permissions on folders or files on a
 share.  You'll need to do this through Zope's security interface via a
 browser.
I assumed as much... if I can find a product (or other pre-cooked
near-solution) for this then that would be great. :-)
 I suspect the situation is this: you will likely need a need a content
 management or a fat client or both if you want users to be able to
 manage security via a normal (nothing really normal about it, IMO,
 but...) Explorer window.
I don't absolutely need an explorer window - but a drag-n-drop
interface is desirable - and Windows it the most likely remote OS.
 Zope has a completely different security model than either UNIX or
 Windows, so something needs to map its notion of security to the
 client's.  Plain-old-webfolders won't help here.
Fair enough - though I will need to manage this aspect of the solution
somehow.
 I wonder why you don't just use a Windows share here?  What does Zope
 give you that it wouldn't in this case?
There are several reasons I don't want to use a windows shared folder...
including:

* I need to support access to the web-share through corporate
web-proxies which only allow HTTP/HTTPS access to the outside world.
* Access to the web-share should be supported even from non-MS platforms.
* No need to expose a Windows/SAMBA port to the internet at large
(including the myriad security issues that would incur.)
* Administration only necessary for users of the portal - no separate
system for users of the web-drive.
* No need to install software on remote sites to access a private
virtual network.

I'm sure there are other advantages too...

Steve



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


[Zope] Simple high-level question - mabye about WEBDAV?

2006-09-14 Thread Steve
I am looking to extend a zope portal to allow authenticated users to
upload/download files... the idea being to support a shared drive
containing various files available over HTTPS and available anywhere
there is web-access.  Ideally this notional 'web-drive' should be
accessible using Windows Web Folders -but I'd also like for it to
support ACL-style permissions with respect to file-access by other
authenticated users.

Are there any products which already address this requirement?


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


Re: [Zope] Simple high-level question - mabye about WEBDAV?

2006-09-14 Thread Steve
Chris McDonough wrote:
 OK, well, Zope works out of the box with DAV clients, so... 
I've read that too... but (maybe I'm just being dumb here) I can't
connect to my zope server via the Add Network Place wizard just by
specifying a URL for my zope-server which my web-browser accesses fine.
Can you point me at a how-to?  How does this integrate with
permissions?  Will I need a web-based interaction to set-up ACLs for files?



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


[Zope] Custom authentication page...

2006-09-12 Thread Steve
I'm just starting to look at Zope as a potential platform to implement a 
simple authenticated web site... however I do not want to face users 
with the standard web-browser dialogue, but rather my own log-in page.  
I've established how to restrict access based upon permissions etc... 
and I'm able to set/reset cookies based a form submission - but do not 
see how to integrate an HTML login page with the standard Zope security.


I've read that I should use the Cookie Crumbler product... but after 
I've added this to the folder that I intend to protect, I click on 
cookie_authentication (the default name for the Cookie Crumbler 
object) and I get the following error message:

--

An error was encountered while publishing this resource.

*Error Type: AttributeError*
*Error Value: aq_parent*

--

Is this a bug with Cookie Crumbler (version 0.3 downloaded from 
zope.org used against Zope 2.9.4, python 2.4.3, win32)?
Am I barking up the wrong tree in hoping to have a slick-looking logon 
page?  Is this something commonly done using Zope?  Is Cookie Crumbler 
the right product?  Would I be better hand-coding this myself?



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

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


Re: [Zope] Custom authentication page...

2006-09-12 Thread Steve

David H wrote:
I've read that I should use the Cookie Crumbler product... but 
after I've added this to the folder that I intend to protect, I click 
on cookie_authentication (the default name for the Cookie Crumbler 
object) and I get the following error message:
Thats a weird one ...  but cookie crumbler is great to get  custom 
login forms

It looked as if it should be... :-)
Did you try deleting it and adding another (cookie_authentication 
object)**  Maybe you added a property thats non-existent? (login page 
id or something?)
I tried that - I even tried installing a fresh version of Zope and 
creating a new instance...  I followed some instructions:


   http://www.zopelabs.com/cookbook/1073516045

My experiences started to differ when I got a  cookie_authentication 
instead of a login object...  I was unable to display the properties tab 
for cookie_authentication (step 8) as that generates the error...

you can produce a fuller error traceback
If necessary add
  dtml-var error_tb
to your standard_error_message (if using dtml) for a clearer error 
expression


That generates:

Traceback (innermost last):

   * Module ZPublisher.Publish, line 115, in publish
   * Module ZPublisher.mapply, line 88, in mapply
   * Module ZPublisher.Publish, line 41, in call_object
   * Module Products.CookieCrumbler.utils, line 115, in
 manage_propertiesForm
   * Module Shared.DC.Scripts.Bindings, line 311, in __call__
   * Module Shared.DC.Scripts.Bindings, line 346, in _bindAndExec
   * Module Shared.DC.Scripts.Bindings, line 1, in ?
   * Module Shared.DC.Scripts.Bindings, line 265, in _getContext



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

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


Re: [Zope] Custom authentication page...

2006-09-12 Thread Steve

Olavo Santos wrote:
Is this a bug with Cookie Crumbler (version 0.3 downloaded from 
zope.org used against Zope 2.9.4, python 2.4.3, win32)?


That is a really old version.
Go here: http://hathawaymix.org/Software/CookieCrumbler
Upgrade to version 1.2. :-)
  

Sorted; Thanks!

I had been using the version published on zope.org, as opposed to the 
one on hathawaymix.org - I'd expected the version hosted on the main 
zope site to at least work... :-)  The comments do mention 
hathawaymix.org, but don't give that full URL - and 
http://hathawaymix.org/ doesn't take me somewhere useful to me... )


Steve

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

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


[Zope] Windows Server 2003, II6 and ASP404 vs form posts

2006-04-17 Thread Steve McMahon
Anyone out there using Zope inside IIS 6 on Server 2003 via the ASP404 
technique?


I've done this successfully on Windows 200 and XP, but on Server 2003, 
IIS does not seem to be passing the post data to the error handler.


When Win2003 was young, there was some list traffic on a similar 
problem, and Brian Sullivan figured out that IIS was reporting a 
REQUEST_METHOD of GET even for POST requests. However, the POST data 
was still passing, so it was possible to check Request.totalBytes (this 
is the ASP Request, not Zope's) to determine the real nature of the request.


Now, though, many an IIS patch later, IIS is invoking the error handler 
with http content length set to zero (even though it reports that 
content type is www-urlencoded). So, form submissions do nothing.


And, if there's nothing to be done about this, does anyone know if the 
Fresh Logic or Enfold ISAPI solutions have any way to intermix serving 
of IIS and Zope content? If I didn't have to do that, I'd be using 
Apache, and be done by now ;) .


Thanks!

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

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


Re: [Zope] Re: Newbie install from source

2006-03-20 Thread Steve James
Hi

Courtesy reply ( I did not cc zope@zope.org)

Regarding posting to a Plone list you're right :-)

I was so busy learing how to install on Linux from source I did not notice
that I had signed up to not quite the appropriate mailing list for my
question.

I think I'll lurk though and soak up some of you kind folks wisdom.


Thanks.

Its running fine now.

Regards

Steve


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


[Zope] Re: Zope on Solaris

2005-08-20 Thread Steve McMahon

Brian Sullivan wrote:

...
Matt Hamilton's report is still probably your best resource if you find
yourself with the gun to your head:

http://www.zope.org/Members/glpb/solaris




OK -- I get the picture I think ;-)

I will try to dodge the Solaris bullet if I can.


Just for the record, the conclusion of the cited report (once you read 
to the postscript 
http://www.zope.org/Members/glpb/solaris/report_ps#2) was:


People really shouldn't be afraid of running python/zope on solaris,
especially in multi-cpu environments, as long as they understand how
python works, because you actually have much better resource control
than pretty well any other O/S out there, but as they say use the right
tool for the job, and make informed decisions ;-)

Also, the concerns about Solaris were related to poor performance under 
Solaris 8 on a multi-Sparc platform. Anybody got any more recent 
information that might apply to Solaris 10 or to an Opteron platform?


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

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


[Zope] FTP Failures on new install

2005-08-04 Thread Steve McMahon
I've having trouble getting FTP working on a new Zope install. All other 
Zope functions appear normal, but I'm unable to transfer files _to_ Zope 
via FTP. I can use FTP to download files from the Zope server and can 
create new directories on the server. But attempts to transfer files to 
the server all result in 426 Error creating file errors.



ftp put test.html
200 PORT command successful.
150 Opening ASCII connection for test.html
426 Error creating file.


The problem is not a firewall problem; I can reproduce it with local ftp 
sessions and with no firewall in place.


I've tried several Zope versions from 2.6 to 2.7.7. All have the same 
problem. Common to the attempts is that they were all source builds with 
Python version 2.3.3 (#1, Mar 10 2004, 06:42:32) [GCC 3.3.2] on Solaris 
10 on a dual-Opteron Sun V20Z. I'd be happy to update the Python version 
if anyone thinks that might cure the problem.


Thanks! Steve McMahon

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

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


[Zope] Re: FTP Failures on new install

2005-08-04 Thread Steve McMahon
Sorry, I should have mentioned that there are no traces of the problem 
in the error log. Z2.log entries look routine, except for the ftp error 
itself.


Dieter Maurer wrote:

Steve McMahon wrote at 2005-8-4 08:28 -0700:

I've having trouble getting FTP working on a new Zope install. All other 
Zope functions appear normal, but I'm unable to transfer files _to_ Zope 
via FTP. I can use FTP to download files from the Zope server and can 
create new directories on the server. But attempts to transfer files to 
the server all result in 426 Error creating file errors.




ftp put test.html
200 PORT command successful.
150 Opening ASCII connection for test.html
426 Error creating file.



Visit your error_log object (in Zope's Root Folder (ZMI!))
and see what it tells you about the problem...



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

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


[Zope] Re: FTP Failures on new install

2005-08-04 Thread Steve McMahon

Switching to python 2.4.1 cured the problem.

Steve McMahon wrote:
I've having trouble getting FTP working on a new Zope install. All other 
Zope functions appear normal, but I'm unable to transfer files _to_ Zope 
via FTP. I can use FTP to download files from the Zope server and can 
create new directories on the server. But attempts to transfer files to 
the server all result in 426 Error creating file errors.



ftp put test.html
200 PORT command successful.
150 Opening ASCII connection for test.html
426 Error creating file.



The problem is not a firewall problem; I can reproduce it with local ftp 
sessions and with no firewall in place.


I've tried several Zope versions from 2.6 to 2.7.7. All have the same 
problem. Common to the attempts is that they were all source builds with 
Python version 2.3.3 (#1, Mar 10 2004, 06:42:32) [GCC 3.3.2] on Solaris 
10 on a dual-Opteron Sun V20Z. I'd be happy to update the Python version 
if anyone thinks that might cure the problem.


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

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


Re: [Zope-dev] More Transience weirdness in 2.7.1b1

2004-06-02 Thread Steve Jibson
A slight correction for any of you trying to reproduce this at home :-)
I only pretended to change over to filestorage (dream, nightmare, who 
knows), in reality, I was still using tempstorage.

Steve

The same thing happened yesterday and re-starting Zope seemed to get 
things working again.  After the problem yesterday, I changed my temp 
database to use filestorage to see if that would help.  No luck, the 
problem showed up again today.

___
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] {Spam?} Re: [Zope3-dev] Re: RFC: TALES adapters and TAL/Tales variable namespaces

2004-05-24 Thread Steve Alexander

Of course, Steve suggested:
  ob:adaptername   context:dc/title

This really doesn't make sense. To me it reads In the namespace of
context get the title of dublin core.
I'm not reading : as having anything to do with namespaces.  Rather, I 
see '/' as the traverse operator, and : as the adapt operator.

--
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-dev] Re: [ZODB-Dev] Re: BTrees strangeness (was Zope 2.X BIG Session problems - blocker - our site dies - need help of experience Zope developer, please)

2004-05-18 Thread Steve Jibson
Good morning.
I just got in and checked on my customer's system.  In the past 22 1/2 
hours they've had 15000 page hits and last night at about 9:30, ONE 
person got a KeyError.  Actually, this same person got twenty KeyErrors 
over a period of about 45 seconds.  I'm downloading their log files now 
and plan to spend some time this morning going through them.

Anyway, it appears that I was wrong when I said that the problem doesn't 
show up when I use FileStorage (although it does seem to happen less 
frequently -- but who can be sure of anything at this point?).

In answer to your questions earlier, Chris, we set up the user session 
at login time because we make the user answer some questions at login 
time that determine which portions of the interface to present to 
him/her.  For example, using the same login id and password, a user may 
choose to login as an administrator or as a normal user.  We store this 
choice and other info based on this choice in the session.  Also, we 
don't rely on the browser to time out the authentication cookie.  Once a 
user authenticates with ExUserFolder, ExUserFolder keeps their 
credentials in a cache until they have been inactive for 10 minutes (the 
timer resets with each cache hit).  If their credentials are not in the 
cache, rather than looking them up again, the user is logged out and 
must re-authenticate.  It seems like a reasonable way to handle logins 
and sessions.

In addition to going through log files, I will spend some more time 
today making sure we're not doing something stupid in our app.

Thanks again (to Chris, Michael, Alex and everyone else who has lost 
sleep over this session stuff).  I'll keep you posted on any new 
information I find.

Steve
Chris McDonough wrote:
On Mon, 2004-05-17 at 23:08, Chris McDonough wrote:
There indeed is a minor off-by-one error: it manifests itself as
sessions timing out at most 20 seconds early.
But there is also a deeper issue which involves the fact that a session
data object is not properly removed from an older bucket when it moves
due to being accessed in a later timeslice; the symptom only appears
when a browser id is reused to start a session after it was used to
start an older one that had timed out normally.  I've got almost no clue
why this happens at this point, but I'm working on it.  Ugh.  This is
almost certainly what Steve is experiencing.

I take that back.  Actually, I think I was just reading the test results
and debug output wrong.  It appears to be operating normally except for
the off-by-one problem (which is minor).  I need to jack up the tests to
do some comparisons of data values; currently I'm just testing to ensure
that *something* is in the session.. I need to test if the right thing
is in the session over time.
- 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 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: [ZODB-Dev] Re: BTrees strangeness (was Zope 2.X BIG Session problems - blocker - our site dies - need help of experience Zope developer, please)

2004-05-18 Thread Steve Jibson
Well, after much log reading, I have found that the KeyError we got last 
night was OUR fault.

I will fix the problem with our app, then I want to change back to 
TemporaryStorage and watch the system some more.  I'll keep you posted.

Here's the brief explanation of our problem (you can skip it if you like):
A user logged in and did some stuff then left his browser for almost an 
hour.  When he returned and tried to do more stuff, he was no longer in 
the ExUserFolder's credential cache and his session had expired.  He was 
forced to log in again.  Upon supplying his ID and password, he was sent 
to the loginSuccess page.  This is the one that calls our method to 
set up his user session.  The Z2.log shows a 302 result code on this 
page.  His browser had the loginSuccess page in cache, so it did not 
request it again and his session was never re-created.

Score one for Chris's suggestion on how we should be setting up the 
user's session.  For now, however, I think I'll just add the 
please-don't-cache-me header stuff to the RESPONSE.

Steve Jibson wrote:
Good morning.
I just got in and checked on my customer's system.  In the past 22 1/2 
hours they've had 15000 page hits and last night at about 9:30, ONE 
person got a KeyError.  Actually, this same person got twenty KeyErrors 
over a period of about 45 seconds.  I'm downloading their log files now 
and plan to spend some time this morning going through them.

Anyway, it appears that I was wrong when I said that the problem doesn't 
show up when I use FileStorage (although it does seem to happen less 
frequently -- but who can be sure of anything at this point?).

In answer to your questions earlier, Chris, we set up the user session 
at login time because we make the user answer some questions at login 
time that determine which portions of the interface to present to 
him/her.  For example, using the same login id and password, a user may 
choose to login as an administrator or as a normal user.  We store this 
choice and other info based on this choice in the session.  Also, we 
don't rely on the browser to time out the authentication cookie.  Once a 
user authenticates with ExUserFolder, ExUserFolder keeps their 
credentials in a cache until they have been inactive for 10 minutes (the 
timer resets with each cache hit).  If their credentials are not in the 
cache, rather than looking them up again, the user is logged out and 
must re-authenticate.  It seems like a reasonable way to handle logins 
and sessions.

In addition to going through log files, I will spend some more time 
today making sure we're not doing something stupid in our app.

Thanks again (to Chris, Michael, Alex and everyone else who has lost 
sleep over this session stuff).  I'll keep you posted on any new 
information I find.

Steve
___
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: [ZODB-Dev] Re: BTrees strangeness (was Zope 2.X BIG Session problems - blocker - our site dies - need help of experience Zope developer, please)

2004-05-17 Thread Steve Jibson
:-(
I grabbed Transience.py and TemporaryStorage.py from the Zope-2_7-branch 
of CVS this morning and dropped them onto one of our customer's systems. 
 About 20 minutes later I found the following in the error_log:


Traceback (most recent call last):
  File c:\Zope-2.7\lib\python\ZPublisher\Publish.py, line 100, in 
publish request, bind=1)
  File c:\Zope-2.7\lib\python\ZPublisher\mapply.py, line 88, in mapply
if debug is not None: return debug(object,args,context)
  File c:\Zope-2.7\lib\python\ZPublisher\Publish.py, line 40, in 
call_object
result=apply(object,args) # Type scr to step into published object.
  File c:\Zope-2.7\lib\python\OFS\DTMLDocument.py, line 128, in __call__
r=apply(HTML.__call__, (self, (client, bself), REQUEST), kw)
  File c:\Zope-2.7\lib\python\DocumentTemplate\DT_String.py, line 
474, in __call__
try: result = render_blocks(self._v_blocks, md)
  File c:\Zope-2.7\lib\python\OFS\DTMLDocument.py, line 121, in __call__
r=apply(HTML.__call__, (self, bself, REQUEST), kw)
  File c:\Zope-2.7\lib\python\DocumentTemplate\DT_String.py, line 
474, in __call__
try: result = render_blocks(self._v_blocks, md)
  File c:\Zope-2.7\lib\python\OFS\DTMLDocument.py, line 121, in __call__
r=apply(HTML.__call__, (self, bself, REQUEST), kw)
  File c:\Zope-2.7\lib\python\DocumentTemplate\DT_String.py, line 
474, in __call__
try: result = render_blocks(self._v_blocks, md)
  File c:\Zope-2.7\lib\python\DocumentTemplate\DT_Util.py, line 201, 
in eval
return eval(code, d)
  File string, line 1, in expression
  File c:\Zope-2.7\lib\python\AccessControl\ZopeGuards.py, line 67, 
in guarded_getitem
v = object[index]
  File c:\Zope-2.7\lib\python\Products\Transience\TransientObject.py, 
line 170, in __getitem__
return self._container[k]
KeyError: 'accountType'


After getting the error, I changed them over to FileStorage.  I haven't 
seen any errors since then.  I will be more than happy to spend some 
time doing whatever I can to help track this down and/or test updates.

Steve
Chris McDonough wrote:
On Sat, 2004-05-15 at 23:55, Steve Jibson wrote:
quite yet been vetted (see earlier posts in this thread regarding
Publish.py).  This should work itself out over the next week or so I
suspect.
Relatively speaking, this is only a minor concern.  It just means I 
shouldn't try to access session in the standard_error_message until a 
solution is found.  We were doing that in our product and I've already 
pulled that out.  After all, there are NEVER any errors, so why should 
we need to monkey with standard_error_message ;-)
It would be nice, for completeness, if this were resolved for 2.7.1.

Yes, it should work itself out over the next week or so, and definitely
before 2.7.1.

Am I safe just dropping those two files from CVS into an existing 2.7 
site or do I need to grab everything else from the Zope-2_7-branch?

I think you should be safe with just those two, but were I you I would
just get the 2.7 branch out of CVS in its entirety (then you can update
more easily if there are fixes).  Note that if you have transient object
containers in a permanent storage (like FileStorage), the operation is
pretty much a one way one if you want to keep the data in the
transient object container: you can go to the new code, then go back to
the old code if necessarfy, but you will likely lose data in the TOC
if you do.  Obviously this doesn't effect stuff in a TemporaryStorage
(because it goes away when Zope is shut down).
- 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] Re: [ZODB-Dev] Re: BTrees strangeness (was Zope 2.X BIG Session problems - blocker - our site dies - need help of experience Zope developer, please)

2004-05-17 Thread Steve Jibson
Chris McDonough wrote:
On Mon, 2004-05-17 at 13:06, Steve Jibson wrote:
I'm sure 'accountType' should have been in the session.  Immediately 
after a user logs in we populate his session with a bunch of stuff 
(including accountType).

What happens when the session expires and he's still logged in?
We're using ExUserFolder for authentication.  We have it set to log 
users out after 10 minutes.  We have sessions set to expire after 20 
minutes.  So, in theory, it should never happen.  Also, since my last 
Zope restart (3hr 30min), I've had 57 users let their authentication 
timeout and then access the site (forcing another login), and still no 
errors with session.  (It's still using FileStorage).

1 - After having the system run for 45 minutes, I had 8 similar errors. 
 Some were on different web pages and some had different keys that 
were causing the error.
2 - I have also traced through Z2.log and followed the same path through 
the web site that produced one of the errors and I did not get an error.
3 - Since changing this server to use FileStorage (1hr 39min ago), there 
has not been a single error.

Is there anything I can do to help here?

A small reproducible test case would help if you still believe this
error is not in your own application.
I'm sure you know by now that this is easier said than done.  Over the 
past few weeks, I've probably put close to 30 hours into just trying to 
 reproduce (on demand) these session errors.  I'll probably want to 
look at the test rig you and Michael have been using.

___
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: [ZODB-Dev] Re: BTrees strangeness (was Zope 2.X BIG Session problems - blocker - our site dies - need help of experience Zope developer, please)

2004-05-15 Thread Steve Jibson
Chris,
Okay, correct me if I'm wrong.  This means the big ugly SESSION problem 
his completely fixed.  If so, you are my new best friend! (whether you 
like it or not).

Anyway,  I'll put your updates (TemporaryStorage.py and Transience.py) 
on a couple of my customer's systems (that have been experiencing 
regular KeyErrors in SESSION) on Monday and I'll let you know if I see 
any problems.

This is pretty big.  If all goes well with testing (I assume Michael 
will be testing your latest stuff as well), I think this is important 
enough that y'all should consider a 2.7.1 release with this fix.

Thanks again!  (I know you've probably lost some hair and a bit of 
sanity over this one.)


Chris McDonough wrote:
On Thu, 2004-05-13 at 18:11, Tres Seaver wrote:
Chris McDonough wrote:
Largely due to Michael I believe I have isolated and fixed every
reported sessioning error except this
(still-difficult-to-reproduce-but-definitely-still-existing) KeyError
bug in temporary storage.  I can let the test rig run for several hours;
it happens maybe once every hour or two, so I've not gotten the
provocation of it down to a science yet.  It doesn't occur when the
transient object container is placed in a FileStorage.

I have now figured out where the KeyError from TemporaryStorage was
coming from and have checked in a fix on the 2.7 branch and HEAD.
- 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 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: [ZODB-Dev] Re: BTrees strangeness (was Zope 2.X BIG Session problems - blocker - our site dies - need help of experience Zope developer, please)

2004-05-15 Thread Steve Jibson
Chris McDonough wrote:
On Sat, 2004-05-15 at 23:11, Steve Jibson wrote:
Chris,
Okay, correct me if I'm wrong.  This means the big ugly SESSION problem 
his completely fixed.  If so, you are my new best friend! (whether you 
like it or not).

Well, I'm afraid I will need to correct you. ;-)  There is one more
corner case that hasn't been covered that exhibits itself when a session
is accessed from within the standard_error_message.  It requires a
change in the main publishing code, for which exists a patch that hasn't
quite yet been vetted (see earlier posts in this thread regarding
Publish.py).  This should work itself out over the next week or so I
suspect.
Relatively speaking, this is only a minor concern.  It just means I 
shouldn't try to access session in the standard_error_message until a 
solution is found.  We were doing that in our product and I've already 
pulled that out.  After all, there are NEVER any errors, so why should 
we need to monkey with standard_error_message ;-)
It would be nice, for completeness, if this were resolved for 2.7.1.


Anyway,  I'll put your updates (TemporaryStorage.py and Transience.py) 
on a couple of my customer's systems (that have been experiencing 
regular KeyErrors in SESSION) on Monday and I'll let you know if I see 
any problems.

Thanks... make sure you use the latest code from the Zope-2_7-branch in
CVS.
Am I safe just dropping those two files from CVS into an existing 2.7 
site or do I need to grab everything else from the Zope-2_7-branch?



___
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 2.X BIG Session problems - blocker - our site dies - need help of experience Zope developer, please

2004-03-01 Thread Steve Jibson
Chris,

I'm not sure if you'd even planned to, but have you looked over this 
replacement Transience.py?  Do you have an opinion on the 
re-implementation?  I plan on looking over it myself, but even if I like 
it, I'd sleep better while it runs on my customer's servers if I knew it 
had your blessing.

Thanks,
Steve


Chris McDonough wrote:
I installed new Transience.py. During my little test it works fine.
But real test will be on Monday when students start logging in as complete
classes, sometimes there are hundreds of them logging on simultaneously, 
so we will see. 


Any news? ;-)
___
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] Heads up: tag 2.7 beta 3 Tuesday

2003-11-14 Thread Steve Jibson
We're always happy about another beta release, but do you think you guys 
will have a chance to look into the reported session (thread safety?) 
errors before beta 3?  I posted and sent some failing test results to 
Chris a couple of weeks ago.

Thanks,
Steve
Brian Lloyd wrote:
I'd like to plan to tag Zope 2.7 beta 3 this coming Tuesday and 
release it. Please make sure anything you may still be doing on 
the Zope-2_7-branch is wrapped up by Monday evening (EST).

Thanks!

Brian Lloyd[EMAIL PROTECTED]
V.P. Engineering   540.361.1716  
Zope Corporation   http://www.zope.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 )


___
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] SESSION loosing data when system has multiple users

2003-10-17 Thread Steve Jibson
We have been using Zope 2.7.0-beta2 and we have been having a bit of 
trouble with SESSION loosing data when we have more than one user on the 
system.  These problems usually show up as KeyErrors when a particular 
data element in SESSION cannot be found.  If I set the zserver threads 
to 1 in zope.conf, the problem seems to go away (but the system isn't 
really usable either).  So I assumed it was a thread-safety problem in 
the SESSION code.

I decided to be brave and take a look at the code.  To my surprize, I 
found a test file called stresstestMultiThread.py in the 
lib/python/Products/Sessions/stresstests directory that seemed to be the 
exact thing I wanted to test.  It wouldn't run without a couple of minor 
modifications, but once I got it running, with more than three or four 
threads, the tests fail (never complete).

Is this test file still valid?  It looks like it hasn't been modified 
for almost a year now.  If it is valid, has anyone looked into getting 
the tests to pass.  I will probably look into it more myself, but before 
I do, I just want to make sure I'm not headed down a dead-end street.

Thanks,

Steve

P.S. - The tests failed in both the 2.7.0b2-src and the what is 
currently in cvs.

___
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] SESSION loosing data when system has multiple users

2003-10-17 Thread Steve Jibson
Chris,

Sorry, I should have included more info, but my message was already a 
bit long.

I have run the tests on both Red Hat 7.3 and Red Hat 9 with the same 
result.  I am using python 2.2.3.  Here is the step-by-step for what I 
did (I'm going to err on the side of too much info here):

- check out latest Zope from cvs
- cd Zope
- ./configure
- make
- make instance
- cd lib/python/Products/Sessions/stresstests
- edit stresstestMultiThread.py
  - comment out line 38
  - changed readiters and writeiters fro 100 to 10 on lines 117 and 118
- cp ~/Zope/lib/python/Products/Transience/tests/fauxtime.py .
- python2 stresstestMultiThread.py
This time, on Red Hat 7.3, I actually got an exception.  I'll include 
the output below.

Please let me know if there is ANYTHING I can do to help out with this 
one.  I appreciate you looking into it.

Steve





[EMAIL PROTECTED] stresstests]$ python2 stresstestMultiThread.py
testNonOverlappingBrowserIds (__main__.TestMultiThread) ... 4 values in toc
waiting for 8 threads
read conflict
4 values in toc
read conflict
read conflict
read conflict
waiting for 8 threads
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
4 values in toc
4 values in toc
4 values in toc
4 values in toc
4 values in toc
4 values in toc
4 values in toc
4 values in toc
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
waiting for 8 threads
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
waiting for 8 threads
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
0
read conflict
read conflict
read conflict
read conflict
read conflict
waiting for 7 threads
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
read conflict
2003-10-17T14:41:56
25
Exception in thread Thread-3:
Traceback (most recent call last):
  File //usr/lib/python2.2/threading.py, line 414, in __bootstrap
self.run()
  File stresstestMultiThread.py, line 164, in run
self.run1()
  File stresstestMultiThread.py, line 187, in run1
data = session_data_manager.getSessionData(create=1)
  File 
/home/stevej/Zope/lib/python/Products/Sessions/SessionDataManager.py, 
line 93, in getSessionData
return self._getSessionDataObject(key)
  File 
/home/stevej/Zope/lib/python/Products/Sessions/SessionDataManager.py, 
line 180, in _getSessionDataObject
ob = container.new_or_existing(key)
  File 
/home/stevej/Zope/lib/python/Products/Transience/Transience.py, line 
175, in new_or_existing
item  = self.get(key, notfound)
  File 
/home/stevej/Zope/lib/python/Products/Transience/Transience.py, line 
807, in get
v = self._data[b].get(k, notfound)
KeyError: 0

read conflict
read conflict
read conflict
2003-10-17T14:41:56
17
Exception in thread Thread-2:
Traceback (most recent call last):
  File //usr/lib/python2.2/threading.py, line 414, in __bootstrap
self.run()
  File stresstestMultiThread.py, line 164, in run
self.run1()
  File stresstestMultiThread.py, line 187, in run1
data = session_data_manager.getSessionData(create=1)
  File 
/home/stevej/Zope/lib/python/Products/Sessions/SessionDataManager.py, 
line 93, in getSessionData
return self._getSessionDataObject(key)
  File 
/home/stevej/Zope/lib/python/Products/Sessions/SessionDataManager.py, 
line 180, in _getSessionDataObject
ob = container.new_or_existing(key)
  File 
/home/stevej/Zope/lib/python/Products/Transience/Transience.py, line 
175, in new_or_existing
item  = self.get(key, notfound)
  File 
/home/stevej/Zope/lib/python/Products/Transience/Transience.py, line 
807, in get
v = self._data[b].get(k, notfound)
  File /home/stevej/Zope/lib/python/ZODB/Connection.py, line 561, in 
setstate
p, serial = self._storage.load(oid, self._version)
  File /home/stevej/Zope/lib/python/tempstorage/TemporaryStorage.py, 
line 94, in load
s=self._index[oid]
KeyError:

2003-10-17T14:41:56
18
Exception in thread Thread-4:
Traceback (most recent call last):
  File //usr/lib/python2.2/threading.py, line 414, in __bootstrap
self.run()
  File stresstestMultiThread.py, line

Re: [Zope-dev] Re: [ZCM] [ZC] 869/ 5 Comment Broken transactionhandling in case of exceptions

2003-04-04 Thread Steve Alexander

I am not in line with your principle the error report is
part of [the output of] the first transaction. 
The error report tells you what went wrong. You can only generate an accurate 
report if you see the objects in the error state.  Zope is saying to your 
application: your transaction is doomed. tell me why.
I'm interested in this for Zope 3.

Currently in Zope 3, you can register a view to give a custom 
presentation of an error that reaches the publisher. The view can also 
do persistent work if it needs to. An example of this is recording 
against a User record that a login failed for that User.

The view has access to the original request that ended in the error. The 
view is looked-up and rendered in a new transaction. The new transaction 
is committed if there were no errors raised, otherwise it is aborted.

Do you think this error handling system is insufficient for your needs?

Can you give an example of the kind of situation where you'd need access 
to objects in a doomed transaction in their doomed state, in order to 
make an error report?

I'm interested in improving the error handling system in Zope 3, so your 
use-case will be very useful.

--
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-dev] Create top-level folder

2003-03-31 Thread Steve Alexander
Matt Ficken wrote, to both [EMAIL PROTECTED] and [EMAIL PROTECTED]:

Part of my product's job is to create a top-level folder. Currently,
I can only get it to create the folder in what ever folder the
product is added in. I would like to be able to get access to the
root directory object but don't know how.
How do I access the root directory object? Would 'getPhysicalRoot' do
that? If yes, how do I use it?
Matt,

Please don't post a message to both [EMAIL PROTECTED] and [EMAIL PROTECTED]

You'll see this at the bottom of each message on the [EMAIL PROTECTED] list:

  ___
  Zope-Dev maillist  -  [EMAIL PROTECTED]
  http://mail.zope.org/mailman/listinfo/zope-dev
  **  No cross posts or HTML encoding!  **
The question you are asking should be asked on [EMAIL PROTECTED], not 
[EMAIL PROTECTED] Andreas was kind enough to answer, but please do try 
the [EMAIL PROTECTED] list first.

The [EMAIL PROTECTED] list is for discussing the development of Zope and 
its internals, not for discussing how to use Zope and its API.

--
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: [Zope3-dev] Re: [Zope-dev] How (in)secure is Zope?

2003-03-13 Thread Steve Alexander

So I think we can reliably say that stock Zope is secure.  An insecure 
product, on the other hand, opens up many possibilities, but that ought 
to be the subject of a different discussion.
...and if we do have that discussion, can it please be on 
[EMAIL PROTECTED], and not cross-posted to both [EMAIL PROTECTED] and 
[EMAIL PROTECTED]

Unless the discussion is about Zope 3 products, in which case it should 
be on only [EMAIL PROTECTED]

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

2003-03-13 Thread Steve Alexander

I suspect most people with checkin privelidges dont know about this problem, 
because it wont have been sent to the public mailman list.
Perhaps an email can be sent out saying

  Issue number 1234.
  Temporarily restricted pending security review.
  http://url.to.get.it.if.you.are.logged.in
Then, I'd be able to follow the link, authenticate, and read the issue.

--
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 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-dev] ZODB: Are all handles closed?

2003-03-07 Thread Steve Alexander
Ulla Theiss wrote:
Hello list,

in our product (and additionally in an other process) we use separate
ZODB-Storages.
Opening and closing the ZODB several times the number of file-handles
increases.
You might want to post this to [EMAIL PROTECTED] instead of 
[EMAIL PROTECTED]

Also, be sure to say what version of python and zodb you are using.

--
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-dev] Re: [Vote] PEP308 voting began

2003-03-06 Thread Steve Alexander

(Tested with
div tal:replace=if:options/x then:string:yes else:string:no)
There are an awful lot of colons in there :-)

Here's an off-the-wall idea:

  div tal:replace=talif
   tal:if=options/x
   tal:true=string:yes
   tal:false=string:no
   
This looks better as a tal:tag

  tal:block
  replace=talif
  if=options/x
  true=string:yes
  false=string:no
  
Or, if you only use this kind of thing with tal:replace, tal:content and 
tal:define.

  tal:block
  defineif=foo options/x
  true=string:yes
  false=string:no
  
Of course, none of this helps for tal:attributes.

--
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-dev] ZPublisher XMLRPC extension for user exceptions (II)

2003-02-28 Thread Steve Alexander

By that way, I could send my own fault code and fault descriptions
via XML-RPC.
But as you can see, I have to extend ZOPE code, and I don't want to
do it, I have to work with standard releases of ZOPE.
Do you think that something like that would be improved in an early
future for next ZOPE releases?
Any opinion will be really appreciated.
This is easy to do in Zope 3. You just provide an XML-RPC view for your 
exception that returns the things you want.
Different exceptions can have different views.
The same exception can have a different view for plain browser-oriented 
HTTP, for FTP, and for XML-RPC.

If the views part of the Zope 3 component architecture gets 
back-ported to Zope 2, then you'll be able to use this with Zope 2.

Zope 3 has had only one alpha release, and is still undergoing a lot of 
change and further development. The mailing list for discussing it is 
[EMAIL PROTECTED]

--
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-dev] Following the Zope Collector

2003-02-26 Thread Steve Alexander

So I'd like to propose to switch the Zope collector to dispatcher Off.
This would mean more email traffic for the supporters, but it's easy
enough to filter and I think the benefits are worth it.
I get my notifications by subscribing to this list:

http://mail.zope.org/mailman/listinfo/zope-collector-monitor



--
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-dev] Security-Problem

2003-02-19 Thread Steve Alexander

Shane Hathaway [EMAIL PROTECTED] wrote:

Do you not want foo to have the Manager role?


Andre Schubert wrote:

No, because he is no longer in our company.


Shane Hathaway [EMAIL PROTECTED] wrote:

I think you're asking for a find + chown utility, right?  I don't know 
of one, but it sure would be nice to have. :-)

Andre Schubert wrote:

It would be very nice to have such a tool :)

BTW: Thanks for the quick answers, you help me to understand the problem.
 I take the ownership of all objects where foo was the owner
 and the problems should go away :)


Andre,

Don't treat this so lightly! When you take ownership of objects where 
foo is the owner, you are telling Zope that you take responsibility for 
those objects.

For example, let's say foo had written a python script for removing all 
of her files older than one day.

Here's some pseudocode:

  For all files older than one day:
try:
  remove the file
except PermissionError:
  pass

This will work, provided foo has rights to delete only foo's files.
If you take ownership of such a script, and you run it, then it will 
very different effects.

Also, if you are a Manager (or in another privaleged role), and you take 
ownership of such a script, you may be allowing others to delete their 
own files when they run that script, whereas before nothing much would 
have happened.


In 99% of cases, none of this will be a problem. However, you should 
take care when taking ownership of objects, especially objects that 
represent code such as python scripts and dtml methods and page templates.

--
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-dev] property type

2003-02-06 Thread Steve Alexander
Tim McLaughlin wrote:

According to docs and testing (in the interpreter) I can make a 
read-only calculated attribute using property() (I know that setters do 
not work w/ non-new-style classes).  So I tried the following:

class CMixin:
  def getter(self):
return 'test'
  prop = property(getter)

and when I try to mix in this object w/ a Folder object, the instance 
returns property object at 0x8b45edc for the 'prop' attribute.  Is 
this an issue with pickling or something else?

In Zope 2, the ExtensionClass that is the C base class used for 
Persistent classes, doesn't work with python 2.2 properties.

--
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-dev] property type

2003-02-06 Thread Steve Alexander
Steve Alexander wrote:

Tim McLaughlin wrote:


According to docs and testing (in the interpreter) I can make a 
read-only calculated attribute using property() (I know that setters 
do not work w/ non-new-style classes).  So I tried the following:

class CMixin:
  def getter(self):
return 'test'
  prop = property(getter)

and when I try to mix in this object w/ a Folder object, the instance 
returns property object at 0x8b45edc for the 'prop' attribute.  Is 
this an issue with pickling or something else?


In Zope 2, the ExtensionClass that is the C base class used for 
Persistent classes, doesn't work with python 2.2 properties.

But, you can use a ComputedAttribute to get much the same effect.

--
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-dev] [Bug] Zope's transaction behaviour flawed

2003-02-03 Thread Steve Alexander
Chris McDonough wrote:

I am +1 on this.  I suspect that before committing, though, we should
 ask people who make use of Zope's transaction manager in advanced
ways like Phillip Eby.


As I noted in the Collector issue, I believe this change is a good idea
overall. As Chris suggests, we should take note of users of ZPatterns 
and TransactionAgents (and other add-ons?), as these do things at 
transaction boundaries such as clear computed fields. The error handlers 
currently in use may expect these computed fields to be still available.


By conincidence I'm implementing something similar for error handling in 
Zope 3 right now.

Here's the kind of thing I'm doing in zope 3, using the same notation 
Dieter used. First, the simple case where the error handler will 
definitely not need to alter any state:

  ## request starts
  transaction.begin()
  try:
  object= REQUEST.traverse(...)
  result = mapply(object,...)
  transaction.commit()
  except:
  try:
  try:
   result = handle_error()
  except:
   result = default_handle_error()
   # Zope's default error handling
   # it must not have side effects
  finally:
  transaction.abort()
  request.response.setBody(result)
  ## request ends

If there's an exception handler that has side-effects, it must 
explicitly say so, and we get this:

  ## request starts
  transaction.begin()
  try:
  object= REQUEST.traverse(...)
  result = mapply(object,...)
  transaction.commit()
  except:
  try:
  try:
   # this call returns a special
   # 'I have side-effects' token.
   result = handle_error()
  except:
   result = default_handle_error()
   # Zope's default error handling
   # it should not have side effects
  finally:
  transaction.abort()

  if result is I_HAVE_SIDE_EFFECTS:
  transaction.begin()
  transaction.note('%s (application error handling)'
   % '/'.join(object.getPhysicalPath))
  try:
  result = handle_error_with_sideeffects()
  transaction.commit()
  except:
  try:
  result = default_handle_error()
  # Zope's default error handling
  # it should not have side effects
  finally:
  transaction.abort()
  else:
  request.response.setBody(result)
  ## request ends

--
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-dev] [Bug] Zope's transaction behaviour flawed

2003-02-03 Thread Steve Alexander
Chris McDonough wrote:

I am +1 on this.  I suspect that before committing, though, we should
ask people who make use of Zope's transaction manager in advanced ways
like Phillip Eby.  

I've spoken to Phillip Eby, and he sees no problem with the approaches 
we've discussed.

So, +1 from me.

--
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-dev] 2.6.1b2?

2003-01-27 Thread Steve Alexander


Here's the status - an engagement that we're doing has been bringing
up some issues regarding ZODB and ZEO in large-scale environments. I
think that the fixes are useful enough that they should be in 2.6.1,
but getting them finalized has taken longer than I expected.


I'd love to know what kind of thing 'large-scale' implies here, and what 
kind of problems the fixes fixed.

--
Steve Alexander


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


Re: [Zope-dev] Re: [Zope-Checkins] CVS: Zope/lib/python/TAL -TALInterpreter.py:1.69.6.10

2002-12-24 Thread Steve Alexander


The problem occurs where you want include the value of a variable inside an
attribute.

For example:

input type=string tal:attributes=value someValue

By default Page Templates replaces the escaped value in the form, unless
structure is specified. If someValue contained a  (eg: test with a 
quote) then you would get the following invalid html (this is what you
currently get):

input type=string value=test with a  quote

This of course should be (and what the patch changes it to):

input type=string value=test with a quot; quote

If you do not escape double quotes in the Page Template html quoting
function, you will never be able to easily use Page Templates unless you are
sure that someValue does not have double quotes escaped. This would mean
having to import an escaping function into your page templates or adding an
extra layer of python involved for almost every use of a variable.


I think page templates should escape quotes in tal:attributes, but not 
under other circumstances.

Also, I believe that an alternative in the example you give would be to 
use single quotes. This is consistent with how quoteattr works:

 from xml.sax.saxutils import quoteattr
 print quoteattr('foo bar')
'foo bar'
 print quoteattr(foo' bar)
foo' bar
 print quoteattr(foo' bar)
foo'quot; bar


quoteattr only resorts to using quot; when there is no alternative -- 
that is, when the string being quoted contains both a single quote and a 
double quote.

So, perhaps an alternative fix would be to revert the current fix, and 
instead make tal:attributes use quoteattr.

--
Steve Alexander


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


Re: [Zope-dev] Re: [Zope-Checkins] CVS: Zope/lib/python/TAL - TALInterpreter.py:1.69.6.10

2002-12-23 Thread Steve Alexander
Andy McKay wrote:

Collector number 735: http://collector.zope.org/Zope/735

This was prompted by some bugs people found with Plone. For a two character
fix that to me looked like a simple oversight I didn't bother with a unit
test.


I'm not going to comment on whether or not page templates should work 
this way.


There good reasons to write a unit test in just this kind of situation:

It is only a two character fix. So, someone else might come along later, 
and think that those two characters shouldn't be there -- just as you 
think those two characters should be there. They could remove those 
characters, and no tests would fail.

Also, in a refactoring, this behaviour couild be easily lost if there is 
no unit test to demonstrate correct behaviour.


--
Steve Alexander


___
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] PyCon DC 2003: Extension of Submission Deadline

2002-12-17 Thread Guido van Rossum on behalf of Steve Holden
The deadline for submissions to PyCon DC 2003 appears to have been too tight
for many authors. While some promised submissions have arrived, several have
not even though the original deadline of 15 December has passed.

Rather than exclude promising papers the organizing committee has decided to
extend the deadline for submissions. Accordingly, the new schedule for
proposals is as follows:

Submission Deadline: January 15, 2003
Notification of Acceptance: January 31, 2003
Final Versions Due: March 10, 2003
Conference Dates: March 26-28, 2003 [unchanged]

Authors who have already submitted abstracts are invited to resubmit if they
feel that the original deadline had an adverse effect on the quality of
their submissions.

Please make any appropriate media, mailing lists and newsgroups aware of
this announcement. Enquiries should be sent in the first instance to
[EMAIL PROTECTED] Information about PyCon DC 2003 is available at the
following URLs:

www.python.org/pycon
www.python.org/cgi-bin/moinmoin/PyCon

The latter URL, a Wiki page, can also be used to communicate with the
conference organizers. This is *your* conference: tell us what *you* want to
see in it.

regards
---
Steve Holden  http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/pwp/
Bring your musical instrument to PyCon!http://www.python.org/pycon/
---

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



Re: [Zope-dev] BUG: ValueError while changing height of the templateedit window

2002-12-11 Thread Steve Alexander
Guido van Rossum wrote:

Can we get the same patch without the generic except:, please?


snipped part about whether there could be database corruption


int() happens to raise a bunch of different exceptions, and I think
an unqualified except: clause is okay here (though it needs a
comment).


I think this would be a useful note for the Zope3 style guide.


What exceptions can int() raise?

On converting a preexisting value to an int:

  ValueError, OverflowError, TypeError, AttributeError

  (Any others?)

On converting an instance that implements __int__:

  Anything at all.
  It can even return a non-int value.

On evaluating the expression inside the int() brackets:

  Anything at all.


I would suggest that only the four exceptions I listed first are worth 
catching. The other cases are programming errors.
Of those four exceptions, in this situation, I think you only need to 
catch ValueError. The other cases are application logic errors that I 
think it is counterproductive to catch. If you get one, there is a bug 
in some code, or some template, that should be fixed.


Here's how I produced the errors listed in the first category:

 int('xxx')
Traceback (most recent call last):
  File stdin, line 1, in ?
ValueError: invalid literal for int(): xxx

 import sys
 int(sys.maxint+1)
Traceback (most recent call last):
  File stdin, line 1, in ?
OverflowError: long int too large to convert to int

 int(int)
Traceback (most recent call last):
  File stdin, line 1, in ?
TypeError: int() argument must be a string or a number

 int(AttributeError())
Traceback (most recent call last):
  File stdin, line 1, in ?
AttributeError: AttributeError instance has no attribute '__int__'

--
Steve Alexander


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


Re: [Zope-dev] BUG: ValueError while changing height of the templateedit window

2002-12-11 Thread Steve Alexander


Anything can raise MemoryError.


Ok. But I don't think regular application code should catch these.



On converting an 8bit string to an int:

 ValueError *only*


Ok.


On converting a Unicode string to an int:

 ValueError
 UnicodeError (or UnicodeEncodeError, which is a subclass of it)


Can you provide an example of raising a unicode error like this:

  u = makeUnicodeString()  # your choice of function
  int(u)

My point is that once you have a valid unicode object, I don't see how 
calling int(valid_unicode_object) will raise a UnicodeError.

If this is so, then the style should be:

  value = expression_to_compute_value
  try:
  i = int(value)
  except ValueError:
  # take corrective action

rather than:

  try:
  i = int(expression_to_compute_value)
  except:  # Note: calling 'int()' can raise just about anything
  # take corrective action


--
Steve Alexander



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


Re: [Zope-dev] BUG: ValueError while changing height of the templateedit window

2002-12-11 Thread Steve Alexander
I spoke too soon.  UnicodeEncodeError is a subclass of ValueError.  So
catching ValueError from int(str_or_unicode) is the way to go.  Who's
writing that Zope 3 style guide again?


Great.

http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/ZopePythonStyleGuide

--
Steve Alexander


___
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 and PersistentList (Bug?)

2002-11-25 Thread Steve Alexander
Jeremy Hylton wrote:


JPS == Jeffrey P Shell  writes:


  JPS What about ``if callable(aq_base(newKeywords)):`` to remove
  JPS potential acquisition wrappers?

callable() returns True for any instance.


Any instance of what?


[steve@localhost]$ python2.2
Python 2.2.2 (#1, Oct 31 2002, 10:45:23)
[GCC 2.96 2731 (Red Hat Linux 7.2 2.96-108.7.2)] on linux2
Type help, copyright, credits or license for more information.
 callable(object())
0
 class Foo:
...   pass
...
 callable(Foo())
0



--
Steve Alexander


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


Re: [Zope-dev] Dynamically altering Product methods

2002-11-21 Thread Steve Alexander


* It is my understanding (after long analysis of the source) that
what I'm doing with self._security is okay. I mean, it seems to me I
should be able to redeclare my permission settings at run-time. Is
this correct, or am I missing something? Acquisition is still rough
to me. 


This has little to do with acquisition. I have no idea what 
declareStaticPermissions(self._security) does.

ClassSecurityInfo applies to classes. You're trying to apply it to an 
object -- the 'self' argument of your method. I would not expect this to 
work properly. If it works at all, I'd expect it to re-apply security 
directives to the class (that is, to all of your objects), not the one 
object you want to apply this to.


When do you need this web services stuff to work? All of this is very 
much easier in Zope 3. You can customise the permissions for individual 
objects, and create persistent classes.

Of course, Zope 3 isn't ready for general use yet...

--
Steve Alexander


___
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 and PersistentList (Bug?)

2002-11-20 Thread Steve Alexander
Thomas Guettler wrote:


Hi!

In KeywordIndex the newKeywords get called
if they are callable:
def _get_object_keywords(self,obj):
newKeywords = getattr(obj, self.id, ())
if callable(newKeywords):   # (*)
			newKeywords = newKeywords()
if hasattr(newKeywords,'capitalize'): # is it string-like ?
newKeywords = (newKeywords, )
return newKeywords

This fails if the newKeywords are stored in a PersistentList.

Callable is true, but there is no __call__ attribute.

I changed the line marked with (*) to
 if hasattr(newKeyword, __call__):

and this seems to work

I think this does not break anything and could be included in the
original.

Am I the first how uses PersistentList for an indexed attribute? Is
there a reason not to do so?



The KeywordIndex should be changed to check for the __call__ attribute, 
rather than relying on 'callable'. You cannot reliably use 'callable' 
when you're also using acquisition wrappers.

See my comment to this Collector report.

  http://collector.zope.org/Zope/578

I suggest you report the bug you have found in the Collector.

--
Steve Alexander




___
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] Production System Specs

2002-11-18 Thread Steve Alexander
Brian R Brinegar wrote:


Hello,

Can anyone point me at some recommended setups for a ZEO cluster. I would
like some or all of the following information:

 * Hardware Specs
 * Load Balancing
 * Caching Information (Apache / Squid Caches)

Any information would be very helpful.


http://www.zope.org/About

--
Steve Alexander


___
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] Securing login with SSL via RESPONSE?

2002-11-18 Thread Steve Alexander
Assume I make a hypothetical SSLRedirect product, modelled on 
CookieCrumbler. There is no reasonable way to keep them in the same
folder and make sure that SSLRedirect gets to the REQUEST/RESPONSE
before CookieCrumbler, correct? I.e. such SSLRedirect product would
have to be in a subfolder relative to CookieCrumbler so that it gets
traversed first.

If you need both CookieCrumbler and this new behaviour, you could derive 
your product from CookieCrumbler. This would ensure that things happen 
in the correct order.

--
Steve Alexander


___
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: [ZODB-Dev] Re: [Zope-dev] Contents of Initial Data.fs in ZopeDistribution?

2002-11-14 Thread Steve Alexander
Casey Duncan wrote:

 It is only there due to lack of time to take it out. We had planned to
 take it
 out for 2.6, but time was never made to replace it with code to
 bootstrap an
 empty storage with the proper root level elements still residing in
 Data.fs.in.

IIRC, the proper root level elements are now created in code.
However, various unit tests of zope and 3rd party products rely on
having a Data.fs.in.

--
Steve Alexander




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


Re: [Zope-dev] bug in mapply.py?

2002-11-05 Thread Steve Alexander


I must admit to not understanding why this should only break over
xmlrpc and not directly from Zope.  The problem appears to be that my
method is defined something like:

def method(self, *args, **kw)


mapply doesn't put things into **kw arguments of methods.

I wanted this once for a product in Zope 3, looked deeply into mapply, 
and talked to Jim Fulton about it.

IIRC, Jim said that mapply shouldn't put things into **kw arguments 
because it isn't at all explicit, and would end up implicitly putting in 
a whole bunch of things that you generally wouldn't want in a lot of cases.


Can you make up a simple python module to demonstrate your case, just 
using a method, and mapply?

It may be that there's a way to achieve what you want, while still 
keeping things reasonably explicit.

--
Steve Alexander



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


Re: [Zope-dev] How to override __getattr__ and not break acquisition

2002-10-17 Thread Steve Alexander


I perhaps should have clarified that I need to be able to specify the
name of the attributes or methods at run time, so ComputedAttribute
unfortunately won't do the trick as you have to define each
attribute/method you require in the class definition.

ie. I need something like :
def __getattr__(self,attr):
   if name in self.methodlist:
 do something
   return Implicit.__class__.__getattr__(self,attr)

where self.methodlist is a list of strings that may change per instance
and/or at runtime, or itself could be calculated at the time of doing
the __getattr__ (eg self.getMethodList()).


Sounds like you could use ZPatterns.

If you do implement your own __getattr__, you might need to check if the 
object you want to return implements __of__, and return 
object.__of__(self) (or something like that).

--
Steve Alexander


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


Re: [Zope-dev] How can I find out who visited a URL within my ZopeProduct?

2002-10-09 Thread Steve Alexander


 If we send an email to a counterparty to a legal contract with a URL to
 the contract, we know that they saw the contract by observing a
 VisitURL Command with their user ID and the URL of the contract.
 That means they read the email and clicked on the URL we sent
 (or navigated to it through some other means).

Correct.

 My application can then automatically send notifications to others
 based on the execution of the VisitURL Command.
 I can send email to my group saying So and so has seen the contract

Incorrect.

 In this particular case, we are writing an invoicing application, so the 
 moment
 the client sees the invoice this way, the Net-30 clock starts ticking

This shows that they read the original email, and intended to view the 
contract at the URL. However, after that point, we only know that Zope 
attempted to send the page at the URL back to the browser. You have no 
proof that such data was ever received by the browser in any way 
meaningful to the end-user. This gets even more complicated when http 
proxies are involved.

--
Steve Alexander


___
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] Plone/Metadata/FUD

2002-10-03 Thread Steve Alexander


  My only response is why wasn't  Many of the components and frameworks 
 currently supplied by the CMF included in the core Zope in the first 
 place?  Everybody has the right to work on their own thing sure.  We 
 would already have a highly extensible Zope3 by now if the time wasn't 
 spent trying to create something else that should have been in the core 
 of Zope in the first place.

If only people could write the ideal software first time!

 From my point of view as a Zope 3 contributor, I'm extremely glad that 
the patterns, use-cases and learning experiences were developed in the 
CMF, outside of the core of Zope.

If what is going into Zope 3 had been worked into the core of Zope 2 
instead of being tried out in the CMF, the speed of development would 
have been an order of magnitude slower, and there would have been a much 
greater risk of increasing the number of deprecated APIs in the Zope 2 core.

So, bravo to the CMF developers and contributors. Not only do we have a 
useful and innovative framework today, we have the blueprints for a 
better Zope tomorrow.

--
Steve Alexander


___
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] form variables and **kw

2002-10-02 Thread Steve Alexander


 If so, why?

I see that Toby and you answered that.


 Is this a python limitation?

No.

 I played around with 
 co_varnames and python doesn't seem to offer a possibility to recognize 
 **kw as something special.

  def foo(bar, **kw):
...   pass
...
  foo.func_code.co_flags
11

  def foo(bar, *args):
...   pass
...
  foo.func_code.co_flags
7

  def foo(bar):
...   pass
...
  foo.func_code.co_flags
3


--
Steve Alexander


___
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] Site-crawler (find unused objects)

2002-08-30 Thread Steve Alexander

[EMAIL PROTECTED] wrote:
 Hi,
 
 has anyone written a script which crawls a site and lists all objects
 which aren't referenced anymore?

Crawling a site means going from a root object, and following all of 
its references, recursively.

Any objects you find through this process are, by virtue of the fact 
they have been found by that process, referenced.
Your requirement is self-contradictory.

--
Steve Alexander



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



Re: [Zope-dev] find unused objects: hopefully the last misunderstanding...:o)

2002-08-30 Thread Steve Alexander

[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.
 
 * There is no easy way to find such things.
 
 * Especially given acquisition, and the dynamic nature of Zope.
 
 Finally we got it :o)
 
 Ok, the reason for me posting this question was the difficult nature.
 So I take your answer as a 'no' to my original question if anyone has
 already written such a script.
 
 Maybe this would be a good thing to accompany future Zope versions.
 There could be a tab which shows all objects which are called
 explicitely by the actual one in a sortable list.
 
 By the way: is this the correct mailing list for such suggestions?
 If not, which one is it?

You forgot to post my suggestions:


You can use Zope Find to get a list of them, and then manually audit 
them. You could instrument such methods to output logging, and check the 
logs every so often to see what is typically being used.

You could use Zope Find to see if the name of particular methods is used 
within other methods.

--
Steve Alexander


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



Re: [Zope-dev] Proxy Object / __getattr__ / Acquisition

2002-08-29 Thread Steve Alexander

[EMAIL PROTECTED] wrote:
 I am trying to implement a proxy class (specifically for the purposes of
 multi-versioned document objects (folderish proxies that contain the object
 that they proxy to).  I am using __getattr__ within my product, and the code
 pasted below works, and does not break Implicit acquisition (because the
 object that _CurrentVersion points to is subclassed from SimpleItem, which
 implements Implicit Acquisition). However, because of the way that this
 messes with Acquisition, certain things like accessing the ZMI pages or
 acquired methods can be quite slow (but work).  I suspect that this is
 because an instance of this class actually acquires items through the item
 it proxies to, which conveniently is contained inside it, which makes
 acquisition work for the instance of this class (albeit magnitudes slower).
 
 I would really like to make this perform better and act properly, but I'm at
 a loss as to the right way to do this.  Thoughts?
 
 Sean
 
 class MVProxy(Folder):
 
 Object acting as proxy to multiple document
 implementations serving for each version of this
 document; this is a proxy object class
 Subclasses OFS.Folder.Folder
 
 def __init__(self, id, title=''):
 self.id = id
 self.title = title
 timestamp = str(int(time.mktime(time.localtime(
 currentId = id+'_'+timestamp
 current = DocumentCoreImpl(currentId, title)
 self._setObject(currentId, current)
 self._CurrentVersion = current
 
 def __getattr__(self, name):
 return getattr(self._CurrentVersion, name)


Can you use __bobo_traverse__ instead of __getattr__  ?

That should make things much faster.

--
Steve Alexander




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



Re: [Zope-dev] Browser Stop Button and Zope REQUESTs

2002-08-28 Thread Steve Alexander

Oliver Bleutgen wrote:

 Mod_perl also seems _not_ to stop a long running script if this script 
 doesn't try to write to the RESPONSE (or whatever they call it). The 
 perl test script I posted does write output, and this causes it to stop. 
 If I try a script with no output, it never gets stopped.
 
 Java servlets also seem only to get stopped automatically if they try to 
 write into the RESPONSE stream of a closed connection. Buffering aside, 
 if you try to output something in a servlet and the connection is 
 closed, you get an exception.
 
 Im my uninformed opinion, Zope should do the same.
 
 Is this possible?

Although Zope has a response stream method of sending information back 
to the client, most things in Zope don't use it.

Instead, the response information is aggregated, converted into a 
string, and then sent back all at once at the sucessful completion of 
the transaction.

These other systems you mention are using the availability of a response 
stream as a surrogate for RESPONSE.isClientConnected(). I'd rather have 
an explicit RESPONSE.isClientConnected().
Although, it would make sense to raise an exception if someone tried to 
write to the Zope response stream, in the rare cases when this does happen.

--
Steve Alexander


___
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] bad bare except in PageTemplateFile.py

2002-07-18 Thread Steve Alexander

Shane Hathaway wrote:
 
 os.stat() raises OSError if the file is not found, in which case mtime 
 should be set to 0.

Surely if the file is not found, that's an error because the 
PageTemplateFile is pointing at a source file that doesn't exist.

I cannot think of any reason I'd want not to be informed that the source 
file for a PageTemplateFile isn't there. That's clearly a programming error.

So, I suggest removing the try: except: clause entirely, and letting 
os.stat() raise its error.

Or, am I missing something here?

--
Steve Alexander



___
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] bad bare except in PageTemplateFile.py

2002-07-18 Thread Steve Alexander

Shane Hathaway wrote:
 
 I vaguely recall having a similar discussion with someone regarding 
 DTMLFile, and we decided it had to ignore missing files, but I don't 
 remember why.

Darn... that'll be just the reason I'm looking for!


 Also, the open() call just below that line will raise an 
 equivalent exception.

For some reason, the code was not getting there when I came across this 
problem. I guess this 'if' expression must have evaluated true.

 if hasattr(self, '_v_program') and mtime == self._v_last_read:
 return

I'm not sure why it would have done so though.

--
Steve Alexander



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



Re: [Zope-dev] Last-modified and bobobase_modification_time

2002-06-18 Thread Steve Alexander

Wei He wrote:
 On Tue, 18 Jun 2002, Oliver Bleutgen wrote:
 
 
Would please go a little bit deeper giving an example what information 
HEAD requests don't pass to the server, although it's beyond this topic.

HEAD requests are required to have no side effects. On the other hand 
they are required to return the same response as GET requests without 
the BODY.
So GET returning another last-modified header than HEAD would be in 
violation of the RFC. This gets worse by the fact that HEAD can be used 
for caching purposes.
 
 
 Totally understood. But the question is what RFC says about the 
 last-modified header. Shouldn't it reflect the latest update? Zope is 
 facing this problem because it handles the HEAD request seperately. 
 Am I right?
 
 I don't see any need to seperately handle the HEAD request. My hacking of 
 the last-modified header is done execpt that HEAD and wget -S returns 
 different headers. I think the last step is to change the HEAD handling 
 routine to the get information from GET. Does anyone have any idea?

If you *really* want to, you can run a HEAD just like a GET, but after 
getting your last-modified and other details, abort the transaction to 
undo side-effects, then return the HEAD response.

I would generally recommend against this, as it may end up being rather 
expensive.

--
Steve Alexander




___
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] Crash Burn with Zope 2.6.0a1 and ZEO 2.0a1

2002-06-18 Thread Steve Alexander

Andrew Sydelko wrote:
 
The errors in the log are all about failures to import specific
modules.  (Let me know if I missed something else.)  

Failed to import class Splitter from module
Products.PluginIndexes.TextIndex.Splitter.ZopeSplitter

When I import Products...ZopeSplitter, I see a module with a Splitter
attribute bound to a function.
 
 
 I don't understand what you're saying here. Do you mean it works
 without complaining for you? In the past I have deleted all the
 Products that were in the Products Control Panel to fix a similar bug.
 Is that the case here as well?

I explained in the Collector how to fix this problem back in March.

http://collector.zope.org/Zope/181

--
Steve Alexander




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



Re: [Zope-dev] Last-modified and bobobase_modification_time

2002-06-14 Thread Steve Alexander

Casey Duncan wrote:
 BTW: This list if for development *of* Zope, the [EMAIL PROTECTED] list is
 better for questions bout developing *with* Zope.
 
 On to your question:
 
 There is no automatic way in which DTML can do this for you. This is
 simply because dtml-var foo doesn't tell Zope what foo is. Is it a
 document or a script that returns something different every time it is
 called or something else? In fact foo might different things at
 different times, if you aquire the template into different contexts.
 
 Anyhow, if you really want to set a Last-Modified header that reflects
 the latest of a group of documents, you can write a python script that
 accepts either a list of names or objects to test. For the latter here's
 a Py script named setLastModTime with a single argument, *objects:
 
 last_mod = objects[0].bobobase_modification_time()
 for ob in objects[1:]:
 last_mod = max(last_mod, ob.bobobase_modification_time())
 context.REQUEST.RESPONSE.setHeader('Last-Modified', last_mod.rfc822())
 return last_mod # for debugging purposes
 
 Then from dtml:
 
 dtml-call expr=setLastModTime(this(), fooMethod, barDocument, ...)

A similar approach would be for each page fragment to set the 
Last-Modified head if either there is no header set, or its own 
last-modified time is later than one that is set.

--
Steve Alexander






___
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] Problem testing CatalogAware class

2002-06-07 Thread Steve Alexander

Vincenzo Di Somma wrote:
 Hi all,
 does someone knows about problems testing CatalogAware subclasses ?
 I have unit tests for my class and work well, but if I subclass also
 from CatalogAware I receive:

Don't use CatalogAware, use CatalogPathAware.

--
Steve Alexander




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



Re: [Zope-dev] How to override __getattr__ and not break acquisition

2002-06-05 Thread Steve Alexander

Erik A. Dahl wrote:
 Ok I need to override __getattr__ in one of my product classes.  I'm 
 sure this is killing acquisition

yes

 but not sure about the persistence 
 stuff (I think this is working).

it will still work

  Is there a way to make this work? 

yes

 Here  is what I'm doing:
 
 def __getattr__(self, name):
if name == 'myattr':
return self.myattr()

if your return value knows about acquisition, you need to it by calling 
__of__:

  def __getattr__(self, name):
 if name == 'myattr':
 return self.myattr().__of__(self)


 I assume that somewhere in the Acquisition code there is a __getattr__ 
 but I can't find it.

it is implemented in C.


--
Steve Alexander




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



Re: [Zope-dev] Zope 3 Installation

2002-06-03 Thread Steve Alexander

Eddie Moench wrote:
 Can someone tell me, how to get the Zope 3 (from the CVS) up and
 running?
 
 After correcting the verify-import (there was a case-problem), I get the
 error message cannot import name Interface by the command from
 Interface import Interface - which is called by many scripts. Does
 anyone had the same problem and knows a solution?

Please describe exactly the steps you took, starting with the command 
you used to check out Zope 3 from CVS.


If you want in-person advice, there are people on the #zope irc channel 
who have successfully installed Zope 3 from CVS.

--
Steve Alexander



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



Re: [Zope-dev] Re: Zope logic

2002-05-31 Thread Steve Alexander

Tim Hoffman wrote:
 
 However the most problems I have had, are with poorly thought out or
 poorly documented object hierarchies, 

You mean class hierarchies.

 so that it is not obvious or clear
 where and when you should override methods, try manage_afterClone some
 time, and I know this isn't an acquisition problem, or overriding some 
 of the default behaviour for FTP methods. The lack of documented
 approach is far worse than the enforced acquisition, IMHO ;-)

You'll like Zope3 then. There is no dependency on class hierarchies. 
The inheritance hierarchies throughout are either very shallow or 
non-existent.

However, none of the power of expressing the affordances of objects is 
lost. Instead, this is expressed through the interfaces an object 
implements, which can be definied either in your class definitions, or 
elsewhere in zcml or in other classes/interfaces.


 If how these things work and how to use them, was well documented,
 then strangeness with acquisition wouldn't be so strange, ie 
 it would be documented and you could get your head around it.

There is only so much complexity that I can handle at a time. Often 
working on what should be an isolated part of Zope2 exceeds that threshold.


 (I think we will be in a much better position with Zope 3)

:-)


--
Steve Alexander






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



Re: [Zope-dev] Zope logic

2002-05-30 Thread Steve Alexander

Toby Dickenson wrote:
 
 My conclusions are:
 
 a. implicit acquisition is dangerous
 
 b. acquisition that searches outside the containment hierarchy is evil.
 
 
 Im not keeping up with Zope 3 development. how does Zope 3 handle 
 acquisition?

There is no implicit acquisition in Zope 3. If there ever is, it will 
only be there as part of a Zope 2 compatibility library.

Generally if you want something to be acquired by content that lies 
below it, you make that something a a View, a Resource, or a Utility, or 
a Service, or some other such thing.

There is also an acquire namespace for paths and URLs. I haven't had 
cause to use that though.

You make a choice as to what you want as Content and what you want as 
behind-the-scenes plumbing.

--
Steve Alexander




___
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] stacks != easy to explain

2002-05-15 Thread Steve Alexander


Adrian Hungate wrote:

Whereas XML attributes, order indeterminisim,


Chris Withers wrote:
 
...Solved by making it absolutely clear what order stuff executes in. If I
 was training people, I'd tell them to write it in that order too...

Don Hopkins wrote:
 You can't make the order of XML attribute execution clear, because they are
 defined as unordered.
 
 If you're using ordered attributes, then you're not using XML.

Indeed, and if your indentation is meaningful in your C source-code, 
you're not using C.

However, that doesn't negate the benefit of a consistent coding style.

--
Steve Alexander




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



Re: [Zope-dev] Re: [ZPT] Order of attribute execution Feature Request

2002-05-10 Thread Steve Alexander

Tim Hoffman wrote:
 
 In addition event handlers in html ie onClick onBlur etc
 are all order independant.
 
 now adding tal: attributes that where order dependant would seem
 to fly in the face of that convention. (Admittedely there are probably
 no strange dependancies that could be introduced with different orders 
 of border, src etc)

Indeed. It isn't just a convention. The order of attributes within an 
XML or SGML tag is explicitly defined not to matter.

Two important properties of attributes within a tag are that they are 
unordered, and they are unique.


http://aspn.activestate.com/ASPN/Mail/Message/xml-dev/666339

--
Steve Alexander



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



Re: [Zope-dev] Can I get rid of standard_template.pt?

2002-05-10 Thread Steve Alexander

Lennart Regebro wrote:
 I'm not using it, and will never use it, so why does Zope 2.5.1 always
 create one for me?
 Grrr. Highly annoying. :-[

 From Zope 2.1.3 (when I started Zopeing), I could write a Python 
Product that expected standard_html_header and standard_html_footer to 
exist.

 From Zope 2.5.1, I can write a Python Product that expects 
standard_template.pt to exist.

--
Steve Alexander




___
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] Don't try to improve or reinvent XML. Stick withthe standard.

2002-05-10 Thread Steve Alexander

Don Hopkins wrote:
 From: Marc Lindahl [EMAIL PROTECTED]
 
You would need something to close off the 'if' statement, otherwise, a
document full of 'if' statements and no 'else' ones could fill up a

 stack
 
needlessly.

What's so bad about that?  The stack wouldn't carry over after
 
 html/html
 
or body/body - couldn't practically more than 1000's - insignificant!
 
 
 If you're not going to use correct XML syntax, which REQUIRES balanced tags,
 then you shouldn't use a syntax that looks like XML but isn't.


I don't think that's what was originally suggested.

I think what was originally suggested is that an 'if' *element* would 
leave something on the interpreter's stack, for use by an 'else' element 
later.

So, the document remains well-formed, but there is a coupling between 
non-contained elements.

--
Steve Alexander




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



Re: [Zope-dev] Re: [Zope] [PATCH] to Zope's Management Interface

2002-04-29 Thread Steve Alexander

Jerome Alet wrote:
 
 Perhaps you could tell me if I have to use the App.Hotfixes interface or
 not when doing such a not-Hotfix thing.


You should certainly not use the App.Hotfixes interface for this.

The App.Hotfixes interface is for registering dynamic patches that will 
become part of Zope in a future release, at which point the dynamic 
patch can be removed.

While you are dynamically extending Zope, I don't think there are any 
plans to incorporate this into the core Zope distribution.

--
Steve Alexander



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



Re: [Zope-dev] Re: [Zope] [PATCH] to Zope's Management Interface

2002-04-29 Thread Steve Alexander

Jerome Alet wrote:
 On Mon, 29 Apr 2002, Steve Alexander wrote:
 
 
You should certainly not use the App.Hotfixes interface for this.

The App.Hotfixes interface is for registering dynamic patches that will 
become part of Zope in a future release, at which point the dynamic 
patch can be removed.
 
 
 ok, so if I understand correctly all I have to do to make a not-hotfix
 product is just do an unconditionnal assignment of my new complete
 main.dtml file to ObjectManager.ObjectManager.manage_main in my product's
 __init__.py file ?
 
 am I right ?


I'm not sure whether that will be sufficient.

If the ObjectManager class has already been initialized, then its 
security declarations will have been applied to the preexisting main 
DTMLFile object.

In which case, you'll have to re-initialise the class, or process your 
own security declarations, or something like that.

Then again, it might just work.

Try it and see.

--
Steve Alexander






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



Re: [Zope-dev] Re: [Zope] [PATCH] to Zope's Management Interface

2002-04-29 Thread Steve Alexander

Hannu Krosing wrote:

As always any comment is very welcome.
 
 Have you thougth of making this a Hotfix instead of patch ?

Please don't call this a hotfix. That term is reserved for products 
that fix important bugs (especially security bugs) in Zope.

A product can dynamically patch things, using the same mechanism as a 
Hotfix. However, use of this mechanism does not qualify a product as a 
Hotfix.

The terms monkeypatch and dynamic patch have been used to describe 
this mechanism. Please use one of these in preference to Hotfix.

--
Steve Alexander



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



RE: [Zope-dev] RE: [Zope] [PATCH] to Zope's Management Interface

2002-04-29 Thread Steve Drees

It's most likely IE 'helping' out and ungzipping on the fly.

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
 Of Jerome Alet
 Sent: Monday, April 29, 2002 8:18 AM
 To: Roel Van den Bergh
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: [Zope-dev] RE: [Zope] [PATCH] to Zope's Management Interface


 On Mon, 29 Apr 2002, Roel Van den Bergh wrote:

  The download file at
  http://www.librelogiciel.com/software/ZShell/tarballs/zshell-1.42.tar.gz
  cannot be opened on W2K with Winzip 8.0 (tested on several different
  machines)

 could you download it again ?

 I've tested here (no windows, sorry) and it's ok, file size is 46686 bytes
 and md5sum is :

 6efb9c10e532d534fb843354ac28c5bb

 maybe it was corrupted during the download phase.

 hth.

 Jerome Alet



 ___
 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 maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] zope/python question

2002-04-24 Thread Steve Alexander

Dirk Datzert wrote:
 Hi,
 
 I saw in some products a __of__ operator and looked at the python.org
 for a documentation.
 
 I didn't found one.
 
 Can anybody tell me what the __of__ does ?

It creates an acquisition wrapper for the object the method belongs to, 
in the context of the object you pass as the argument.

It is part of the Extension Class package.


 Or tell me a URL for the documentation of the __of__ operator ?

http://cvs.zope.org/~checkout~/Zope/lib/Components/ExtensionClass/doc/Acquisition.stx?rev=HEAD

http://cvs.zope.org/~checkout~/Zope/lib/Components/ExtensionClass/doc/ExtensionClass.stx?rev=HEAD


--
Steve Alexander



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



RE: [Zope-dev] PHP vs Zope cost benefit

2002-04-23 Thread Steve Drees

 
  Plus the over head of running Zope instances is greater than 
 PHP scripts.  

Is this really ture for anything non-trivial?


___
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] _v_ and ZEO

2002-04-18 Thread Steve Alexander

Florent Guillaume wrote:
 
 Or am I misunderstanding something ? My question really relates to any
 use of _v_ as a cache that can survive on publisher transaction, really.
 Should _v_ never be used like that ?

There's a case to be made for attributes that not persisted (like _v_ 
attributes) and are cleared at transaction boundaries.

--
Steve Alexander



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



Re: [Zope-dev] how bad are per-request-write-transactions

2002-04-18 Thread Steve Alexander

Jeremy Hylton wrote:
CM == Chris McDonough [EMAIL PROTECTED] writes:

 
Completely agreed.  My disagreement is portraying the counter
problem as impossible with the zodb.  I think some people, as
evidenced by some of the responses, are willing to live with the
tradeoffs.  Other people will find managing a log file on disk to
be a more manageable solution.
 
   CM It would be best to make make a dual-mode undoing and nonundoing
   CM storage on a per-object basis.
 
 I'd really like to do this for ZODB4, but it seems hard to get it into
 FileStorage, without adding automatic incremental packing to
 FileStorage.

This might be possible without incremental packing, if the object will 
be of a fixed size.

I'm thinking of a simple counter here, something like:

class Counter(object):

   __slots__ = ['__count']

   def __init__(self):
 self.__count = 0

   def increment(self):
 self.__count += 1

   def getValue(self):
 return self.__count

Now, imagine that Counter was somehow Persistent too. (There would need 
to be a few more _p_... declarations in __slots__, and possibly some 
changes in the persistence machinery to allow for slots based instances 
as well as __dict__ based ones.)

I would naively expect a pickle of Counter instance to always remain the 
same size. Therefore, it could be updated in-place.

Of course, this would break various other nice behaviours of FileStorage.


Another variation on the same theme: have a fixed-size external 
reference instead of the object's pickle. The fixed-size reference 
points to a separate some_object.pickle file which contains the pickle 
for that one object. The some_object.pickle file gets overwritten on 
each update.

--
Steve Alexander





___
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] Future of ZPatterns

2002-04-15 Thread Steve Spicklemire

Hi Marcello,

Wow.. sounds like a neat book. ;-) Seriously, Phil Eby has 
suggested that there will be some sort of migration helpers to move from 
ZPatterns to TransWarp (www.eby-sarna.com):

http://www.eby-sarna.com/mailman/listinfo/transwarp

http://cvs.eby-sarna.com/TransWarp/

Also.. Zope3 will have a some kind of Zope2 compatability layer, so in 
principal, it should be possible to move ZPatterns apps to Zope2 using 
the compatability layer. I, for one, have a slew of ZPatterns apps out 
there, so I will be motivated to do something about migration.

-steve

On Monday, April 15, 2002, at 02:11 PM, Marcello Parra Martins wrote:

 Hello,
  
 I'm new to Zope. I'm studing 'Zope Web Application Develepment and 
 Content Management' book.
 Many of the examples of the book uses ZPatterns.
 I saw in past messages that ZPatterns will not be supported in Zope3.
  
 Is this true ?? If I create a product based on it, will it be a lost of 
 time ???
  
  
 Thanks,
  
 Marcello Parra
  
  



___
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] Separate staging and development areas for a product

2002-04-15 Thread Steve Spicklemire


I think it's worth having a completely separate Zope. Otherwise there's 
no way to separate development and staging versions of filesystem based 
products. You might be interested in ZSyncer, or ZCVSFolder for 
synchronization.

-steve

On Monday, April 15, 2002, at 12:12 PM, Ted Skolnick wrote:

 Hi,
 I have a Zope product in development.  I want to setup a staging area 
 for
 stable releases and I am not sure how to go about it.  I could install
 another Zope in a different directory, but it seems like I should be 
 able to
 do it with the Zope instance I've got.  Any thoughts, or pointers?

 My project contains ZSQL methods and external methods, if that is
 significant.  It seems like the external methods could be a rub, since 
 they
 exist as files in the Zope installation directories (specifically in the
 Extensions directory).   I don't know how I could have multiple 
 versions of
 these files, one for development, one for staging all within one 
 instance of
 Zope.

 One lesser question, newbie question... how do I control the URL to 
 reach
 the methods exposed in my project. For example, I have a product called
 myproj, with my method.  The only URL I can get to work is this
 http://myserver/Control_Panel/Products/myproj/mymethod

 I'd like to have a URL that looks like this...
 http://myserver/myproj/mymethod   without the Control_Panel bit.

 thanks,
 Ted



 ___
 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 maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Re: [Zope] range:min bug in ZCatalogs fo Zope 2.3.2

2002-03-25 Thread Steve Alexander

Andreas Jung wrote:
 Cool... I would not have expected this to work :-)

IIRC, the range fix was one of the last maintenance tasks on the old 
Components/BTree package before it was deprecated in favour of the new 
Zope/BTrees implementation.

--
Steve Alexander





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



Re: [Zope-dev] manage frame change

2002-03-18 Thread Steve Alexander

Lennart Regebro wrote:
 From: Anthony Baxter [EMAIL PROTECTED]
 
What does machine mean? The host running the ZEO server? The host
running the ZEO client? What about those of us who run multiple ZEO
 
 clients
 
on the same machine (multi-cpu, test instances, whatever)...
 
 
 I think it should show the site name, ie, www.torped.se:1006, or
 intranet.torped.se:8080, and so on.
 That would make me know where I was editing all the tim (except when I have
 SiteRoots. I loathe the littl buggers. Grrr). :-)
 
 It is a great idea, seb.

How about making machine configurable per zope / zeo client instance 
via an environment variable. So, I can read something meaningful to me, 
and I won't have to remember exactly which servers I have running on 
which ports.

--
Steve Alexander



___
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] Replaceable types?

2002-03-17 Thread Steve Alexander

Ivo van der Wijk wrote:

 Secondly, can someone give me an example of a Replaceable object?

Any object that doesn't represent a service-kind-of-thing.

The term replaceable is used in the context of acquisition. Making 
things non-replaceable is a way of providing a particular service (say, 
a MailHost), and ensuring that this service will not be inadvertantly 
shadowed by something else (a DMTL Method perhaps) in a higher-up folder.


The concept of replaceable isn't needed in Zope 3, as services are 
kept separate from content.

--
Steve Alexander



___
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] Manual object-to-relational persistency framework

2002-03-09 Thread Steve Spicklemire

Thanks Dieter,

I think ZPatterns is certainly worth a look. It allows you to 
slice-and-dice what you want to store in ZODB or RDBMS. The best part is 
you can develop totally in ZODB, then migrate to RDB a bit at a time (if 
you like) without changing your app, or your data classes. We have 
multiple instance of the same app mixing up ZODB, RDB, LDAP etc..  since 
all the wiring of data-objects is done in configurable data managers on 
an instance by instance basis.

http://www.zope.org/Members/pje/ZPatterns

for Zope-2.[45].x see also:

http://www.cat-box.net/steve/TransactionAgents

Three chapters of our book (www.zopeonarope.com) are devoted to 
implementing ZPatterns based apps.

good luck!
-steve


On Friday, March 8, 2002, at 02:56 PM, Dieter Maurer wrote:

 Bjorn Stabell writes:
 I'm trying to use Zope without storing everything in ZODB while still
 having the perception of an object-oriented database.  I want to 
 control
 the object-to-relational mapping layer, but would like the loading and
 saving of objects to be automatic.  Is there some way to do that using
 Zope?
 Maybe ZPattern?


 Dieter

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


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



Re: [Zope-dev] Zope 2.6 planning - call for contributors!

2002-03-01 Thread Steve Alexander

seb bacon wrote:

 I think the use cases driving synchronisation requirements are not yet
 sufficiently understood.  Agreed, it's a feature that many people need,
 but I get the impression it would be premature to include ZSyncer as is
 in Zope without more detailed planning.  On the other hand, there is an
 argument which says, ZSyncer is a good product used by a lot of people,
 let's put it in Zope and deal with any issues after the event.

Yeah... maybe we need a standard Zope Expansion Kit that is a cohesive 
package of products that aren't in the Zope core, but are officially 
sanctioned and versioned and released alongside versions of Zope.

--
Steve Alexander



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



Re: [Zope-dev] Re: Zope vs. Cocoon

2002-02-25 Thread Steve Alexander

Max M wrote:
 seb bacon wrote:
 
 Architecturally, it is *excellent*, and I'm very excited about it.  I
 could wax on for hours, but I won't right now.

 
 
 I only wish somebody would ... It is hard to figure it out fully by 
 reading only the online documentation.

Do the tutorial:

http://cvs.zope.org/Docs/Docs.tar.gz?tarball=1

--
Steve Alexander


___
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] Defining Interfaces

2002-01-28 Thread Steve Alexander

Adrian Hungate wrote:
 This is based on the new Python 2.2 stuff, isn't it? I would guess the
 answer would be You exclude the 'self' first arg in a class method.

Not really. You exclude the self first argument of a static method. 
The first argument of a class method is where the class is passed.

The reason that self is now excluded when defining interfaces comes 
from considering who reads interface definitions.

By their nature, interfaces are meant to be read from the outside; 
from beyond the facade. The self attribute of methods is an 
implementation detail, and is not a concern of those who make calls on 
an interface.

With Python2.2, you can demonstrate this by defining a class that has 
static methods only, but which still satisfies some interface 
definition. The self argument need not occur at all.

--
Steve Alexander


___
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] Defining Interfaces

2002-01-27 Thread Steve Alexander

Hi folks,

When I define an Interface, are the methods of the interface supposed to 
have self as the first argument?

It certainly seems that way from 
./lib/python/AccessControl/IUserFolder.py in Zope2.  It also seems that 
way from the Interface Interface.

However, many of the interfaces in Zope3 omit the self argument.


--
Steve Alexander




___
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] Defining Interfaces

2002-01-27 Thread Steve Alexander

Jeffrey P Shell wrote:
 On 1/27/02 11:25 AM, Steve Alexander [EMAIL PROTECTED] wrote:
 
 
Hi folks,

When I define an Interface, are the methods of the interface supposed to
have self as the first argument?

 
 No.

In which case, perhaps we should change InterfaceInterface and 
InterfaceBaseInterface from Interface/iclass.py to reflect this.

The ZDG should also be updated to reflect this, as the example is wrong.

   http://www.zope.org/Documentation/ZDG/ComponentsAndInterfaces.stx

  from Interface import Base

   class Hello(Base):
The Hello interface provides greetings. 

   def hello(self, name):
Say hello to the name 

   class HelloComponent:

   __implements__ = Hello

   def hello(self, name):
   return hello %s! % name


Shall I throw this into the Collector?

--
Steve Alexander



___
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] Security Gurus Wanted

2002-01-19 Thread Steve Alexander

vio wrote:
 Just a word to thank you for your reply. 
 But incidently, wouldn't it be a good idea for Globals.InitializeClass() 
 to throw an error
 or a warning of some kind for hanging 'security.stuff()' declarations,
 declarations which do not have a related ClassSecurityInfo object AT THE
 CLASS LEVEL? 

That would be a fine idea. Unfortunately, there is no straightforward 
way telling that you called methods on the security object in the class 
definition.

When you call Globals.InitializeClass(your_class), it looks for a 
ClassSecurityInfo object, and doesn't find one.

The fact that your class definition had the side-effect of altering the 
module's security object doesn't leave any traces in the class object 
that results from your definition.

--
Steve Alexander


___
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] Security Gurus Wanted

2002-01-19 Thread Steve Alexander

vio wrote:

deletia

 So Globals.InitializeClass(your_class) finds the declaration 
 'security.declareSomething()' inside a class, but 'security' being
 a reference to a ClassSecurityInfo object AT THE MODULE LEVEL somehow has 
 no effect at the class level (while I wrongly thought that by declaring it
 at the module level like that, it will behave more or less like a 'global'
 variable).

deletia

 In my opinion, Globals.InitializeClass() should check such calls to
 security methods

You appear not to understand how Python and the declarative security 
system in Zope work.

Globals.InitializeClass() does not read the source to your modules. You 
would need some sort of lint tool to perform the checking you describe.


Why not try to implement a simple case of the error-correcting system 
that you describe? You might want to extend an existing lint tool such 
as PyChecker, to take account of conventions used in Zope products.

   http://pychecker.sourceforge.net/

--
Steve Alexander


___
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] increase penis size by an average of 26% sex drive also

2001-12-30 Thread Steve Alexander

River wrote:

 * Extend http://www.cable-descramblers- etc.com/extendprice.html *
 
 Natural formula that is guaranteed to increase
 penis size by an average of 26%. 
 
 * Get RESULTS NOW with *EXTEND http://www.cable-descramblers- 
 etc.com/extendprice.html*! **
 
 ** Thicker **
 
 ** Longer **
 
 ** Confidence-building penis  **
 
 ** Increased sexual stamina **
 
 ** Fullness with every stroke **
 
 ** Deeper penetration **
 
 ** Superior sexual stamina that you and your sexual partner have 
 always imagined **
 
   CLICK UNDERLINED LINK TO RECEIVE INFORMATION  



Please submit this patch to the collector, and I'll see what I can do to 
get it into the Zope core.

--
Steve Alexander


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



RE: [Zope-dev] Re: User Groups

2001-12-17 Thread Steve Drees

  A role is essentially a group.
 
 I think the general consensus is that a role is not essentially 
 a group although
 the two can be easily confused ;-)
 
 If you have a role, you're in a group - the group
 of all people with that role.
 
 My apologies for having included the world in my
 reply.  I was thinking that I was replying to a
 more limited group.

You must have used the wrong role ;)

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



Re: [Zope-dev] zope collector is broken

2001-12-10 Thread Steve Alexander

Florent Guillaume wrote:

 Okay it seems fixed, but I wanted to mention a similar user-experience
 problem in CMF and workflows in general:
 
 Suppose a user clicks publish in the action box, enters his comment
 and then clicks the Publish button. And the re-clicks on the Publish
 button (either because he double-clicked, or because he retried because
 the process seemed slow). Then the first click will correctly change the
 object state, and the second click will be unable to publish because
 from the public state there is (obviously) no further publish
 transition. So the user will get a message like the one below.
 
 Because I saw that these double-clicks are somewhat frequent in our
 case, I put a try: except: in content_status_modify.


For one of my applications (not CMF based), I use unique form ids to 
catch if a form is submitted twice.

I also use a bit of javascript to ignore a second click on the submit
button, which reduces the load on the form-ids manager. I'd post the 
javascript... but I can't find it just now. It is just a three-liner  to 
set a variable when the button is first clicked, and only allow the 
submit action to run if the variable is unset.

Actually, now that CST is in the Zope core, I should rewrite the form-id 
manager to take advantage of that.

--
Steve Alexander



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



  1   2   3   4   5   6   7   8   >