Re: [Zope] Florent Guillaume's database Conflict Error on session objects patch not working ?

2007-02-02 Thread Dieter Maurer
yacine chaouche wrote at 2007-2-2 14:39 +0100:
> ...
> As discussed  here :
> http://mail.zope.org/pipermail/zope/2007-January/170151.html
> and continued here :
> http://mail.zope.org/pipermail/zope/2007-January/170156.html
> 
> I am experiencing issues regarding a database ConflictError on session 
> objects.

Hm, I have issues with your problem descriptions...

  The referenced links above do not refer to conflict errors
  but to "XMLRPC and strace".

  Then, too, I had great difficulties to understand your problem...

> ...
>It is not a ReadConflictError, nor a
>WriteConflictError. It is a "ConflictError: database conflict error".

A "ConflictError" is in fact a "WriteConflictError".

>I am aware that conflicts occure up to 20% of the time, but in my case
>it is almost 100% in this specific situation !

You can easily achieve almost sure conflicts.

We did once with a frame based solution:

   All frames in a frameset accessed the session and tried
   to store some information in it.

   As the browser requested the frames concurrently, there
   was a very high probablity for conflicts.

In our case, there was no real need for most of the frames
to access the session. Removing the unnecessary accesses removed
the problem.

But, if the frames had a real need to store something in the
session, we would have to use persistent subobjects in the session
to separate the access of the various frames into different objects.

>If I do not use the session object in my code, I have no errors at all
>and everything just goes fine.

Then, you are using some add-on component that *is* using the session
object.

If the session is not used, there will be no session
related conflict error.

>Any idea on how to debug this ? Florent, maybe ?  someone help me ! I
>am stuck on this for 2 weeks now.

You could try to delete "/temp_folder/session_data" temporarily
(it will be recreated on the next Zope startup) to find out
which component does use sessions.



-- 
Dieter
___
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] zope, webdav, ical, vcalendar, etc.

2007-02-02 Thread Erik Myllymaki
I am trying to dynamically create iCalendar or vCalendar files.

I can do this with a Zope Page Template, naming it myCalendar.ics. When
myCalendar.ics is accessed through a web browser, iCal pops up and asks
what I want to do with the calendar info, etc. and all is well.

But what I would like to do is use iCal or thunderbird( lightening ) to
subscribe to the calendar so that updates are handled automatically. For
iCal to do this, it wants to access the ics file via webdav.

So I attempt to connect to zope via its webdav port and request the sale
zpt, but of course it sends it as its source, not as the rendered
calendar. If i take out all the TAL and just have a static vCalendar or
iCalendar file then this works via webdav but my whole reason for doing
this is so that I can populate the calendar with events form a RDBMS
when the myCalendar.ics template is called.

Your ideas appreciated.




___
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] Limiting access to a Zope Site

2007-02-02 Thread Maciej Wisniowski

> There should be no problems copying/moving a Data.fs file from one
> zope instance to another, especially if both instances are running the
> same version of Zope!
Technically no but it is really strange and I believe bad (if not
impossible)
way to distribute application among dev, test, production environments...

For me there should of course be another developement Zope instance
(and test instance and more), but application should be moved between
instances by 'copying' changed Products or exporting changed files/folders
from ZODB (.zexp files), or something like that.

I'm not sure how it is in Plone but I don't believe in moving data.fs :)

-- 
Maciej Wisniowski


>
> Jonathan [the other]
> ___
> 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 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] Limiting access to a Zope Site

2007-02-02 Thread Andreas Jung



--On 2. Februar 2007 19:39:58 +0100 Jens Vagelpohl <[EMAIL PROTECTED]> 
wrote:



-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On 2 Feb 2007, at 19:19, Mark, Jonathan (Integic) wrote:

It is my impression that moving a Data.fs file from one Zope
instance to another is often unreliable. Once the development and
production Zope instances differ, and by definition they will,
there could be a real problem getting the development Data.fs to
open in the production instance.


That's not right. If the software you run on both sites is identical
there will never be a problem moving databases back and forth.



That's also true with moving a Data.fs between different operating systems
like Windows or Linux (have you tried that with other databases systems? 
:-))


-aj

pgpQowlxhb9YJ.pgp
Description: PGP signature
___
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] Limiting access to a Zope Site

2007-02-02 Thread Jens Vagelpohl

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On 2 Feb 2007, at 19:19, Mark, Jonathan (Integic) wrote:
It is my impression that moving a Data.fs file from one Zope  
instance to another is often unreliable. Once the development and  
production Zope instances differ, and by definition they will,  
there could be a real problem getting the development Data.fs to  
open in the production instance.


That's not right. If the software you run on both sites is identical  
there will never be a problem moving databases back and forth.


jens



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFFw4V+RAx5nvEhZLIRAvcSAJ94Sl9PAsojUrpFZlmLa+dWk5EGFQCbBlJ2
Ybz7+QIcJM3Vch5dxpkaKto=
=5cTj
-END PGP SIGNATURE-
___
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] Limiting access to a Zope Site

2007-02-02 Thread Jonathan


- Original Message - 
From: "Mark, Jonathan (Integic)" <[EMAIL PROTECTED]>

To: 
Sent: Friday, February 02, 2007 1:19 PM
Subject: [Zope] Limiting access to a Zope Site



[The other] Jonathan writes:

"""Why don't you run two separate zope instances, one for production and 
one

for development, and set up the apache rewrite rules so that www points to
the production instance and dev points to the development instance?"""

It is my impression that moving a Data.fs file from one Zope instance to 
another is often unreliable. Once the development and production Zope 
instances differ, and by definition they will, there could be a real 
problem getting the development Data.fs to open in the production 
instance.


There should be no problems copying/moving a Data.fs file from one zope 
instance to another, especially if both instances are running the same 
version of Zope!



Jonathan [the other] 


___
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] Limiting access to a Zope Site

2007-02-02 Thread Mark, Jonathan (Integic)
[The other] Jonathan writes:

"""Why don't you run two separate zope instances, one for production and one 
for development, and set up the apache rewrite rules so that www points to 
the production instance and dev points to the development instance?"""

It is my impression that moving a Data.fs file from one Zope instance to 
another is often unreliable. Once the development and production Zope instances 
differ, and by definition they will, there could be a real problem getting the 
development Data.fs to open in the production instance. 
___
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: Florent Guillaume's database Conflict Error on session objects patch not working ?

2007-02-02 Thread Jens Vagelpohl

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On 2 Feb 2007, at 17:45, Tres Seaver wrote:

I installed faster :
1) It has no INSTALL file


You're correct.  It installs like other Zope2 products, but it  
could use

some description of how to replace the stock session manager with the
new one.


There is a INSTALL.txt on the CVS HEAD, which I put there a while ago.

jens



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFFw3GQRAx5nvEhZLIRAlKaAJ9coVr4xAlj2UF2h5Rd3dAcF7RYpwCfbo9r
gvK73yvVkZgOUFU/4QV1ehU=
=BpQY
-END PGP SIGNATURE-
___
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: Florent Guillaume's database Conflict Error on session objects patch not working ?

2007-02-02 Thread yacine chaouche

I added a new faster session object in my root folder. Once it was
created, i was on the property manager form and clicked on the test
tab and got the error reported above.

Is the request["SESSION"] object that you use in your code addressing
the classic SESSION object (in temp_folder/session_data_container) or
does it address your new session data objects ? for the latter case,
maybe i should rename the classic (zope's) SESSION object to SESSION2
or something...


Y.Chaouche


2007/2/2, Tres Seaver <[EMAIL PROTECTED]>:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

yacine chaouche wrote:
> I forward your message to the list.
>
> I installed faster :
> 1) It has no INSTALL file

You're correct.  It installs like other Zope2 products, but it could use
some description of how to replace the stock session manager with the
new one.

> 2) I created a better session manager object under the id newSession,
> and hit the test button. I Got this error :

Assuming that you mean the "Add" button on the "Test" tab, I can't
reproduce this in my Zopd 2.9-based sandbox (running on the head of the
2.9 branch).  The items get added to the list (assuming that the key is
separated from the value on the same line with a space.


> Traceback (most recent call last):
>   File "/opt/aef/Zope-2.9.0/lib/python/ZPublisher/Publish.py", line
> 113, in publish
> request, bind=1)
>   File "/opt/aef/Zope-2.9.0//lib/python/ZPublisher/mapply.py", line
> 88, in mapply
> if debug is not None: return debug(object,args,context)
>   File "/opt/aef/Zope-2.9.0/lib/python/ZPublisher/Publish.py", line
> 40, in call_object
> result=apply(object,args) # Type s to step into published object.
>   File "/opt/aef/Zope-2.9.0//lib/python/Shared/DC/Scripts/Bindings.py",
> line 311, in __call__
> return self._bindAndExec(args, kw, None)
>   File "/opt/aef/Zope-2.9.0//lib/python/Shared/DC/Scripts/Bindings.py",
> line 329, in _bindAndExec
> def _bindAndExec(self, args, kw, caller_namespace):
>   File "/opt/aef/Zope-2.9.0//lib/python/Shared/DC/Scripts/Bindings.py",
> line 348, in _bindAndExec
> return self._exec(bound_data, args, kw)
>   File 
"/opt/aef/Zope-2.9.0//lib/python/Products/PageTemplates/PageTemplateFile.py",
> line 110, in _exec
> return self.pt_render(extra_context=bound_names)
>   File 
"/opt/aef/Zope-2.9.0//lib/python/Products/PageTemplates/PageTemplate.py",
> line 104, in pt_render
> tal=not source, strictinsert=0)()
>   File "/opt/aef/Zope-2.9.0//lib/python/TAL/TALInterpreter.py", line
> 234, in __call__
> def __call__(self):
>   File "/opt/aef/Zope-2.9.0//lib/python/TAL/TALInterpreter.py", line
> 238, in __call__
> self.interpret(self.program)
>   File "/opt/aef/Zope-2.9.0//lib/python/TAL/TALInterpreter.py", line
> 281, in interpret
> handlers[opcode](self, args)
>   File "/opt/aef/Zope-2.9.0//lib/python/TAL/TALInterpreter.py", line
> 507, in do_setLocal_tal
> self.engine.setLocal(name, self.engine.evaluateValue(expr))
>   File "/opt/aef/Zope-2.9.0//lib/python/Products/PageTemplates/TALES.py",
> line 221, in evaluate
> return expression(self)
>   File 
"/opt/aef/Zope-2.9.0//lib/python/Products/PageTemplates/Expressions.py",
> line 182, in __call__
> def __call__(self, econtext):
>   File 
"/opt/aef/Zope-2.9.0//lib/python/Products/PageTemplates/Expressions.py",
> line 185, in __call__
> return self._eval(econtext)
>   File 
"/opt/aef/Zope-2.9.0//lib/python/Products/PageTemplates/Expressions.py",
> line 180, in _eval
> return render(ob, econtext.vars)
>   File 
"/opt/aef/Zope-2.9.0//lib/python/Products/PageTemplates/Expressions.py",
> line 88, in render
> raise
>   File 
"/opt/aef/Zope-2.9.0//lib/python/Products/PageTemplates/Expressions.py",
> line 85, in render
> ob = ob()
>   File "/opt/aef/Zope-2.9.0/lib/python/Products/faster/sessiondata.py",
> line 255, in addItemsToSession
> before = len(session)
> AttributeError: __len__
>
> Do you use a bug reporting system or something for your product ?

Yes, there is a collector linked of the product's homepage.

   http://agendaless.com/Members/tseaver/software/faster/

I would note that we have had the product deployed in production for two
customers for six months now, without any issues at all.


Tres.
- --
===
Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFw2qz+gerLs4ltQ4RAn4nAJ9I5kHhVtcdHHjLKQhiPpZH0/YyJwCdFrV1
X5aHzRbZHQVi1lGLH/Hkpsw=
=ufay
-END PGP SIGNATURE-


___
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/lis

[Zope] Re: Florent Guillaume's database Conflict Error on session objects patch not working ?

2007-02-02 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

yacine chaouche wrote:
> I forward your message to the list.
> 
> I installed faster :
> 1) It has no INSTALL file

You're correct.  It installs like other Zope2 products, but it could use
some description of how to replace the stock session manager with the
new one.

> 2) I created a better session manager object under the id newSession,
> and hit the test button. I Got this error :

Assuming that you mean the "Add" button on the "Test" tab, I can't
reproduce this in my Zopd 2.9-based sandbox (running on the head of the
2.9 branch).  The items get added to the list (assuming that the key is
separated from the value on the same line with a space.


> Traceback (most recent call last):
>   File "/opt/aef/Zope-2.9.0/lib/python/ZPublisher/Publish.py", line
> 113, in publish
> request, bind=1)
>   File "/opt/aef/Zope-2.9.0//lib/python/ZPublisher/mapply.py", line
> 88, in mapply
> if debug is not None: return debug(object,args,context)
>   File "/opt/aef/Zope-2.9.0/lib/python/ZPublisher/Publish.py", line
> 40, in call_object
> result=apply(object,args) # Type s to step into published object.
>   File "/opt/aef/Zope-2.9.0//lib/python/Shared/DC/Scripts/Bindings.py",
> line 311, in __call__
> return self._bindAndExec(args, kw, None)
>   File "/opt/aef/Zope-2.9.0//lib/python/Shared/DC/Scripts/Bindings.py",
> line 329, in _bindAndExec
> def _bindAndExec(self, args, kw, caller_namespace):
>   File "/opt/aef/Zope-2.9.0//lib/python/Shared/DC/Scripts/Bindings.py",
> line 348, in _bindAndExec
> return self._exec(bound_data, args, kw)
>   File 
> "/opt/aef/Zope-2.9.0//lib/python/Products/PageTemplates/PageTemplateFile.py",
> line 110, in _exec
> return self.pt_render(extra_context=bound_names)
>   File 
> "/opt/aef/Zope-2.9.0//lib/python/Products/PageTemplates/PageTemplate.py",
> line 104, in pt_render
> tal=not source, strictinsert=0)()
>   File "/opt/aef/Zope-2.9.0//lib/python/TAL/TALInterpreter.py", line
> 234, in __call__
> def __call__(self):
>   File "/opt/aef/Zope-2.9.0//lib/python/TAL/TALInterpreter.py", line
> 238, in __call__
> self.interpret(self.program)
>   File "/opt/aef/Zope-2.9.0//lib/python/TAL/TALInterpreter.py", line
> 281, in interpret
> handlers[opcode](self, args)
>   File "/opt/aef/Zope-2.9.0//lib/python/TAL/TALInterpreter.py", line
> 507, in do_setLocal_tal
> self.engine.setLocal(name, self.engine.evaluateValue(expr))
>   File "/opt/aef/Zope-2.9.0//lib/python/Products/PageTemplates/TALES.py",
> line 221, in evaluate
> return expression(self)
>   File 
> "/opt/aef/Zope-2.9.0//lib/python/Products/PageTemplates/Expressions.py",
> line 182, in __call__
> def __call__(self, econtext):
>   File 
> "/opt/aef/Zope-2.9.0//lib/python/Products/PageTemplates/Expressions.py",
> line 185, in __call__
> return self._eval(econtext)
>   File 
> "/opt/aef/Zope-2.9.0//lib/python/Products/PageTemplates/Expressions.py",
> line 180, in _eval
> return render(ob, econtext.vars)
>   File 
> "/opt/aef/Zope-2.9.0//lib/python/Products/PageTemplates/Expressions.py",
> line 88, in render
> raise
>   File 
> "/opt/aef/Zope-2.9.0//lib/python/Products/PageTemplates/Expressions.py",
> line 85, in render
> ob = ob()
>   File "/opt/aef/Zope-2.9.0/lib/python/Products/faster/sessiondata.py",
> line 255, in addItemsToSession
> before = len(session)
> AttributeError: __len__
> 
> Do you use a bug reporting system or something for your product ?

Yes, there is a collector linked of the product's homepage.

   http://agendaless.com/Members/tseaver/software/faster/

I would note that we have had the product deployed in production for two
customers for six months now, without any issues at all.


Tres.
- --
===
Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFw2qz+gerLs4ltQ4RAn4nAJ9I5kHhVtcdHHjLKQhiPpZH0/YyJwCdFrV1
X5aHzRbZHQVi1lGLH/Hkpsw=
=ufay
-END PGP SIGNATURE-
___
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] Limiting access to a Zope Site

2007-02-02 Thread Jonathan


- Original Message - 
From: <[EMAIL PROTECTED]>

To: 
Sent: Friday, February 02, 2007 10:18 AM
Subject: [Zope] Limiting access to a Zope Site



Hi.

I'm looking for several differnt approaches to probably a fairly
simple problem.

I have a Zope site running behind apache rewrite rules.

www.mysite.org

That site needs to be publically accessable.

A subdomain site (for development):

dev.mysite.org

needs to be accessable only to a team of developers, and by no one
else.

The developers may or may not have static IPs and move around quite a
bit, so limiting access to a set of IPs is not a good option.

Another possibility is making the whole (plone site) private, but
that changes some key behaviors that we are working on.

I'm looking for alternate approaches to making the subdomain only
accessable to the developer team. Any suggestions?


Why don't you run two separate zope instances, one for production and one 
for development, and set up the apache rewrite rules so that www points to 
the production instance and dev points to the development instance?  This 
way you can mess around with the development version as much as you want 
(ie. run in debug mode, start/stop zope, etc) without impacting the 
production version.


Viability of this approach will depend somewhat on the hardware you are 
running on.



Jonathan 


___
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] Limiting access to a Zope Site

2007-02-02 Thread hpinson
Hi. 

I'm looking for several differnt approaches to probably a fairly 
simple problem.

I have a Zope site running behind apache rewrite rules.

www.mysite.org

That site needs to be publically accessable.

A subdomain site (for development):

dev.mysite.org 

needs to be accessable only to a team of developers, and by no one 
else.

The developers may or may not have static IPs and move around quite a 
bit, so limiting access to a set of IPs is not a good option.

Another possibility is making the whole (plone site) private, but 
that changes some key behaviors that we are working on.

I'm looking for alternate approaches to making the subdomain only 
accessable to the developer team. Any suggestions?



-- 
Harlow Pinson
Indepth Learning
Email: [EMAIL PROTECTED]
Phone: 505 994-2135
Fax: 505 994-3603

___
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: Florent Guillaume's database Conflict Error on session objects patch not working ?

2007-02-02 Thread yacine chaouche

I forward your message to the list.

I installed faster :
1) It has no INSTALL file
2) I created a better session manager object under the id newSession,
and hit the test button. I Got this error :



Traceback (most recent call last):
 File "/opt/aef/Zope-2.9.0/lib/python/ZPublisher/Publish.py", line
113, in publish
   request, bind=1)
 File "/opt/aef/Zope-2.9.0//lib/python/ZPublisher/mapply.py", line
88, in mapply
   if debug is not None: return debug(object,args,context)
 File "/opt/aef/Zope-2.9.0/lib/python/ZPublisher/Publish.py", line
40, in call_object
   result=apply(object,args) # Type s to step into published object.
 File "/opt/aef/Zope-2.9.0//lib/python/Shared/DC/Scripts/Bindings.py",
line 311, in __call__
   return self._bindAndExec(args, kw, None)
 File "/opt/aef/Zope-2.9.0//lib/python/Shared/DC/Scripts/Bindings.py",
line 329, in _bindAndExec
   def _bindAndExec(self, args, kw, caller_namespace):
 File "/opt/aef/Zope-2.9.0//lib/python/Shared/DC/Scripts/Bindings.py",
line 348, in _bindAndExec
   return self._exec(bound_data, args, kw)
 File 
"/opt/aef/Zope-2.9.0//lib/python/Products/PageTemplates/PageTemplateFile.py",
line 110, in _exec
   return self.pt_render(extra_context=bound_names)
 File "/opt/aef/Zope-2.9.0//lib/python/Products/PageTemplates/PageTemplate.py",
line 104, in pt_render
   tal=not source, strictinsert=0)()
 File "/opt/aef/Zope-2.9.0//lib/python/TAL/TALInterpreter.py", line
234, in __call__
   def __call__(self):
 File "/opt/aef/Zope-2.9.0//lib/python/TAL/TALInterpreter.py", line
238, in __call__
   self.interpret(self.program)
 File "/opt/aef/Zope-2.9.0//lib/python/TAL/TALInterpreter.py", line
281, in interpret
   handlers[opcode](self, args)
 File "/opt/aef/Zope-2.9.0//lib/python/TAL/TALInterpreter.py", line
507, in do_setLocal_tal
   self.engine.setLocal(name, self.engine.evaluateValue(expr))
 File "/opt/aef/Zope-2.9.0//lib/python/Products/PageTemplates/TALES.py",
line 221, in evaluate
   return expression(self)
 File "/opt/aef/Zope-2.9.0//lib/python/Products/PageTemplates/Expressions.py",
line 182, in __call__
   def __call__(self, econtext):
 File "/opt/aef/Zope-2.9.0//lib/python/Products/PageTemplates/Expressions.py",
line 185, in __call__
   return self._eval(econtext)
 File "/opt/aef/Zope-2.9.0//lib/python/Products/PageTemplates/Expressions.py",
line 180, in _eval
   return render(ob, econtext.vars)
 File "/opt/aef/Zope-2.9.0//lib/python/Products/PageTemplates/Expressions.py",
line 88, in render
   raise
 File "/opt/aef/Zope-2.9.0//lib/python/Products/PageTemplates/Expressions.py",
line 85, in render
   ob = ob()
 File "/opt/aef/Zope-2.9.0/lib/python/Products/faster/sessiondata.py",
line 255, in addItemsToSession
   before = len(session)
AttributeError: __len__

Do you use a bug reporting system or something for your product ?

Thank you,

Y.Chaouche


2007/2/2, Tres Seaver <[EMAIL PROTECTED]>:



-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

yacine chaouche wrote:
> Hi all,
>
> As discussed  here :
> http://mail.zope.org/pipermail/zope/2007-January/170151.html
> and continued here :
> http://mail.zope.org/pipermail/zope/2007-January/170156.html
>
> I am experiencing issues regarding a database ConflictError on session 
objects.
>
> I use zope 2.9.0 python 2.4.2, and the code of the MultiDB support has
> been patched (as suggested by Florent Guillaume)
> http://mail.zope.org/pipermail/zodb-dev/2006-January/009737.html
>
> My main concern is to debug my application where, on every couple of
> requests coming from two different browsers at the same time (before
> the first request is , one of them wins and the other always fails and
> raises a conflict error. It is not a ReadConflictError, nor a
> WriteConflictError. It is a "ConflictError: database conflict error".
> I am aware that conflicts occure up to 20% of the time, but in my case
> it is almost 100% in this specific situation !
>
> If I do not use the session object in my code, I have no errors at all
> and everything just goes fine.
>
> Any idea on how to debug this ? Florent, maybe ?  someone help me ! I
> am stuck on this for 2 weeks now.
>
> NOTE : I do not use Zeo, nor frames.

You might try 'faster', an alternative ZODB-based sessioning
implementation:  one of its goals is to reduce the chance of collisions
compared to the stock implementation:

  http://agendaless.com/Members/tseaver/software/faster/


Tres.
- --
===
Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFw0aj+gerLs4ltQ4RAuDLAJ9VXpLtmnr5EwYMV1AkS1Gxa0lvmwCgoGIv
hkn26PUMSmmBKO8nDYFdmkU=
=n+Qz
-END PGP SIGNATURE-



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or

[Zope] Re: Florent Guillaume's database Conflict Error on session objects patch not working ?

2007-02-02 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

yacine chaouche wrote:
> Hi all,
> 
> As discussed  here :
> http://mail.zope.org/pipermail/zope/2007-January/170151.html
> and continued here :
> http://mail.zope.org/pipermail/zope/2007-January/170156.html
> 
> I am experiencing issues regarding a database ConflictError on session 
> objects.
> 
> I use zope 2.9.0 python 2.4.2, and the code of the MultiDB support has
> been patched (as suggested by Florent Guillaume)
> http://mail.zope.org/pipermail/zodb-dev/2006-January/009737.html
> 
> My main concern is to debug my application where, on every couple of
> requests coming from two different browsers at the same time (before
> the first request is , one of them wins and the other always fails and
> raises a conflict error. It is not a ReadConflictError, nor a
> WriteConflictError. It is a "ConflictError: database conflict error".
> I am aware that conflicts occure up to 20% of the time, but in my case
> it is almost 100% in this specific situation !
> 
> If I do not use the session object in my code, I have no errors at all
> and everything just goes fine.
> 
> Any idea on how to debug this ? Florent, maybe ?  someone help me ! I
> am stuck on this for 2 weeks now.
> 
> NOTE : I do not use Zeo, nor frames.

You might try 'faster', an alternative ZODB-based sessioning
implementation:  one of its goals is to reduce the chance of collisions
compared to the stock implementation:

  http://agendaless.com/Members/tseaver/software/faster/


Tres.
- --
===
Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFw0aj+gerLs4ltQ4RAuDLAJ9VXpLtmnr5EwYMV1AkS1Gxa0lvmwCgoGIv
hkn26PUMSmmBKO8nDYFdmkU=
=n+Qz
-END PGP SIGNATURE-

___
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] Florent Guillaume's database Conflict Error on session objects patch not working ?

2007-02-02 Thread yacine chaouche

Hi all,

As discussed  here :
http://mail.zope.org/pipermail/zope/2007-January/170151.html
and continued here :
http://mail.zope.org/pipermail/zope/2007-January/170156.html

I am experiencing issues regarding a database ConflictError on session objects.

I use zope 2.9.0 python 2.4.2, and the code of the MultiDB support has
been patched (as suggested by Florent Guillaume)
http://mail.zope.org/pipermail/zodb-dev/2006-January/009737.html

My main concern is to debug my application where, on every couple of
requests coming from two different browsers at the same time (before
the first request is , one of them wins and the other always fails and
raises a conflict error. It is not a ReadConflictError, nor a
WriteConflictError. It is a "ConflictError: database conflict error".
I am aware that conflicts occure up to 20% of the time, but in my case
it is almost 100% in this specific situation !

If I do not use the session object in my code, I have no errors at all
and everything just goes fine.

Any idea on how to debug this ? Florent, maybe ?  someone help me ! I
am stuck on this for 2 weeks now.

NOTE : I do not use Zeo, nor frames.

Thanks,

Y.Chaouche
___
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] session-timeout-minutes value in runtime Zope

2007-02-02 Thread Peter Bengtsson

Thanks but I solved it using::

 from App.config import getConfiguration
 conf = getConfiguration()
 setattr(MyProductClass, 'SESSION_TIMEOUT_MINUTES',
 conf.session_timeout_minutes)

Now I can use this::

class MyProductClass:
def getLoggedInSecurelyMinutesLeft(self):
""" return how many minutes there is left on the securely
logged in session. """
ts = self.get_session(SESSIONKEY_USER_SECURE_TIMESTAMP, None)
if ts is None:
return 0
minutes = self.SESSION_TIMEOUT_MINUTES - (time.time() - ts) / 60
return int(minutes)




yacine chaouche wrote:

I don't know if this is what you want. If you want to have access, in
your code, to the session-timeout-minutes variable, you can try this
methode on your session_data_manager object :

getTimeoutMinutes(self):

Return the number of minutes allowed for subobject inactivity before
expiration. PermissionView management screens

This is from the api documentation of TransientContainer class, found
in the help link in the ZMI of temp_folder/session_data_manager.

In your code, you can use something like :

you'll be
securely logged in for another 
minutes unless you log out or log in
again".


Y.Chaouche

2007/1/23, Dieter Maurer <[EMAIL PROTECTED]>:

Peter Bengtsson wrote at 2007-1-23 13:44 +:
>This might be an FAQ but I wasn't able to find it when searching.
>How do I get access to the value of 'session-timeout-minutes' coming
>from etc/zope.conf in runtime Zope?

The value is used to configure the so called "Session Data Manager"
(usually "/temp_folder/session_data").

Its management page is able to show you the value.

This means, there is some way to access it. You can use this
way in your own application (you might need a proxy role to
get sufficient privileges).



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



--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
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: Cyclic garbage collection todo 2.9.3 onwards, fixed?

2007-02-02 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jonathan Bowlas wrote:
> Hi All,
> 
> Could anyone advise whether this has been fixed in any of the Zope versions
> beyond v2.9.3:
> 
> To-do:
> * Add cyclic-garbage collection support to C extension classes, especially
> to acquisition wrappers.
> 
> I don't see any mention of it at all after Zope 2.9.4 in the changes.txt.

I removed that note, based on Jim's assurance that the work had been
completed earlier:

  http://svn.zope.org/Zope/branches/2.9/?rev=69273&view=rev


Tres.
- --
===
Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFwznz+gerLs4ltQ4RAt42AJ93w6/ilHESjZAJE90G5vM1ss/53wCgjVkL
XT9c/dhDpNhcDPxqabWZSfU=
=CRCA
-END PGP SIGNATURE-

___
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] CMF 16.3 released

2007-02-02 Thread Jens Vagelpohl

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

The CMF developer community is hereby announcing the release of CMF
version 1.6.3.

What is the CMF?

  The Zope Content Management Framework provides a set of services and
  content objects useful for building highly dynamic, content-oriented
  portal sites. The CMF provides the foundation for popular software
  packages such as Plone. It is intended to be easily customizable, in
  terms of both the types of content used and the policies and services
  it provides.

Where do I get it?

  For release files, change logs, installation instructions and more
  please visit http://www.zope.org/Products/CMF/CMF-1.6.3.

  Roadmap and release information can be found at
  http://www.zope.org/Products/CMF/docs/roadmap.

  The CMF mailing list can be reached at the [EMAIL PROTECTED] address,
  to sign up please visit http://mail.zope.org/mailman/listinfo/zope- 
cmf.


  Please file bug reports, feature requests or suggestions in the CMF
  bug collector at http://www.zope.org/Collectors/CMF .

What has changed since the last release?

  There were no changes since CMF 1.6.3-beta.



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFFwzH2RAx5nvEhZLIRAoiFAJ461rFjVbL2C90Z2IKBaSJC2qG9XACfVYdl
dA7Cr8p/mLrEL9b1N+vHdnA=
=rtPg
-END PGP SIGNATURE-
___
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] Cyclic garbage collection todo 2.9.3 onwards, fixed?

2007-02-02 Thread Jonathan Bowlas
Hi All,

Could anyone advise whether this has been fixed in any of the Zope versions
beyond v2.9.3:

To-do:
* Add cyclic-garbage collection support to C extension classes, especially
to acquisition wrappers.

I don't see any mention of it at all after Zope 2.9.4 in the changes.txt.

Cheers

Jon


___
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] session-timeout-minutes value in runtime Zope

2007-02-02 Thread yacine chaouche

I don't know if this is what you want. If you want to have access, in
your code, to the session-timeout-minutes variable, you can try this
methode on your session_data_manager object :

getTimeoutMinutes(self):

Return the number of minutes allowed for subobject inactivity before
expiration. PermissionView management screens

This is from the api documentation of TransientContainer class, found
in the help link in the ZMI of temp_folder/session_data_manager.

In your code, you can use something like :

you'll be
securely logged in for another 
minutes unless you log out or log in
again".


Y.Chaouche

2007/1/23, Dieter Maurer <[EMAIL PROTECTED]>:

Peter Bengtsson wrote at 2007-1-23 13:44 +:
>This might be an FAQ but I wasn't able to find it when searching.
>How do I get access to the value of 'session-timeout-minutes' coming
>from etc/zope.conf in runtime Zope?

The value is used to configure the so called "Session Data Manager"
(usually "/temp_folder/session_data").

Its management page is able to show you the value.

This means, there is some way to access it. You can use this
way in your own application (you might need a proxy role to
get sufficient privileges).



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