[Zope] Iteration over columns in ZSQLMethod result not working in Zope 2.12.13

2010-12-01 Thread Andreas Elvers
Hi,

I stumbled over the following error using Zope 2.12.13. Bug ?

Given some ZSQLMethod,  and either ZMySQLDA (3.1.1) or ZPsycopgDA 
(2.0.14 or 2.2.2)
and the following python script:

result = context.someZSQLMethod()
for row in result:
for col in row: #this will fail
   pass

I get an AttributeError: __iter__

Traceback (innermost last):
   Module ZPublisher.Publish, line 127, in publish
   Module ZPublisher.mapply, line 77, in mapply
   Module ZPublisher.Publish, line 47, in call_object
   Module Shared.DC.Scripts.Bindings, line 324, in __call__
   Module Shared.DC.Scripts.Bindings, line 361, in _bindAndExec
   Module Products.PythonScripts.PythonScript, line 344, in _exec
   Module script, line 3, in someZSQLMethod
- PythonScript at /testfolder/somePythonScript
- Line 3
   Module AccessControl.ZopeGuards, line 181, in next
   Module AccessControl.ZopeGuards, line 211, in guard
   Module AccessControl.SecurityManagement, line 21, in getSecurityManager
AttributeError: __iter__

- Andreas



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


Re: [Zope] Iteration over columns in ZSQLMethod result not working in Zope 2.12.13

2010-12-01 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12/01/2010 08:27 AM, Andreas Elvers wrote:
 Hi,
 
 I stumbled over the following error using Zope 2.12.13. Bug ?
 
 Given some ZSQLMethod,  and either ZMySQLDA (3.1.1) or ZPsycopgDA 
 (2.0.14 or 2.2.2)
 and the following python script:
 
 result = context.someZSQLMethod()
 for row in result:
 for col in row: #this will fail
pass
 
 I get an AttributeError: __iter__
 
 Traceback (innermost last):
Module ZPublisher.Publish, line 127, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 47, in call_object
Module Shared.DC.Scripts.Bindings, line 324, in __call__
Module Shared.DC.Scripts.Bindings, line 361, in _bindAndExec
Module Products.PythonScripts.PythonScript, line 344, in _exec
Module script, line 3, in someZSQLMethod
 - PythonScript at /testfolder/somePythonScript
 - Line 3
Module AccessControl.ZopeGuards, line 181, in next
Module AccessControl.ZopeGuards, line 211, in guard
Module AccessControl.SecurityManagement, line 21, in getSecurityManager
 AttributeError: __iter__

I don't think the Record class fills the 'tp_iter' slot.  Does the
following workaround help?

  result = context.someZSQLMethod()
  for row in result:
  for i in range(len(row)):
 col = row[i[



Tres.
- -- 
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkz2UxAACgkQ+gerLs4ltQ79tgCgvTqC6Kgsk60n7kUuh95FYfMQ
Gd0An2al8dDlrfKvLT+VIJw3ODGacigo
=YFm1
-END PGP SIGNATURE-

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


Re: [Zope] Iteration over columns in ZSQLMethod result not working in Zope 2.12.13

2010-12-01 Thread Andreas Elvers
Am 1.12.10 14:52 , schrieb Tres Seaver:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 12/01/2010 08:27 AM, Andreas Elvers wrote:
 Hi,

 I stumbled over the following error using Zope 2.12.13. Bug ?

 Given some ZSQLMethod,  and either ZMySQLDA (3.1.1) or ZPsycopgDA
 (2.0.14 or 2.2.2)
 and the following python script:

 result = context.someZSQLMethod()
 for row in result:
  for col in row: #this will fail
 pass

 I get an AttributeError: __iter__

 Traceback (innermost last):
 Module ZPublisher.Publish, line 127, in publish
 Module ZPublisher.mapply, line 77, in mapply
 Module ZPublisher.Publish, line 47, in call_object
 Module Shared.DC.Scripts.Bindings, line 324, in __call__
 Module Shared.DC.Scripts.Bindings, line 361, in _bindAndExec
 Module Products.PythonScripts.PythonScript, line 344, in _exec
 Module script, line 3, in someZSQLMethod
  -PythonScript at /testfolder/somePythonScript
  - Line 3
 Module AccessControl.ZopeGuards, line 181, in next
 Module AccessControl.ZopeGuards, line 211, in guard
 Module AccessControl.SecurityManagement, line 21, in getSecurityManager
 AttributeError: __iter__

 I don't think the Record class fills the 'tp_iter' slot.  Does the
 following workaround help?

result = context.someZSQLMethod()
for row in result:
for i in range(len(row)):
   col = row[i[



Yep. That one is working. Although that makes the planned upgrade from 
Zope 2.10 to 2.12 a real pain because I use a lot of the following :

result = context.someZSQLMethod()
names = result.names()
dataForTemplate = dict(zip(names,result[0]))
dataForTemplate['addingSomeMoreData'] = 'datadata'
return context.comeTemplate(data=dataForTemplate)

When did the iteration feature go away ? Must have missed the 
deprecation process.

- Andreas

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


Re: [Zope-dev] Draft of new aggregator

2010-12-01 Thread Jens Vagelpohl
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12/1/10 08:59 , Wichert Akkerman wrote:
 On 2010-12-1 07:43, Christian Theune wrote:
 Here's the draft we ended up with yesterday:
 http://dpaste.com/281566/
 
 Can you move the non-OK results above the list of reports received? That 
 way you have the most important information first.

- -1 on moving. Maybe the non-OK entries could be copied into an
additional section at the top instead.

If I understood Christian right he wants to keep the full list of
entries sorted so everyone knows where to find their items of interest
quickly. I think that's valuable, the full list should stay as it is.

jens

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

iEYEARECAAYFAkz2AaIACgkQRAx5nvEhZLLlWQCfYe170tCqd2V8t1FIzfshy62Z
0e4AoIHHCd+UFaOvbfFkmOnLNn4zVAcf
=kEXo
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Draft of new aggregator

2010-12-01 Thread Wichert Akkerman
On 12/1/10 09:04 , Jens Vagelpohl wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 12/1/10 08:59 , Wichert Akkerman wrote:
 On 2010-12-1 07:43, Christian Theune wrote:
 Here's the draft we ended up with yesterday:
 http://dpaste.com/281566/

 Can you move the non-OK results above the list of reports received? That
 way you have the most important information first.

 - -1 on moving. Maybe the non-OK entries could be copied into an
 additional section at the top instead.

 If I understood Christian right he wants to keep the full list of
 entries sorted so everyone knows where to find their items of interest
 quickly. I think that's valuable, the full list should stay as it is.

It does mean that you always have to scroll down 3 pages before you see 
anything important.

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


Re: [Zope-dev] Draft of new aggregator

2010-12-01 Thread Jens Vagelpohl
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12/1/10 09:28 , Wichert Akkerman wrote:
 On 12/1/10 09:04 , Jens Vagelpohl wrote:
 On 12/1/10 08:59 , Wichert Akkerman wrote:
 On 2010-12-1 07:43, Christian Theune wrote:
 Here's the draft we ended up with yesterday:
 http://dpaste.com/281566/
 Can you move the non-OK results above the list of reports received? That
 way you have the most important information first.
 - -1 on moving. Maybe the non-OK entries could be copied into an
 additional section at the top instead.

 If I understood Christian right he wants to keep the full list of
 entries sorted so everyone knows where to find their items of interest
 quickly. I think that's valuable, the full list should stay as it is.
 
 It does mean that you always have to scroll down 3 pages before you see 
 anything important.

No it does not. I said Maybe the non-OK entries could be copied into an
additional section at the top instead.

jens

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

iEYEARECAAYFAkz2DKAACgkQRAx5nvEhZLLNoQCdE1EM0G603TRYCOfsRXHlIvRX
E/EAn2H4WSQt+1B8iJq4s+SrXm8h/U//
=6zF7
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Zope Tests: 69 OK, 10 Failed

2010-12-01 Thread Zope Tests Summarizer
Summary of messages to the zope-tests list.
Period Tue Nov 30 13:00:00 2010 UTC to Wed Dec  1 13:00:00 2010 UTC.
There were 79 messages: 6 from Zope Tests, 4 from buildbot at pov.lt, 19 from 
buildbot at winbot.zope.org, 9 from ccomb at free.fr, 41 from jdriessen at 
thehealthagency.com.


Test failures
-

Subject: FAILED : Zope Buildbot / zope2.13-py2.7 slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Tue Nov 30 13:20:40 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-November/025317.html

Subject: FAILED : Zope Buildbot / zopetoolkit-1.0_win-py2.5 slave-win
From: jdriessen at thehealthagency.com
Date: Tue Nov 30 13:22:42 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-November/025319.html

Subject: FAILED : Zope Buildbot / zope2.14-py2.7 slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Tue Nov 30 13:24:31 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-November/025320.html

Subject: FAILED : Zope Buildbot / zopetoolkit_win-py2.5 slave-win
From: jdriessen at thehealthagency.com
Date: Tue Nov 30 13:34:36 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-November/025325.html

Subject: FAILED : Zope Buildbot / zope2.13-py2.7 slave-ubuntu32
From: jdriessen at thehealthagency.com
Date: Tue Nov 30 13:35:26 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-November/025326.html

Subject: FAILED : Zope Buildbot / zope2.14-py2.7 slave-ubuntu32
From: jdriessen at thehealthagency.com
Date: Tue Nov 30 13:39:07 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-November/025329.html

Subject: FAILED : Zope Buildbot / zopetoolkit-py2.7 slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Tue Nov 30 13:55:42 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-November/025337.html

Subject: FAILED : Zope Buildbot / zopetoolkit-py2.7 slave-ubuntu32
From: jdriessen at thehealthagency.com
Date: Tue Nov 30 14:14:36 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-November/025344.html

Subject: FAILED : winbot / ztk_dev py_270_win64
From: buildbot at winbot.zope.org
Date: Tue Nov 30 15:46:15 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-November/025357.html

Subject: FAILED : winbot / ztk_10 py_244_win32
From: buildbot at winbot.zope.org
Date: Tue Nov 30 15:55:41 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-November/025358.html


Tests passed OK
---

Subject: OK : Zope Buildbot / zope2.13_win-py2.6 slave-win
From: jdriessen at thehealthagency.com
Date: Tue Nov 30 12:59:20 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-November/025312.html

Subject: OK : Zope Buildbot / zope2.13_win-py2.7 slave-win
From: jdriessen at thehealthagency.com
Date: Tue Nov 30 13:02:04 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-November/025313.html

Subject: OK : Zope Buildbot / zopetoolkit-1.0_win-py2.4 slave-win
From: jdriessen at thehealthagency.com
Date: Tue Nov 30 13:16:37 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-November/025314.html

Subject: OK : Zope Buildbot / zope2.12-py2.6 slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Tue Nov 30 13:16:46 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-November/025315.html

Subject: OK : Zope Buildbot / zope2.13-py2.6 slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Tue Nov 30 13:18:42 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-November/025316.html

Subject: OK : Zope Buildbot / zope2.14-py2.6 slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Tue Nov 30 13:22:37 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-November/025318.html

Subject: OK : Zope Buildbot / zopetoolkit-1.0-py2.4 slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Tue Nov 30 13:29:57 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-November/025321.html

Subject: OK : Zope Buildbot / zope2.12-py2.6 slave-ubuntu32
From: jdriessen at thehealthagency.com
Date: Tue Nov 30 13:31:37 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-November/025322.html

Subject: OK : Zope Buildbot / zope2.13-py2.6 slave-ubuntu32
From: jdriessen at thehealthagency.com
Date: Tue Nov 30 13:33:31 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-November/025323.html

Subject: OK : Zope Buildbot / zopetoolkit-1.0_win-py2.6 slave-win
From: jdriessen at thehealthagency.com
Date: Tue Nov 30 13:34:26 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-November/025324.html

Subject: OK : Zope Buildbot / zopetoolkit-1.0-py2.5 slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Tue Nov 30 13:36:03 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-November/025327.html

Subject: OK : Zope Buildbot / zope2.14-py2.6 slave-ubuntu32
From: jdriessen at thehealthagency.com
Date: Tue Nov 30 13:37:20 EST 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-November/025328.html

Subject: OK : Zope Buildbot / 

Re: [Zope-dev] Draft of new aggregator

2010-12-01 Thread Adam GROSZER
Hello Christian,

Wednesday, December 1, 2010, 7:43:20 AM, you wrote:

CT Here's the draft we ended up with yesterday:
CT http://dpaste.com/281566/

When do you intend to switch to that?
My eyes just hurt looking at the old one.

-- 
Best regards,
 Adam GROSZERmailto:agros...@gmail.com
--
Quote of the day:
Words are the voice of the heart.

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


Re: [Zope-dev] Draft of new aggregator

2010-12-01 Thread Benji York
On Wed, Dec 1, 2010 at 3:04 AM, Jens Vagelpohl j...@dataflake.org wrote:
 If I understood Christian right he wants to keep the full list of
 entries sorted so everyone knows where to find their items of interest
 quickly. I think that's valuable, the full list should stay as it is.

+1  Perhaps even a blank line between groups would help accentuate the
groupings.
-- 
Benji York
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] SVN: Products.ExternalEditor/trunk/Products/ExternalEditor/ Clean-up

2010-12-01 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12/01/2010 10:06 AM, Matthias Broquet wrote:
 Log message for revision 118661:
   Clean-up
   
   
 
 Changed:
   U   Products.ExternalEditor/trunk/Products/ExternalEditor/ExternalEditor.py
   D   Products.ExternalEditor/trunk/Products/ExternalEditor/zopeedit.py

Can somebody please explain why the client script is moved out to a
package hosted on the Plone collective SVN?


Tres.
- -- 
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkz2h/wACgkQ+gerLs4ltQ6J1ACeKBuL5R+yIOfbC8M2tqIQlJO2
79IAoLBIstoRocgOlVsqi7JBz92Z7SFl
=1ZQ/
-END PGP SIGNATURE-

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


Re: [Zope-dev] Draft of new aggregator

2010-12-01 Thread Christian Theune
On 12/01/2010 03:17 PM, Benji York wrote:
 On Wed, Dec 1, 2010 at 3:04 AM, Jens Vagelpohlj...@dataflake.org  wrote:
 If I understood Christian right he wants to keep the full list of
 entries sorted so everyone knows where to find their items of interest
 quickly. I think that's valuable, the full list should stay as it is.

 +1  Perhaps even a blank line between groups would help accentuate the
 groupings.

I thought about that, too. However, there's no homogeneous syntax 
currently in place that defines the groups.


-- 
Christian Theune · c...@gocept.com
gocept gmbh  co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1
Zope and Plone consulting and development

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