[Zope-dev] Zope Tests: 3 OK, 3 Failed

2008-12-06 Thread Zope Tests Summarizer
Summary of messages to the zope-tests list.
Period Fri Dec  5 12:00:00 2008 UTC to Sat Dec  6 12:00:00 2008 UTC.
There were 6 messages: 6 from Zope Tests.


Test failures
-

Subject: FAILED (failures=7) : Zope-2.11 Python-2.4.5 : Linux
From: Zope Tests
Date: Fri Dec  5 20:36:57 EST 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-December/010600.html

Subject: FAILED (failures=2) : Zope-trunk Python-2.4.5 : Linux
From: Zope Tests
Date: Fri Dec  5 20:38:28 EST 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-December/010601.html

Subject: FAILED (failures=2) : Zope-trunk Python-2.5.2 : Linux
From: Zope Tests
Date: Fri Dec  5 20:39:58 EST 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-December/010602.html


Tests passed OK
---

Subject: OK : Zope-2.8 Python-2.3.7 : Linux
From: Zope Tests
Date: Fri Dec  5 20:32:27 EST 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-December/010597.html

Subject: OK : Zope-2.9 Python-2.4.5 : Linux
From: Zope Tests
Date: Fri Dec  5 20:33:57 EST 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-December/010598.html

Subject: OK : Zope-2.10 Python-2.4.5 : Linux
From: Zope Tests
Date: Fri Dec  5 20:35:27 EST 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-December/010599.html

___
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] zope.configuration 3.4.1

2008-12-06 Thread Dan Korostelev
The zope.configuration 3.4.1 was tagged as released two months ago,
but it's still not uploaded to PyPI. :-) Can someone upload it?

-- 
WBR, Dan Korostelev
___
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] z3c.autoinclude doesn't include extra_requires

2008-12-06 Thread Ethan Jucovy
Hey Christian,

I finally had a bit of time to sort out my Zope.org SVN credentials
and try to look into this ... but I'm actually not getting very far.

What I'm stumped on: is there any way to find out which extras have
been installed with a package?


The details:
The bad line is src/z3c/autoinclude/dependency.py#L22:
for req in self.context.requires():

(Here self.context is a distribution object, that of the module that
wants to includeDependencies.  We're about to look for ZCML files in
the packages of its dependencies.)

The pkg_resources documentation
(http://peak.telecommunity.com/DevCenter/PkgResources#distribution-objects)
explains:
 requires(extras=())
   List the Requirement objects that specify this distribution's dependencies. 
 If extras is specified, it should be a sequence
   of names of extras defined by the distribution, and the list returned 
 will then include any dependencies needed to
   support the named extras.

So in other words, L22 should look like:
+for req in
self.context.requires(extras=list_of_actively_installed_extras_for_the_distribution):

The problem is, I can't figure out how to figure out which extras are
actively installed.  (We don't want to pass in *all* of the
distribution's extras, because that might include *uninstalled* extras
-- which would mean we end up trying to include ZCML from packages
that we should not be, and that might not even be installed.)

Thanks,
Ethan

On Tue, Nov 11, 2008 at 2:58 AM, Christian Zagrodnick [EMAIL PROTECTED] wrote:

 Hi,

 when I include an egg with extras (like gocept.foo[server]) the
 dependencies from the extra are not automatically included with
 autoinclude.

 I'm posting this here, because there is no other obvious place (no
 project for this on lauchpad).

 Regards,
 --
 Christian Zagrodnick · [EMAIL PROTECTED]
 gocept gmbh  co. kg · forsterstraße 29 · 06112 halle (saale) · germany
 http://gocept.com · tel +49 345 1229889 4 · 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 )
___
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] Guestbook example app stops working

2008-12-06 Thread Bernard Devlin
I think I've worked out what is happening.  I'm assuming that the index_html
is written in ZPT; when edited TTW via the ZMI the expand macros when
editing is checked, so I guess the various TAL features are being removed
(hence it works until it is saved, and after that the dynamic parts are
missing).  I've no idea if there is a way to switch off this expansion by
default.  If there is, I would suggest that Zope is initially installed in
that condition.  As it is currently, I would say the tutorial examples are
quite confusing.  A real newbie would have little idea as to how it could be
that the HTML was being constructed.  I at least have been lurking round
Zope for some time, so I think I've been able to work it out.
bjd

On Sat, Dec 6, 2008 at 7:56 AM, Bernard Devlin [EMAIL PROTECTED] wrote:

 Hi, I'm looking at the idea of using Zope again (a lot seems to have
 changed..)  I'm using Zope 2.11.1, and whilst trying to remind myself of the
 basic machinery of Zope, I  imported the Example apps, and started to fiddle
 around with the Guestbook example.   However, after saving the index_html
 object of the Guestbook, Zope would no longer find any entries to display.
 To check it was simply the act of saving index_html that broke the
 Guestbook, I deleted the Examples folder and re-imported it.  With a fresh
 Examples folder Guestbook worked; simply saving it (without even typing in
 the textarea) would break the Guestbook.  On initial import it shows a
 single Guestbook entry by Amos, but after saving index_html, it reports
 that the Guestbook is empty.  No changes were made to the 'getEntries'
 script, and the Entries folder still has the entry by Amos.

 I can't see any reason why that would be, and hoped someone else could
 explain what the problem is.







___
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] How manage error with zsql

2008-12-06 Thread robert rottermann
hi,

I think you should  write in a python script:

try:
  result = context.insert_data.zsql
  msg = 'data inserted'
except ZeroDivisionError:
  msg = 'ZeroDivisionError occured'

return msg

and in your tal you write:

 div
tal:content=context/MyPythonscript

 /div


allways try to put logic in a python script. it is *far* easier than writing
complicated tal

robert

Miguel Beltran R. schrieb:
 I tried to insert data using an zsql, insert fine How manage error with
 zsql.
 Before
 dtml-try
dtml-call insert_data
Data inserted!!!
 dtml-except
Error type:dtml-var error_type
Error type:dtml-var error_value
 /dtml-try
 
 
 
 Now (All files are ZPT)
 
 [index_html]
 ...
 form action=proyecto_alta.html
 input type=text name=field1 id=field1 /
 ...
 input type=text name=field2 id=field2 /
 /form
 
 
 [proyecto_alta.html]
 div tal:on-error=structure here/error_insertar
tal:condition=context/insert_data.zsql
tal:content=string: Data inserted!!!
 
 /div
 
 
 [error_insertar]
 error=_['error']
 if error.type==ZeroDivisionError:
 return pCan't divide by zero./p
 else:
 return pAn error ocurred./p
   pError type: %s/p
   pError value: %s/p % (error.type,
error.value)
 
 
 But say
 
 Tipo  Unauthorized
 Valor You are not allowed to access 'type' in this context
 TraceBack 
 
 Traceback (innermost last):
 
 * Module ZPublisher.Publish, line 119, in publish
 * Module ZPublisher.mapply, line 88, in mapply
 * Module ZPublisher.Publish, line 42, in call_object
 * Module Shared.DC.Scripts.Bindings, line 313, in __call__
 * Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
 * Module Products.PageTemplates.ZopePageTemplate, line 330, in _exec
 * Module Products.PageTemplates.ZopePageTemplate, line 427, in pt_render
 * Module Products.PageTemplates.PageTemplate, line 96, in pt_render
 * Module zope.pagetemplate.pagetemplate, line 115, in pt_render
 * Module zope.tal.talinterpreter, line 271, in __call__
 * Module zope.tal.talinterpreter, line 346, in interpret
 * Module zope.tal.talinterpreter, line 981, in do_onError_tal
 * Module zope.tal.talinterpreter, line 346, in interpret
 * Module zope.tal.talinterpreter, line 745, in do_insertStructure_tal
 * Module Products.PageTemplates.Expressions, line 199, in
   evaluateStructure
 * Module zope.tales.tales, line 696, in evaluate
   *URL: /ceed/finanza/proyecto/proyecto_alta.html*
   *Line 1, Column 0*
   *Expression: PathExpr standard:u'here/error_insertar'*
   *Names:*
 
   {'container': Folder at /ceed/finanza/proyecto,
'context': Folder at /ceed/finanza/proyecto,
'default': object object at 0x0075A528,
'here': Folder at /ceed/finanza/proyecto,
 
'loop': {},
'nothing': None,
'options': {'args': ()},
'repeat': Products.PageTemplates.Expressions.SafeMapping object at 
 0x02382828,
'request': HTTPRequest, 
 URL=http://sic/finanza/proyecto/proyecto_alta.html,
 
'root': Application at ,
'template': ZopePageTemplate at 
 /ceed/finanza/proyecto/proyecto_alta.html,
'traverse_subpath': [],
'user': User 'admin'}
 
 * Module zope.tales.expressions, line 217, in __call__
 * Module Products.PageTemplates.Expressions, line 139, in _eval
 * Module Products.PageTemplates.Expressions, line 91, in render
 * Module Products.PageTemplates.ZRPythonExpr, line 79, in call_with_ns
 * Module Shared.DC.Scripts.Bindings, line 327, in
   __render_with_namespace__
 * Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
 * Module Products.PythonScripts.PythonScript, line 327, in _exec
 * Module None, line 2, in error_insertar
   *PythonScript at /ceed/finanza/proyecto/error_insertar*
   *Line 2*
 
 Unauthorized: You are not allowed to access 'type' in this context
 
 
 
 (Example taked from
 http://www.plope.com/Books/2_7Edition/AppendixC.stx#2-28
 http://www.plope.com/Books/2_7Edition/AppendixC.stx#2-28)
 
 
 -- 
 
 Lo bueno de vivir un dia mas
 es saber que nos queda un dia menos de vida
 
 
 
 
 ___
 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] How manage error with zsql

2008-12-06 Thread Andreas Jung



  *PythonScript at /ceed/finanza/proyecto/error_insertar*
  *Line 2*

Unauthorized: You are not allowed to access 'type' in this context



I think this is a know issue and be have a bugreport + patch already for 
that within the Launchpad bugtracker. However I cant the ticket number 
right now.


Andreas
begin:vcard
fn:Andreas Jung
n:Jung;Andreas
org:ZOPYX Ltd.  Co. KG
adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany
email;internet:[EMAIL PROTECTED]
title:CEO
tel;work:+49-7071-793376
tel;fax:+49-7071-7936840
tel;home:+49-7071-793257
x-mozilla-html:FALSE
url:www.zopyx.com
version:2.1
end:vcard

___
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] Multiple zope instances using the same storage

2008-12-06 Thread Mark Gibson
I have an unusual setup.  I have 4 distinct Zope instances (4 seperate 
Data.fs').  Each Data.fs is identical - Data is kept in a RDBMS.  I have 
a product I need to install that stores data in the ZODB.  This data is 
stored in one folder.

Now, I *think* I can simply mount this folder in each ZODB and serve the 
storage through a ZEO server - however I've never done this setup, so I 
want to make sure this makes sense and I'm not overlooking potential 
problems.

This is a legacy setup that I'm not responsible for, so I'm trying to 
keep my footprint in this setup as small as possible.  Using Zope 2.7.9.

Thanks,
Mark
___
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] How manage error with zsql

2008-12-06 Thread Dieter Maurer
robert rottermann wrote at 2008-12-6 17:15 +0100:
I think you should  write in a python script:

try:
  result = context.insert_data.zsql

I expect (at least) two errors here. context.insert_data() has
a chance to work.

  msg = 'data inserted'
except ZeroDivisionError:
  msg = 'ZeroDivisionError occured'



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