[Zope-Checkins] SVN: Zope/branches/2.11/ Changed 'fast_listen' zope.conf option to 'fast-listen'.

2008-06-06 Thread Stefan H. Holek
Log message for revision 87178:
  Changed 'fast_listen' zope.conf option to 'fast-listen'.
  

Changed:
  U   Zope/branches/2.11/doc/CHANGES.txt
  U   Zope/branches/2.11/lib/python/ZServer/component.xml
  U   Zope/branches/2.11/skel/etc/zope.conf.in

-=-
Modified: Zope/branches/2.11/doc/CHANGES.txt
===
--- Zope/branches/2.11/doc/CHANGES.txt  2008-06-05 19:18:42 UTC (rev 87177)
+++ Zope/branches/2.11/doc/CHANGES.txt  2008-06-06 08:34:21 UTC (rev 87178)
@@ -12,6 +12,11 @@
 interfaces (on import of the Interface package).  That package
 is already gone on the trunk.
 
+Bugs Fixed
+
+  - Fixed against-the-rules zope.conf option 'fast_listen' to read
+'fast-listen' (dash, not underscore).
+
   Zope 2.11 rc 1 (2008/05/08)
 
 Bugs Fixed

Modified: Zope/branches/2.11/lib/python/ZServer/component.xml
===
--- Zope/branches/2.11/lib/python/ZServer/component.xml 2008-06-05 19:18:42 UTC 
(rev 87177)
+++ Zope/branches/2.11/lib/python/ZServer/component.xml 2008-06-06 08:34:21 UTC 
(rev 87178)
@@ -19,10 +19,10 @@
  receive WebDAV source responses to GET requests.
/description
  /key
- key name=fast_listen datatype=boolean default=on
+ key name=fast-listen datatype=boolean default=on
description
- Defines wether the http server should listen to requests immediately
- or only after zope is ready to run
+ Defines whether the HTTP server should listen for requests
+ immediately or only after Zope is ready to run.
/description
  /key
  key name=use-wsgi datatype=boolean default=off /

Modified: Zope/branches/2.11/skel/etc/zope.conf.in
===
--- Zope/branches/2.11/skel/etc/zope.conf.in2008-06-05 19:18:42 UTC (rev 
87177)
+++ Zope/branches/2.11/skel/etc/zope.conf.in2008-06-06 08:34:21 UTC (rev 
87178)
@@ -975,8 +975,7 @@
   #
   # To defer the opening of the HTTP socket until the end of the 
   # startup phase: 
-  # fast_listen false
-  #
+  # fast-listen off
 /http-server
 
 # Examples:

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/trunk/ Merged 2.11 branch r87177:87178 into the trunk.

2008-06-06 Thread Stefan H. Holek
Log message for revision 87179:
  Merged 2.11 branch r87177:87178 into the trunk.
  
  Changed 'fast_listen' zope.conf option to 'fast-listen'.
  

Changed:
  U   Zope/trunk/doc/CHANGES.txt
  U   Zope/trunk/lib/python/ZServer/component.xml
  U   Zope/trunk/skel/etc/zope.conf.in

-=-
Modified: Zope/trunk/doc/CHANGES.txt
===
--- Zope/trunk/doc/CHANGES.txt  2008-06-06 08:34:21 UTC (rev 87178)
+++ Zope/trunk/doc/CHANGES.txt  2008-06-06 08:39:11 UTC (rev 87179)
@@ -198,6 +198,9 @@
 
 Bugs Fixed
 
+  - Fixed against-the-rules zope.conf option 'fast_listen' to read
+'fast-listen' (dash, not underscore).
+
   - Switch to branch of 'zope.testbrowser' external which suppresses
 over-the-wire tests.
 

Modified: Zope/trunk/lib/python/ZServer/component.xml
===
--- Zope/trunk/lib/python/ZServer/component.xml 2008-06-06 08:34:21 UTC (rev 
87178)
+++ Zope/trunk/lib/python/ZServer/component.xml 2008-06-06 08:39:11 UTC (rev 
87179)
@@ -19,10 +19,10 @@
  receive WebDAV source responses to GET requests.
/description
  /key
- key name=fast_listen datatype=boolean default=on
+ key name=fast-listen datatype=boolean default=on
description
- Defines wether the http server should listen to requests immediately
- or only after zope is ready to run
+ Defines whether the HTTP server should listen for requests
+ immediately or only after Zope is ready to run.
/description
  /key
  key name=use-wsgi datatype=boolean default=off /

Modified: Zope/trunk/skel/etc/zope.conf.in
===
--- Zope/trunk/skel/etc/zope.conf.in2008-06-06 08:34:21 UTC (rev 87178)
+++ Zope/trunk/skel/etc/zope.conf.in2008-06-06 08:39:11 UTC (rev 87179)
@@ -975,8 +975,7 @@
   #
   # To defer the opening of the HTTP socket until the end of the 
   # startup phase: 
-  # fast_listen false
-  #
+  # fast-listen off
 /http-server
 
 # Examples:

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/2.11/ Forward port fix for Launchpad #229549 from the 2.10 branch.

2008-06-06 Thread Tres Seaver
Log message for revision 87217:
  Forward port fix for Launchpad #229549 from the 2.10 branch.
  

Changed:
  U   Zope/branches/2.11/doc/CHANGES.txt
  U   Zope/branches/2.11/lib/python/Products/PageTemplates/PageTemplate.py
  U   
Zope/branches/2.11/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py

-=-
Modified: Zope/branches/2.11/doc/CHANGES.txt
===
--- Zope/branches/2.11/doc/CHANGES.txt  2008-06-06 20:13:25 UTC (rev 87216)
+++ Zope/branches/2.11/doc/CHANGES.txt  2008-06-06 20:25:32 UTC (rev 87217)
@@ -14,6 +14,9 @@
 
 Bugs Fixed
 
+  - Launchpad #229549:  Don't ignore 'debug' flag when rendering
+page templates (thanks to Eric Steele for the patch).
+
   - Fixed against-the-rules zope.conf option 'fast_listen' to read
 'fast-listen' (dash, not underscore).
 

Modified: Zope/branches/2.11/lib/python/Products/PageTemplates/PageTemplate.py
===
--- Zope/branches/2.11/lib/python/Products/PageTemplates/PageTemplate.py
2008-06-06 20:13:25 UTC (rev 87216)
+++ Zope/branches/2.11/lib/python/Products/PageTemplates/PageTemplate.py
2008-06-06 20:25:32 UTC (rev 87217)
@@ -86,8 +86,16 @@
 def pt_render(self, source=False, extra_context={}):
 c = self.pt_getContext()
 c.update(extra_context)
-return super(PageTemplate, self).pt_render(c, source=source)
+debug = getattr(c['request'], 'debug', None)
+if debug is not None:
+showtal = getattr(debug, 'showTAL', False)
+sourceAnnotations = getattr(debug, 'sourceAnnotations', False)
+else:
+showtal = sourceAnnotations = False
+return super(PageTemplate, self).pt_render(c, source=source, 
sourceAnnotations=sourceAnnotations,
+   showtal=showtal)
 
+
 def pt_errors(self, namespace={}):
 self._cook_check()
 err = self._v_errors

Modified: 
Zope/branches/2.11/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py
===
--- 
Zope/branches/2.11/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py
  2008-06-06 20:13:25 UTC (rev 87216)
+++ 
Zope/branches/2.11/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py
  2008-06-06 20:25:32 UTC (rev 87217)
@@ -152,6 +152,20 @@
 state = cPickle.dumps(empty, protocol=1)
 clone = cPickle.loads(state)
 
+def testDebugFlags(self):
+# Test for bug 229549
+manage_addPageTemplate(self.app, 'test', 
+   text='div tal:content=string:foobar/div', 
+   encoding='ascii')
+zpt = self.app['test']
+from zope.publisher.base import DebugFlags
+self.app.REQUEST.debug = DebugFlags()
+self.assertEqual(zpt.pt_render(), unicode('divfoo/div\n'))
+self.app.REQUEST.debug.showTAL = True
+self.assertEqual(zpt.pt_render(), unicode('div 
tal:content=string:foofoo/div\n'))
+self.app.REQUEST.debug.sourceAnnotations = True
+self.assertEqual(zpt.pt_render().startswith(unicode('!--')), True)
+
 class ZopePageTemplateFileTests(ZopeTestCase):
 
 def testPT_RenderWithAscii(self):

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/trunk/lib/python/Products/PageTemplates/ Forward port fix for Launchpad #229549 from the 2.10 branch.

2008-06-06 Thread Tres Seaver
Log message for revision 87218:
  Forward port fix for Launchpad #229549 from the 2.10 branch.
  

Changed:
  U   Zope/trunk/lib/python/Products/PageTemplates/PageTemplate.py
  U   Zope/trunk/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py

-=-
Modified: Zope/trunk/lib/python/Products/PageTemplates/PageTemplate.py
===
--- Zope/trunk/lib/python/Products/PageTemplates/PageTemplate.py
2008-06-06 20:25:32 UTC (rev 87217)
+++ Zope/trunk/lib/python/Products/PageTemplates/PageTemplate.py
2008-06-06 20:42:46 UTC (rev 87218)
@@ -68,8 +68,16 @@
 def pt_render(self, source=False, extra_context={}):
 c = self.pt_getContext()
 c.update(extra_context)
-return super(PageTemplate, self).pt_render(c, source=source)
+debug = getattr(c['request'], 'debug', None)
+if debug is not None:
+showtal = getattr(debug, 'showTAL', False)
+sourceAnnotations = getattr(debug, 'sourceAnnotations', False)
+else:
+showtal = sourceAnnotations = False
+return super(PageTemplate, self).pt_render(c, source=source, 
sourceAnnotations=sourceAnnotations,
+   showtal=showtal)
 
+
 def pt_errors(self, namespace={}):
 self._cook_check()
 err = self._v_errors

Modified: 
Zope/trunk/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py
===
--- Zope/trunk/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py  
2008-06-06 20:25:32 UTC (rev 87217)
+++ Zope/trunk/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py  
2008-06-06 20:42:46 UTC (rev 87218)
@@ -202,6 +202,20 @@
 state = cPickle.dumps(empty, protocol=1)
 clone = cPickle.loads(state)
 
+def testDebugFlags(self):
+# Test for bug 229549
+manage_addPageTemplate(self.app, 'test', 
+   text='div tal:content=string:foobar/div', 
+   encoding='ascii')
+zpt = self.app['test']
+from zope.publisher.base import DebugFlags
+self.app.REQUEST.debug = DebugFlags()
+self.assertEqual(zpt.pt_render(), unicode('divfoo/div\n'))
+self.app.REQUEST.debug.showTAL = True
+self.assertEqual(zpt.pt_render(), unicode('div 
tal:content=string:foofoo/div\n'))
+self.app.REQUEST.debug.sourceAnnotations = True
+self.assertEqual(zpt.pt_render().startswith(unicode('!--')), True)
+
 class ZopePageTemplateFileTests(ZopeTestCase):
 
 def test_class_conforms_to_IWriteLock(self):

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-dev] buildbot news: sending notifications and current broken builds

2008-06-06 Thread Christian Theune
Hi,

I've watched my buildbot send out notifications for a while and pondered how
to make them available to more people. I decided to send them to this list on
a 'problem' level.

The 'problem' level sends a message when a builder changes from a good state
to a bad state but doesn't send a new message on subsequent failing builds.

For me this has been reasonably quiet over the last two weeks although about
60 builders are broken.

The risk of sending mail here is that a massive build failure can cause about
200 messages being send at once. If anybody knows a better approach with
buildbot, please let me know, I'd be happy to implement it.

For everyone else: please have a look at the list of broken builds:
http://zopebuildbot.whq.gocept.com/cruise

If a project that you feel responsible for is broken, please check out whats
wrong and maybe fix it. If the build environment isn't suitable, I'll be happy
to help. This page should show a green bar!

Christian


-- 
Christian Theune · [EMAIL PROTECTED]
gocept gmbh  co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 7 · fax +49 345 1229889 1
Zope and Plone consulting and development
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] buildbot news: sending notifications and current broken builds

2008-06-06 Thread Andreas Jung



--On 6. Juni 2008 08:23:40 +0200 Christian Theune [EMAIL PROTECTED] wrote:


Hi,

I've watched my buildbot send out notifications for a while and pondered
how to make them available to more people. I decided to send them to this
list on a 'problem' level.

The 'problem' level sends a message when a builder changes from a good
state to a bad state but doesn't send a new message on subsequent failing
builds.

For me this has been reasonably quiet over the last two weeks although
about 60 builders are broken.

The risk of sending mail here is that a massive build failure can cause
about 200 messages being send at once. If anybody knows a better approach
with buildbot, please let me know, I'd be happy to implement it.

For everyone else: please have a look at the list of broken builds:
http://zopebuildbot.whq.gocept.com/cruise




A minor usability  suggestion:

please provide links at the top of the page for every top-level namespace 
that would setup the filter for this namespace.


Andreas

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


Re[2]: [Zope-dev] buildbot news: sending notifications and current broken builds

2008-06-06 Thread Adam GROSZER
Hello,

Not this one, but I added some features on the branch:

svn+ssh://svn.zope.org/repos/main/gocept.bsquare/branches/pcardune-setup

Friday, June 6, 2008, 8:35:57 AM, you wrote:

AJ A minor usability  suggestion:

AJ please provide links at the top of the page for every top-level namespace
AJ that would setup the filter for this namespace.

AJ Andreas


-- 
Best regards,
 Adam GROSZERmailto:[EMAIL PROTECTED]
--
Quote of the day:
There's nothing so pathetic as a forgetful liar. 
- Unknown 

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


Re: [Zope-dev] Re: SQLAlchemy (zope.sqlalchemy) integration

2008-06-06 Thread Hermann Himmelbauer
Am Donnerstag, 5. Juni 2008 19:38 schrieb Laurence Rowe:
 Hermann Himmelbauer wrote:
  Am Mittwoch, 4. Juni 2008 22:09 schrieb Laurence Rowe:
  Hermann Himmelbauer wrote:
  In my application, I then use getSASession() to retrieve my session.
 
  However, what I think is not that beautiful is the s.bind = engine
  part. Are there any suggestions how to improve this?
 
  You have two options
 
  If you ever need to mix objects from different `sites` into the same
  session, you should use an adapter on your root object like:
 
  If you don't need to mix objects from different `sites` then you can
  register a local utility for ISessionConfig.
 
  def scope():
 return getUtility(ISessionConfig).uid, thread.get_ident()
 
  def factory():
 engine = Engine(getUtility(ISessionConfig).url)
 return create_session(
   transactional=True, autoflush=True, bind=engine
   extension=ZopeTransactionExtension(),
   ))
 
  Session = scoped_session(factory, scopefunc=scope)
 
  Then you can just import Session and use:
  session = Session()
 
  Ok, great, thanks for help. The only thing I don't understand is what
  uid from the SessionConfig utility is. Below is my full database
  integration code which works for me, perhaps this is helpful to someone
  else.

 uid is some id that distinguishes your various application instances. On
 zope 2 I would probably use getPhysicalPath(). I don't know what the
 zope3 equivalent is.

Hmmm, maybe it's:

from zope.traversing.api import getPath
from zope.app.component.hooks import getSite
@property
def uid(self):
return getPath(getSite())

 Looking at your code, why did you decide to store the engine on a _v_
 attribute? I don't think you need to save it at all. You can access a
 connection through session.connection()

Ok, but in case I create the engine in the session_factor, e.g.:

def session_factory():
engine = createEngine()
return create_session(transactional = True,
  autoflush = True,
  bind = engine,
  extension = ZopeTransactionExtension())

Wouldn't the engine be created for every request, as the scope changes and the 
factory is called? In my case, the engine is created when the first session 
is fetched. After that it will be recreated only if the DSN changes.

  Btw., I'd suggest to put such code / session use cases in some Zope
  package, maybe into zope.sqlalchemy, or e.g. zope.sqlalchemy_utility as
  it's really difficult for non-insiders to set this up.

 We would need to work out what parts are useful to the various higher
 level sqlalchemy / zope packages. Once we can agree on a common core
 then we should at least make simple use cases available through
 zope.sqlalchemy directly.

In my scenario, all I need is a local utility. This is something that was 
available in z3c.zalchemy, too (and I think also in z3c.sqlalchemy).
The problem about putting this code into zope.sqlalchemy is that the 
local-utility code may be based on other zope packages and hence create 
unwanted dependencies. But I'm unsure about this.

Best Regards,
Hermann

-- 
[EMAIL PROTECTED]
GPG key ID: 299893C7 (on keyservers)
FP: 0124 2584 8809 EF2A DBF9  4902 64B4 D16B 2998 93C7
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] buildbot news: sending notifications and current broken builds

2008-06-06 Thread Gary Poster
Hey Christian.  Thanks for this.  It would be nice to have a link from  
this page to the failure output (to address works for me issues, as  
well as for a quick triage).


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

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


Re: [Zope-dev] buildbot news: sending notifications and current broken builds

2008-06-06 Thread Gary Poster


On Jun 6, 2008, at 7:44 AM, Gary Poster wrote:

Hey Christian.  Thanks for this.  It would be nice to have a link  
from this page to the failure output (to address works for me  
issues, as well as for a quick triage).


...but I found 'em by digging around on the site, so, mostly nevermind.

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

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


Re: [Zope-dev] fast_listen - fast-listen for 2.11

2008-06-06 Thread Christian Theune
Hi,

On Fri, Jun 06, 2008 at 01:55:43PM +0200, Stefan H. Holek wrote:
 No, fast-listen is new in Zope 2.11.

 Stefan

 On 06.06.2008, at 07:49, Christian Theune wrote:

 Hmm. Was this around in 2.10 already?

Then it's a +1 from me.


-- 
Christian Theune · [EMAIL PROTECTED]
gocept gmbh  co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 7 · fax +49 345 1229889 1
Zope and Plone consulting and development
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] buildbot news: sending notifications and current broken builds

2008-06-06 Thread Benji York
On Fri, Jun 6, 2008 at 2:23 AM, Christian Theune [EMAIL PROTECTED] wrote:
 I've watched my buildbot send out notifications for a while and pondered how
 to make them available to more people.

We really need something like this.  Thanks.

A suggestion: I'd like to have the tests run with --all.
-- 
Benji York
Senior Software Engineer
Zope Corporation
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] buildbot failure in Zope on zc.ngi

2008-06-06 Thread ct
The Buildbot has detected a new failure of zc.ngi on Zope.
Full details are available at:
 http://zopebuildbot.whq.gocept.com/zc.ngi/builds/96

Buildbot URL: http://zopebuildbot.whq.gocept.com/

Buildslave for this Build: local

Build Reason: The Nightly scheduler named 'zc.ngi nightly' triggered this build
Build Source Stamp: [branch zc.ngi/trunk] HEAD
Blamelist: 

BUILD FAILED: failed test
Logs are attached.

sincerely,
 -The Buildbot

Abuild/todo.txt
Abuild/bootstrap.py
Abuild/buildout.cfg
Abuild/setup.py
Abuild/src
Abuild/src/zc
Abuild/src/zc/__init__.py
Abuild/src/zc/ngi
Abuild/src/zc/ngi/blocking.py
Abuild/src/zc/ngi/adapters.txt
Abuild/src/zc/ngi/message.txt
Abuild/src/zc/ngi/async.py
Abuild/src/zc/ngi/testing.py
Abuild/src/zc/ngi/__init__.py
Abuild/src/zc/ngi/blocking.txt
Abuild/src/zc/ngi/tests.py
Abuild/src/zc/ngi/adapters.py
Abuild/src/zc/ngi/interfaces.py
Abuild/src/zc/ngi/README.txt
Abuild/src/zc/ngi/async.txt
Abuild/src/zc/ngi/message.py
Abuild/src/zc/ngi/testing.test
Abuild/src/zc/ngi/wordcount.py
Abuild/README.txt
 U   build
Checked out revision 87191.
Creating directory '/home/ctheune/zope.org/slave/zc.ngi/build/bin'.
Creating directory '/home/ctheune/zope.org/slave/zc.ngi/build/parts'.
Creating directory '/home/ctheune/zope.org/slave/zc.ngi/build/develop-eggs'.
Generated script '/home/ctheune/zope.org/slave/zc.ngi/build/bin/buildout'.
Upgraded:
  zc.buildout version 1.0.3,
  setuptools version 0.6c8;
restarting.
Generated script '/home/ctheune/zope.org/slave/zc.ngi/build/bin/buildout'.
Develop: '/home/ctheune/zope.org/slave/zc.ngi/build/.'
Installing test.
Generated script '/home/ctheune/zope.org/slave/zc.ngi/build/bin/test'.
Running unit tests:


Failure in test /home/ctheune/zope.org/slave/zc.ngi/build/src/zc/ngi/async.txt
Failed doctest test for async.txt
  File /home/ctheune/zope.org/slave/zc.ngi/build/src/zc/ngi/async.txt, line 0

--
File /home/ctheune/zope.org/slave/zc.ngi/build/src/zc/ngi/async.txt, line 
161, in async.txt
Failed example:
print loghandler
Expected:
zc.ngi.async.client ERROR
  handle_input failed
Got:
BLANKLINE
--
File /home/ctheune/zope.org/slave/zc.ngi/build/src/zc/ngi/async.txt, line 
165, in async.txt
Failed example:
handler.closed
Exception raised:
Traceback (most recent call last):
  File 
/home/ctheune/eggs/tmpY8_5rK/zope.testing-3.5.1-py2.4.egg/zope/testing/doctest.py,
 line 1356, in __run

  File doctest async.txt[37], line 1, in ?
handler.closed
AttributeError: LameClientConnectionHandler instance has no attribute 
'closed'

  Ran 70 tests with 1 failures and 0 errors in 4.978 seconds.
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] buildbot news: sending notifications and current broken builds

2008-06-06 Thread Gary Poster


On Jun 6, 2008, at 8:37 AM, Benji York wrote:

On Fri, Jun 6, 2008 at 2:23 AM, Christian Theune [EMAIL PROTECTED]  
wrote:
I've watched my buildbot send out notifications for a while and  
pondered how

to make them available to more people.


We really need something like this.  Thanks.

A suggestion: I'd like to have the tests run with --all.


Heh, I was going to try and fix a time-out failure (zc.blist) by  
moving the intentionally long tests to --all...maybe there would be  
some way to say don't run me with --all?  Otherwise don't love this  
idea, though I understand its point.


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

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


[Zope-dev] Re: SQLAlchemy (zope.sqlalchemy) integration

2008-06-06 Thread Laurence Rowe

Hermann Himmelbauer wrote:

Am Donnerstag, 5. Juni 2008 19:38 schrieb Laurence Rowe:

Hermann Himmelbauer wrote:

Am Mittwoch, 4. Juni 2008 22:09 schrieb Laurence Rowe:

Hermann Himmelbauer wrote:

In my application, I then use getSASession() to retrieve my session.

However, what I think is not that beautiful is the s.bind = engine
part. Are there any suggestions how to improve this?

You have two options

If you ever need to mix objects from different `sites` into the same
session, you should use an adapter on your root object like:

If you don't need to mix objects from different `sites` then you can
register a local utility for ISessionConfig.

def scope():
   return getUtility(ISessionConfig).uid, thread.get_ident()

def factory():
   engine = Engine(getUtility(ISessionConfig).url)
   return create_session(
 transactional=True, autoflush=True, bind=engine
 extension=ZopeTransactionExtension(),
 ))

Session = scoped_session(factory, scopefunc=scope)

Then you can just import Session and use:
session = Session()

Ok, great, thanks for help. The only thing I don't understand is what
uid from the SessionConfig utility is. Below is my full database
integration code which works for me, perhaps this is helpful to someone
else.

uid is some id that distinguishes your various application instances. On
zope 2 I would probably use getPhysicalPath(). I don't know what the
zope3 equivalent is.


Hmmm, maybe it's:

from zope.traversing.api import getPath
from zope.app.component.hooks import getSite
@property
def uid(self):
return getPath(getSite())


Looking at your code, why did you decide to store the engine on a _v_
attribute? I don't think you need to save it at all. You can access a
connection through session.connection()


Ok, but in case I create the engine in the session_factor, e.g.:

def session_factory():
engine = createEngine()
return create_session(transactional = True,
  autoflush = True,
  bind = engine,
  extension = ZopeTransactionExtension())

Wouldn't the engine be created for every request, as the scope changes and the 
factory is called? In my case, the engine is created when the first session 
is fetched. After that it will be recreated only if the DSN changes.


The engines are created the same number of times either way. 
zope.sqlalchemy uses session.close() rather than session.remove(), so 
the session/engine is only created once per thread, then recycled. This 
is the same as storing it on a _v_ attribute, which are per thread as 
active objects live in the connection cache.


Laurence

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

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


Re: [Zope-dev] buildbot news: sending notifications and current broken builds

2008-06-06 Thread Benji York
On Fri, Jun 6, 2008 at 9:34 AM, Gary Poster [EMAIL PROTECTED] wrote:

 On Jun 6, 2008, at 8:37 AM, Benji York wrote:

 A suggestion: I'd like to have the tests run with --all.

 Heh, I was going to try and fix a time-out failure (zc.blist) by moving the
 intentionally long tests to --all...maybe there would be some way to say
 don't run me with --all?  Otherwise don't love this idea, though I
 understand its point.

I avoided suggesting this earlier, but perhaps we need to define a level
to run the tests at.  Then buildbot could run all tests at level X and
below and you could put the truly long-running tests above X.
-- 
Benji York
Senior Software Engineer
Zope Corporation
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] buildbot news: sending notifications and current broken builds

2008-06-06 Thread Fred Drake
On Fri, Jun 6, 2008 at 9:44 AM, Benji York [EMAIL PROTECTED] wrote:
 I avoided suggesting this earlier, but perhaps we need to define a level
 to run the tests at.  Then buildbot could run all tests at level X and
 below and you could put the truly long-running tests above X.

Another approach would be to have the buildbot run a bin/buildbot-test
instead of bin/test, if present.  That let's the package suggest what
makes sense for running under buildbot without having to get people to
agree on how levels are used (a more complicated issue).


  -Fred

-- 
Fred L. Drake, Jr. fdrake at gmail.com
Chaos is the score upon which reality is written. --Henry Miller
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] buildbot news: sending notifications and current broken builds

2008-06-06 Thread Gary Poster


On Jun 6, 2008, at 9:48 AM, Fred Drake wrote:


On Fri, Jun 6, 2008 at 9:44 AM, Benji York [EMAIL PROTECTED] wrote:
I avoided suggesting this earlier, but perhaps we need to define a  
level
to run the tests at.  Then buildbot could run all tests at level X  
and

below and you could put the truly long-running tests above X.


Another approach would be to have the buildbot run a bin/buildbot-test
instead of bin/test, if present.  That let's the package suggest what
makes sense for running under buildbot without having to get people to
agree on how levels are used (a more complicated issue).


Huh, that sounds like it might be easy-ish for Christian, putting the  
responsibility where it arguably should be, on the package  
maintainer.  +1, if Christian says it's easy for him.


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

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


Re: [Zope-dev] Conflict Errors

2008-06-06 Thread Dieter Maurer
Jim Fulton wrote at 2008-6-5 10:46 -0400:

On Jun 5, 2008, at 10:16 AM, Jim Fulton wrote:


 On Jun 5, 2008, at 9:52 AM, David Otero Figueroa wrote:

 I would like to know:
 - Can conflict errors appear when reading objects from the ZODB?

 Yes


Gaaa. I meant no.

Nevertheless, I think you have been right in the first place.

Usually, MVCC prevents read conflict errors but TempStorage
only maintains a very limited history -- occasionally to small
to fully implement MVCC. Then read conflict errors will occur.



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


Re: [Zope-dev] Conflict Errors

2008-06-06 Thread Jim Fulton


On Jun 6, 2008, at 2:41 PM, Dieter Maurer wrote:


Jim Fulton wrote at 2008-6-5 10:46 -0400:


On Jun 5, 2008, at 10:16 AM, Jim Fulton wrote:



On Jun 5, 2008, at 9:52 AM, David Otero Figueroa wrote:


I would like to know:
- Can conflict errors appear when reading objects from the ZODB?


Yes



Gaaa. I meant no.


Nevertheless, I think you have been right in the first place.

Usually, MVCC prevents read conflict errors but TempStorage
only maintains a very limited history -- occasionally to small
to fully implement MVCC. Then read conflict errors will occur.



Sure. The right answer is generally, no. :)

Jim

--
Jim Fulton
Zope Corporation


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

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


[Zope-dev] buildbot failure in Zope on ZODB

2008-06-06 Thread ct
The Buildbot has detected a new failure of ZODB on Zope.
Full details are available at:
 http://zopebuildbot.whq.gocept.com/ZODB/builds/122

Buildbot URL: http://zopebuildbot.whq.gocept.com/

Buildslave for this Build: local

Build Reason: The Nightly scheduler named 'ZODB nightly' triggered this build
Build Source Stamp: [branch ZODB/trunk] HEAD
Blamelist: 

BUILD FAILED: failed test
Logs are attached.

sincerely,
 -The Buildbot

Abuild/HISTORY.txt
Abuild/log.ini
Abuild/LICENSE.txt
Abuild/bootstrap.py
Abuild/buildout.cfg
Abuild/doc
Abuild/doc/HOWTO-Blobs-NFS.txt
Abuild/doc/zodb.pdf
Abuild/doc/zeo-client-cache.txt
Abuild/doc/zeo.txt
Abuild/doc/storage.pdf
Abuild/doc/guide
Abuild/doc/guide/links.tex
Abuild/doc/guide/introduction.tex
Abuild/doc/guide/chatter.py
Abuild/doc/guide/prog-zodb.tex
Abuild/doc/guide/indexing.tex
Abuild/doc/guide/TODO
Abuild/doc/guide/storages.tex
Abuild/doc/guide/admin.tex
Abuild/doc/guide/modules.tex
Abuild/doc/guide/transactions.tex
Abuild/doc/guide/gfdl.tex
Abuild/doc/guide/zeo.tex
Abuild/doc/guide/README
Abuild/doc/guide/zodb.tex
Abuild/doc/zeo-client-cache-tracing.txt
Abuild/COPYRIGHT.txt
Abuild/release.py
Abuild/setup.py
Abuild/src
Abuild/src/persistent
Abuild/src/persistent/cPickleCache.c
Abuild/src/persistent/ring.c
Abuild/src/persistent/mapping.py
Abuild/src/persistent/TimeStamp.c
Abuild/src/persistent/DEPENDENCIES.cfg
Abuild/src/persistent/ring.h
Abuild/src/persistent/__init__.py
Abuild/src/persistent/py24compat.h
Abuild/src/persistent/wref.py
Abuild/src/persistent/SETUP.cfg
Abuild/src/persistent/tests
Abuild/src/persistent/tests/test_PickleCache.py
Abuild/src/persistent/tests/test_list.py
Abuild/src/persistent/tests/test_mapping.py
Abuild/src/persistent/tests/persistenttestbase.py
Abuild/src/persistent/tests/__init__.py
Abuild/src/persistent/tests/test_persistent.py
Abuild/src/persistent/tests/testPersistent.py
Abuild/src/persistent/tests/test_wref.py
Abuild/src/persistent/tests/test_overriding_attrs.py
Abuild/src/persistent/tests/test_pickle.py
Abuild/src/persistent/tests/persistent.txt
Abuild/src/persistent/list.py
Abuild/src/persistent/cPersistence.c
Abuild/src/persistent/interfaces.py
Abuild/src/persistent/dict.py
Abuild/src/persistent/README.txt
Abuild/src/persistent/cPersistence.h
Abuild/src/ZopeUndo
Abuild/src/ZopeUndo/tests
Abuild/src/ZopeUndo/tests/testPrefix.py
Abuild/src/ZopeUndo/tests/__init__.py
Abuild/src/ZopeUndo/Prefix.py
Abuild/src/ZopeUndo/__init__.py
Abuild/src/BTrees
Abuild/src/BTrees/_OOBTree.c
Abuild/src/BTrees/BTreeItemsTemplate.c
Abuild/src/BTrees/IOBTree.py
Abuild/src/BTrees/OIBTree.py
Abuild/src/BTrees/intvaluemacros.h
Abuild/src/BTrees/sorters.c
Abuild/src/BTrees/OLBTree.py
Abuild/src/BTrees/__init__.py
Abuild/src/BTrees/OOBTree.py
Abuild/src/BTrees/py24compat.h
Abuild/src/BTrees/BucketTemplate.c
Abuild/src/BTrees/floatvaluemacros.h
Abuild/src/BTrees/intkeymacros.h
Abuild/src/BTrees/_IFBTree.c
Abuild/src/BTrees/Development.txt
Abuild/src/BTrees/tests
Abuild/src/BTrees/tests/testBTreesUnicode.py
Abuild/src/BTrees/tests/test_check.py
Abuild/src/BTrees/tests/testSetOps.py
Abuild/src/BTrees/tests/__init__.py
Abuild/src/BTrees/tests/test_btreesubclass.py
Abuild/src/BTrees/tests/testConflict.py
Abuild/src/BTrees/tests/testLength.py
Abuild/src/BTrees/tests/testBTrees.py
Abuild/src/BTrees/tests/test_compare.py
Abuild/src/BTrees/_LFBTree.c
Abuild/src/BTrees/SetOpTemplate.c
Abuild/src/BTrees/_LLBTree.c
Abuild/src/BTrees/LFBTree.py
Abuild/src/BTrees/_OLBTree.c
Abuild/src/BTrees/MergeTemplate.c
Abuild/src/BTrees/BTreeTemplate.c
Abuild/src/BTrees/LLBTree.py
Abuild/src/BTrees/fsBTree.py
Abuild/src/BTrees/LOBTree.py
Abuild/src/BTrees/BTreeModuleTemplate.c
Abuild/src/BTrees/DEPENDENCIES.cfg
Abuild/src/BTrees/TreeSetTemplate.c
Abuild/src/BTrees/SETUP.cfg
Abuild/src/BTrees/objectvaluemacros.h
Abuild/src/BTrees/_IIBTree.c
Abuild/src/BTrees/check.py
Abuild/src/BTrees/IFBTree.py
Abuild/src/BTrees/SetTemplate.c
Abuild/src/BTrees/Length.py
Abuild/src/BTrees/_OIBTree.c
Abuild/src/BTrees/_IOBTree.c
Abuild/src/BTrees/IIBTree.py
Abuild/src/BTrees/Interfaces.py
Abuild/src/BTrees/_fsBTree.c
Abuild/src/BTrees/objectkeymacros.h
Abuild/src/BTrees/_LOBTree.c
Abuild/src/CHANGES.txt
Abuild/src/ZEO
Abuild/src/ZEO/CommitLog.py
Abuild/src/ZEO/StorageServer.py
Abuild/src/ZEO/DEPENDENCIES.cfg
Abuild/src/ZEO/__init__.py
Abuild/src/ZEO/scripts
Abuild/src/ZEO/scripts/manual_tests
Abuild/src/ZEO/scripts/manual_tests/testzeopack.py
Abuild/src/ZEO/scripts/parsezeolog.py
A

[Zope] display uploaded file

2008-06-06 Thread sujitha mary
hi all,
I need to display the contents of an uploaded file when i click a link.But when 
i click the link instead of displaying the contents i'm getting a message to 
save this BIN file.wht changes should i make to display it in my plone 
interface?Plz help.


   
-
 Bollywood, fun, friendship, sports and more. You name it,  we have it.___
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] display uploaded file

2008-06-06 Thread Andreas Jung



--On 6. Juni 2008 08:22:57 +0100 sujitha mary [EMAIL PROTECTED] 
wrote:



hi all,
I need to display the contents of an uploaded file when i click a
link.


Unless the *file* is an image then there is nothing a browser can do.
Browsers can basically show only html and images and some other 
content-types using plugins...so the download link is the best a browser 
can do!



But when i click the link instead of displaying the contents i'm
getting a message to save this BIN file.wht changes should i make to
display it in my plone interface?Plz help.


Plone has some add-ons for showing _previews_ of uploaded binary content 
for some mimetypes like pdf. Search on plone.org - products for terms

like attachment or preview.

-aj

pgppV9eYvQz1i.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 )


[Zope] Re: acl_users folder 25000

2008-06-06 Thread Max M

Kees de Brabander skrev:

A client of mine wants a site that is only accessible for members. However,
there are more than 25000 members. Are there any reasons that would make it
unwise to populate an ordinary acl_users folder with such a number of user
accounts?



Have you tried to just generate 25K users in an empty site and see what 
happens? It should take 15 about minutes to set up and write the code.


Members are stored in a dict, and the ZODB. They should be plenty fast.

Last week I wrote a tool that imported 10K lines of data from a csv file 
as dicts. It took about 2 seconds to read them from disk and save them 
in the ZODB. That is comparable.


Perhaps you don't have a problem?



--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

___
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.schema: association vs. containment in Object, List

2008-06-06 Thread Sean Upton
All,

I want to be able to spell out certain zope.schema.Object fields in my
interfaces as contained while other fields are declared as
associated/related objects.  I'm interested in describing this in the
interface itself, and not leave such intrinsic characteristics to the
implementation class.  It is useful, in my experience to have the
ability for utility components to know this about a field (for
example, relational database deletion cascades, JSON serialization of
an object and its contained objects, neglecting related objects, or
you might end up serializing the entire graph).

Are there any community best practices for doing this?

My previous attempts at doing this have been to subclass List and
Object for OneToMany and OneToOne field types respectively, and treat
original Object and List(value_type=Object()) fields as always
implying containment.  Is this reasonable?  Are there other or better
approaches?

Thanks,
Sean
___
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] display uploaded file

2008-06-06 Thread Peter Bengtsson
Change the uploaded file's content_type to text/plain and the browser
will try to display it.
This is something you can do to images too but you'll get a very
looong page of junk.

2008/6/6 sujitha mary [EMAIL PROTECTED]:
 hi all,
 I need to display the contents of an uploaded file when i click a link.But
 when i click the link instead of displaying the contents i'm getting a
 message to save this BIN file.wht changes should i make to display it in my
 plone interface?Plz help.

 
 Bollywood, fun, friendship, sports and more. You name it, we have it.
 ___
 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 )


Re: [Zope] zope.schema: association vs. containment in Object, List

2008-06-06 Thread Fred Drake
On Fri, Jun 6, 2008 at 4:54 AM, Sean Upton [EMAIL PROTECTED] wrote:
 I want to be able to spell out certain zope.schema.Object fields in my
 interfaces as contained while other fields are declared as

Are you using a source or vocabulary?  If so, this could be part of
the nature of the values returned from that.  A particular source
would provide either objects to be contained, or references (not
contained).

Another reasonable approach (IMO) would be to simply document the
containment/reference relationship in the field's description text or
in a comment alongside the field.

Still another approach, if you're looking to create software support
and the first isn't suitable, is to use fields that provide additional
interfaces that indicate the nature of the references.


 -Fred

--
Fred L. Drake, Jr. fdrake at gmail.com
Chaos is the score upon which reality is written. --Henry Miller
___
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] Support for Charity Challenge events

2008-06-06 Thread Brian Sullivan
Has anybody ever heard of  Zope or other open source software to
support charity challenge events (runs, bikeathons, skip rope, lose
weight, cut hair -- well you know what i mean)?
___
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 on CD

2008-06-06 Thread Ulla Theiss

Hello List,

we need to set a Zope-Installation to read-only to start from cd.
It's Zope 2.10

We set the following directives on zope-conf.
read-only-database on
zserver-read-only-mode on
enable-product-installation off


Then we a custom_zodb.py in %INSTANCE_HOME%

Sometimes Zope starts and sometimes it alerts Permission denied - 
Data.fs.lock


Does anybody know what could be the problem?

Many thanks in advance,
Ulla.





___
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] zope.schema: association vs. containment in Object, List

2008-06-06 Thread Sean Upton
On Fri, Jun 6, 2008 at 7:24 AM, Fred Drake [EMAIL PROTECTED] wrote:
 Still another approach, if you're looking to create software support
 and the first isn't suitable, is to use fields that provide additional
 interfaces that indicate the nature of the references.

My application (and I suspect other cases will) need to do just this;
a marker on the field eliminates the ambiguity.  Schema and interfaces
should allow for complete domain modeling in such a way that
expresses intent of the business case, regardless of the persistence
mechanism or implementation details underneath, so I think I'll
continue to use custom field types marked with an IRelationshipField
interface, and assume the built-in Object, List fields are only used
for containment.  The only thing I do not like about my direction is
that it leaves ambiguity when working with code from other
components/projects that do not share this assumption.

For RDBMS persistence of schema-defined content, z3c.dobbin (for
example) assumes Object fields are just foreign-key relationships, but
the downside to this simplification is an inability to meaningfully
interact with a simple persisted containment scenario (a complex
object that has contained specialized child objects intrinsically part
of the primary object; trying to serialize to JSON with clear
recursion boundaries for example, would be difficult).  In my
application-case, I'm looking to do something similar, but hoping to
do so with a clear bright-line between associations and containment.

Note: removal of such ambiguity is helpful for the possible use case
of schema/interface bootstrapping/generation from UML tools for
model-driven-design.

Sean
___
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] zope.schema: association vs. containment in Object, List

2008-06-06 Thread Fred Drake
On Fri, Jun 6, 2008 at 8:08 PM, Sean Upton [EMAIL PROTECTED] wrote:
 mechanism or implementation details underneath, so I think I'll
 continue to use custom field types marked with an IRelationshipField
 interface, and assume the built-in Object, List fields are only used
 for containment.  The only thing I do not like about my direction is

I'd rather not make any assumption at all; use two interfaces: one
that indicates references, and one that indicates containment.  That
allows you to raise an exception for fields that don't specify, which
would be useful during testing and debugging.  For each such field
found, you'll get to decide how to handle it and stamp the appropriate
interface on the field.


 -Fred

-- 
Fred L. Drake, Jr. fdrake at gmail.com
Chaos is the score upon which reality is written. --Henry Miller
___
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] zope.schema: association vs. containment in Object, List

2008-06-06 Thread Sean Upton
On Fri, Jun 6, 2008 at 7:26 PM, Fred Drake [EMAIL PROTECTED] wrote:
 On Fri, Jun 6, 2008 at 8:08 PM, Sean Upton [EMAIL PROTECTED] wrote:
 mechanism or implementation details underneath, so I think I'll
 continue to use custom field types marked with an IRelationshipField
 interface, and assume the built-in Object, List fields are only used
 for containment.  The only thing I do not like about my direction is

 I'd rather not make any assumption at all; use two interfaces: one
 that indicates references, and one that indicates containment.  That
 allows you to raise an exception for fields that don't specify, which
 would be useful during testing and debugging.  For each such field
 found, you'll get to decide how to handle it and stamp the appropriate
 interface on the field.

Makes sense, so I would have two subclasses of zope.schema.Object, one
for containment, another for association -- each with respective
interfaces and validation behavior.  Explicit declaration of intent
for each field is what I'm aiming for anyway.  Thanks.

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