[Zope-dev] Yet more unicode and page template weirdness

2010-10-13 Thread Chris Withers
Hi All,

In Zope 2.12, try putting the following in a TTW ZPT:

tal:c content=#8250;/

...nothing more, nothing less.

On save, I get:

Compilation failed
type 'exceptions.UnicodeEncodeError': 'ascii' codec can't encode 
character u'\u203a' in position 0: ordinal not in range(128)

If I try and view the template, unsurprisingly, I get:

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.PageTemplates.ZopePageTemplate, line 335, in _exec
Module Products.PageTemplates.ZopePageTemplate, line 432, in pt_render
Module Products.PageTemplates.PageTemplate, line 80, in pt_render
Module zope.pagetemplate.pagetemplate, line 109, in pt_render
Warning: Compilation failed
Warning: type 'exceptions.UnicodeEncodeError': 'ascii' codec can't 
encode character u'\u203a' in position 0: ordinal not in range(128)
PTRuntimeError: ['Compilation failed', type 
'exceptions.UnicodeEncodeError': 'ascii' codec can't encode character 
u'\\u203a' in position 0: ordinal not in range(128)]

Any ideas where the non-ascii character is in the above?

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] (re)moving browser subpackage from zc.catalog?

2010-10-13 Thread Jan-Wijbrand Kolman
On 10/6/10 08:08 , Michael Howitz wrote:
 Am 05.10.2010 um 20:21 schrieb Jan-Wijbrand Kolman:
 Today I fixed a small bug in zc.catalog (the ftesting.zcml depended
 on a permission name that has been removed from zope.dublincore).

 Actually the permission has been renamed (from zope.app.dublincore to
 zope.dublincore)  to get rid of the app part in its name.

If I would be pedantic here I'd say there is no such thing as renaming a 
permission. When the old name is gone, it is gone. There's no mechanism 
similar to the BBB imports for the permission ids.

 This made me realize that zc.catalog contains ZMI code in the
 browser subpackage.

 Are people still using this ZMI code from zc.catalog? Would it be
 an idea to move the ZMI code out of the package (a bit similar to
 how various zope.app.* package have been refactored)? It would
 make maintaining this package in respect to the ZTK easier.

 zc.catalog has only test dependencies on zope.app.* packages. So you
 do not install these dependencies when using zc.calalog as a
 library. The zope.app.* dependencies might need a bit polishing. But
 I do not see a big win moving the browser part into a separate
 package. Especially as zc.catalog should depend on this new package
 for backward compatibility reasons (at least for a while).

Actually, it is more than just a test dependency. The toplevel 
configure.zcml conditionally configures the browser subpackage whenever 
zope.app.form is available. This zope.app.form conditional is not even 
enough, as sometimes you can still have zope.app.form on your path, 
but zcml directives like addMenuItem and editForm used in 
zc.catalog.browser's configure.zcml might not have been configured.

I could imagine we change zc.catalog so that the toplevel configure.zcml 
never includes the browser subpackage's configure.zcml and people that 
need the ZMI code, need to include the zc.catalog.browser subpackage 
themselves. This would still leave the test dependency (which is 
annoying but alas), but at least make the zc.catalog easier to reuse.

regards,
jw

___
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] Zope 2.12 20% slower than Zope 2.9?!

2010-10-13 Thread Chris Withers
On 11/10/2010 19:00, Alan Runyan wrote:
 Try with a smaller batch (whatever you are doing) and profile it.

 I 100% agree with what ajung says.  post a profile of your batch run
 that takes ~30 minutes.

Related to this, what http load testing tools do people around here 
recommend?

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] Another weird unicode error from Zope 2

2010-10-13 Thread Chris Withers
On 12/10/2010 16:00, Charlie Clark wrote:
 Traceback (most recent call last):
 File stdin, line 1, inmodule
 UnicodeEncodeError: 'latin-1' codec can't encode character u'\u203a' in
 position 0: ordinal not in range(256)

 ISO-8859-15 is, of course, Latin-1 + the €

Yes, but I don't see why that is being used...

Some bits from the error_log entry for this request:

HTTP_USER_AGENT 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; 
WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; 
MDDC; .NET CLR 3.5.30729; .NET CLR 3.0.30729; MS-RTC LM 8; .NET4.0C)'

HTTP_ACCEPT '*/*'

HTTP_ACCEPT_LANGUAGE'en-us'

So why on earth is iso8859_15 being picked instead of utf-8?

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] Another weird unicode error from Zope 2

2010-10-13 Thread Charlie Clark
Am 13.10.2010, 12:06 Uhr, schrieb Chris Withers ch...@simplistix.co.uk:

 So why on earth is iso8859_15 being picked instead of utf-8?

I would guess this is the default-publisher-encoding of your system.

Charlie
-- 
Charlie Clark
Managing Director
Clark Consulting  Research
German Office
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
___
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] Yet more unicode and page template weirdness

2010-10-13 Thread Charlie Clark
Am 13.10.2010, 09:53 Uhr, schrieb Chris Withers ch...@simplistix.co.uk:

 Any ideas where the non-ascii character is in the above?

Either this is a trick question or I'm just not getting it.

203a is the hex value of the decimal 8250.

 hex(8250)
'0x203a'

Maybe your question is actually why is the XML entity being converted to  
character data at all?

Charlie
-- 
Charlie Clark
Managing Director
Clark Consulting  Research
German Office
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
___
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] Another weird unicode error from Zope 2

2010-10-13 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chris Withers wrote:
 On 12/10/2010 16:00, Charlie Clark wrote:
 Traceback (most recent call last):
 File stdin, line 1, inmodule
 UnicodeEncodeError: 'latin-1' codec can't encode character u'\u203a' in
 position 0: ordinal not in range(256)

 ISO-8859-15 is, of course, Latin-1 + the €
 
 Yes, but I don't see why that is being used...

I assume you are familar with pdb in order to figure it out.

Andreas
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQGUBAEBAgAGBQJMtYpYAAoJEADcfz7u4AZjgOALwJQ+ml/tJXf/0ARIFZ+8OgDA
nQ3NT9w4NPZ7o3/Fo1xq5FzOV5reTka2vqWPiEW59ANUy2zZp7lHbSKGTh6qn6LB
dOEHn5MwOSYhmPEm3L3sNiwzfXSkwj5rPnSwdIkL/UL9tCAG7uMF4wIyEuNQPcVO
PcQAvvh6cX9ew7P3kmry2JR2EfsmKxo2N+fD/WjnuFSWWxK3dRv0mVGzL+3M3/uA
n0QwWLlNQhfx9jbz4SggQX80E8q8qp9QIuPgtBhDmkswAnTmnoJ0snqOxm/jweXx
k7cu8KNgZ1Tq35+W7KHB+U+DauG8r64H8PA021M0Ppomr8Pdvd+WA3U5C1zH/M1c
M+frBUcO0yuO6IO3vbZUM6LBLtllx2/+MLUnBA3IqzOT3vBOjjLY05LGlbSehPqn
MzTrio7hzigPG2PH1Y1xPP2nDwuoI3obyGpHxHt8YQQL3z/MX4Hx1qQ/+V+5YVyW
4A61uqUA1ORacaIdKt5xFDurx7EpyTw=
=3AYx
-END PGP SIGNATURE-
attachment: lists.vcf___
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] Another weird unicode error from Zope 2

2010-10-13 Thread Chris Withers
On 13/10/2010 11:10, Charlie Clark wrote:
 Am 13.10.2010, 12:06 Uhr, schrieb Chris Withersch...@simplistix.co.uk:

 So why on earth is iso8859_15 being picked instead of utf-8?

 I would guess this is the default-publisher-encoding of your system.

I don't have one set.

So, is iso-8859-15 the default in Zope 2.12? If so, why on earth that 
rather than utf-8?

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] Another weird unicode error from Zope 2

2010-10-13 Thread Charlie Clark
Am 13.10.2010, 12:57 Uhr, schrieb Chris Withers ch...@simplistix.co.uk:

 I don't have one set.
 So, is iso-8859-15 the default in Zope 2.12? If so, why on earth that
 rather than utf-8?

See Zope2/Statup/zopeschema.xml

   key name=default-zpublisher-encoding  
datatype=.default_zpublisher_encoding
  description
This key controls what character set is used to encode unicode
data that reaches ZPublisher without any other specified encoding.
  /description
  metadefaultiso-8859-15/metadefault
   /key

As to why it is iso-8859-anything as opposed to utf-8 is presumably  
because it has historically been the case. I don't know what would break  
if this would change.

Charlie
-- 
Charlie Clark
Managing Director
Clark Consulting  Research
German Office
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
___
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] (re)moving browser subpackage from zc.catalog?

2010-10-13 Thread Michael Howitz
Am 13.10.2010 um 10:02 schrieb Jan-Wijbrand Kolman:
 On 10/6/10 08:08 , Michael Howitz wrote:
 Am 05.10.2010 um 20:21 schrieb Jan-Wijbrand Kolman:
 Today I fixed a small bug in zc.catalog (the ftesting.zcml depended
 on a permission name that has been removed from zope.dublincore).
 
 Actually the permission has been renamed (from zope.app.dublincore to
 zope.dublincore)  to get rid of the app part in its name.
 
 If I would be pedantic here I'd say there is no such thing as renaming a 
 permission. When the old name is gone, it is gone. There's no mechanism 
 similar to the BBB imports for the permission ids.

Not pedantic enough as there is a mechanism to rename a permission, see 
http://pypi.python.org/pypi/zope.dublincore/3.8.0#id3

In version 3.7.0 the backward compatible renaming was removed.

 This made me realize that zc.catalog contains ZMI code in the
 browser subpackage.
 
 Are people still using this ZMI code from zc.catalog? Would it be
 an idea to move the ZMI code out of the package (a bit similar to
 how various zope.app.* package have been refactored)? It would
 make maintaining this package in respect to the ZTK easier.
 
 zc.catalog has only test dependencies on zope.app.* packages. So you
 do not install these dependencies when using zc.calalog as a
 library. The zope.app.* dependencies might need a bit polishing. But
 I do not see a big win moving the browser part into a separate
 package. Especially as zc.catalog should depend on this new package
 for backward compatibility reasons (at least for a while).
 
 Actually, it is more than just a test dependency. The toplevel 
 configure.zcml conditionally configures the browser subpackage whenever 
 zope.app.form is available. This zope.app.form conditional is not even 
 enough, as sometimes you can still have zope.app.form on your path, 
 but zcml directives like addMenuItem and editForm used in 
 zc.catalog.browser's configure.zcml might not have been configured.
 
 I could imagine we change zc.catalog so that the toplevel configure.zcml 
 never includes the browser subpackage's configure.zcml and people that 
 need the ZMI code, need to include the zc.catalog.browser subpackage 
 themselves. This would still leave the test dependency (which is 
 annoying but alas), but at least make the zc.catalog easier to reuse.

I'm fine with these suggestions but I'd suggest a new additional browser 
extra, which declares the dependencies of the browser subpackage.


Yours sincerely,
-- 
Michael Howitz · m...@gocept.com · software developer
gocept gmbh  co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 8 · 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 )


Re: [Zope-dev] (re)moving browser subpackage from zc.catalog?

2010-10-13 Thread Jan-Wijbrand Kolman
On 10/13/10 13:16 , Michael Howitz wrote:
 Am 13.10.2010 um 10:02 schrieb Jan-Wijbrand Kolman:
 If I would be pedantic here I'd say there is no such thing as
 renaming a permission. When the old name is gone, it is gone.
 There's no mechanism similar to the BBB imports for the permission
 ids.

 Not pedantic enough as there is a mechanism to rename a permission,
 see http://pypi.python.org/pypi/zope.dublincore/3.8.0#id3

Ah! Never to late to learn something - I didn't know that!

 I could imagine we change zc.catalog so that the toplevel
 configure.zcml never includes the browser subpackage's
 configure.zcml and people that need the ZMI code, need to include
 the zc.catalog.browser subpackage themselves. This would still
 leave the test dependency (which is annoying but alas), but at
 least make the zc.catalog easier to reuse.

 I'm fine with these suggestions but I'd suggest a new additional
 browser extra, which declares the dependencies of the browser
 subpackage.

Good idea. This would improve the testing situation. That would 
definitely help the Grok Toolkit, as it could then run the normal 
tests in the context of the toolkit, without pulling in the dependencies 
of the browser tests.

kind regards, jw

___
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] (re)moving browser subpackage from zc.catalog?

2010-10-13 Thread Jan-Wijbrand Kolman
On 10/13/10 13:42 , Jan-Wijbrand Kolman wrote:
 Good idea. This would improve the testing situation. That would
 definitely help the Grok Toolkit, as it could then run the normal
 tests in the context of the toolkit, without pulling in the dependencies
 of the browser tests.

Ah, no it wouldn't help there, as the testrunner would find the tests in 
the browser subpackage and it would try to run them regardless.

Then there's no real need for a browser extra, as the browser subpackage 
does not really have any code (only registrations). Or maybe you meant 
something different?

regards, jw


___
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: 35 OK, 6 Failed

2010-10-13 Thread Zope Tests Summarizer
Summary of messages to the zope-tests list.
Period Tue Oct 12 12:00:00 2010 UTC to Wed Oct 13 12:00:00 2010 UTC.
There were 41 messages: 6 from Zope Tests, 4 from buildbot at pov.lt, 20 from 
buildbot at winbot.zope.org, 11 from ccomb at free.fr.


Test failures
-

Subject: FAILED : winbot / ztk_dev py_254_win32
From: buildbot at winbot.zope.org
Date: Tue Oct 12 16:19:06 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021426.html

Subject: FAILED : winbot / ztk_dev py_265_win32
From: buildbot at winbot.zope.org
Date: Tue Oct 12 16:27:57 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021427.html

Subject: FAILED : winbot / ztk_dev py_265_win64
From: buildbot at winbot.zope.org
Date: Tue Oct 12 16:37:21 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021428.html

Subject: FAILED : winbot / ztk_dev py_270_win32
From: buildbot at winbot.zope.org
Date: Tue Oct 12 16:45:58 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021429.html

Subject: FAILED : winbot / ztk_dev py_270_win64
From: buildbot at winbot.zope.org
Date: Tue Oct 12 16:54:46 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021430.html

Subject: FAILED : winbot / zc_buildout_dev py_244_win32
From: buildbot at winbot.zope.org
Date: Tue Oct 12 17:42:56 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021435.html


Tests passed OK
---

Subject: OK : winbot / ztk_10 py_244_win32
From: buildbot at winbot.zope.org
Date: Tue Oct 12 17:04:48 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021431.html

Subject: OK : winbot / ztk_10 py_254_win32
From: buildbot at winbot.zope.org
Date: Tue Oct 12 17:13:27 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021432.html

Subject: OK : winbot / ztk_10 py_265_win32
From: buildbot at winbot.zope.org
Date: Tue Oct 12 17:21:46 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021433.html

Subject: OK : winbot / ztk_10 py_265_win64
From: buildbot at winbot.zope.org
Date: Tue Oct 12 17:30:45 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021434.html

Subject: OK : winbot / zc_buildout_dev py_254_win32
From: buildbot at winbot.zope.org
Date: Tue Oct 12 17:53:22 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021436.html

Subject: OK : winbot / zc_buildout_dev py_265_win32
From: buildbot at winbot.zope.org
Date: Tue Oct 12 18:05:00 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021437.html

Subject: OK : winbot / zc_buildout_dev py_265_win64
From: buildbot at winbot.zope.org
Date: Tue Oct 12 18:15:51 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021438.html

Subject: OK : winbot / zc_buildout_dev py_270_win32
From: buildbot at winbot.zope.org
Date: Tue Oct 12 18:27:17 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021439.html

Subject: OK : winbot / zc_buildout_dev py_270_win64
From: buildbot at winbot.zope.org
Date: Tue Oct 12 18:38:24 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021440.html

Subject: OK : winbot / ZODB_dev py_254_win32
From: buildbot at winbot.zope.org
Date: Tue Oct 12 19:34:43 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021441.html

Subject: OK : ZTK 1.0 / Python2.4.6 Linux 64bit
From: ccomb at free.fr
Date: Tue Oct 12 19:42:33 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021442.html

Subject: OK : ZTK 1.0 / Python2.6.5 Linux 64bit
From: ccomb at free.fr
Date: Tue Oct 12 19:43:04 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021443.html

Subject: OK : ZTK 1.0 / Python2.5.5 Linux 64bit
From: ccomb at free.fr
Date: Tue Oct 12 19:43:13 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021444.html

Subject: OK : winbot / ZODB_dev py_265_win32
From: buildbot at winbot.zope.org
Date: Tue Oct 12 20:31:34 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021445.html

Subject: OK : Zope 3.4 Known Good Set / py2.4-64bit-linux
From: buildbot at pov.lt
Date: Tue Oct 12 21:10:54 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021446.html

Subject: OK : winbot / ZODB_dev py_265_win64
From: buildbot at winbot.zope.org
Date: Tue Oct 12 21:28:24 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021447.html

Subject: OK : Zope-2.10 Python-2.4.6 : Linux
From: Zope Tests
Date: Tue Oct 12 21:30:57 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021448.html

Subject: OK : Zope-2.11 Python-2.4.6 : Linux
From: Zope Tests
Date: Tue Oct 12 21:32:57 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021449.html

Subject: OK : Zope-2.12 Python-2.6.5 : Linux
From: Zope Tests
Date: Tue Oct 12 21:34:57 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021450.html

Subject: OK : 

Re: [Zope-dev] Yet more unicode and page template weirdness

2010-10-13 Thread Chris Withers
On 13/10/2010 11:19, Charlie Clark wrote:
 Maybe your question is actually why is the XML entity being converted to
 character data at all?

I guess so...

My naive experience is that this just works in Zope 2.9 and just 
breaks in 2.12.

 Maybe your question is actually why is the XML entity being converted to
 character data at all?

Yes, absolutely :-)

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
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] (re)moving browser subpackage from zc.catalog?

2010-10-13 Thread Marius Gedminas
On Wed, Oct 13, 2010 at 01:50:39PM +0200, Jan-Wijbrand Kolman wrote:
 On 10/13/10 13:42 , Jan-Wijbrand Kolman wrote:
  Good idea. This would improve the testing situation. That would
  definitely help the Grok Toolkit, as it could then run the normal
  tests in the context of the toolkit, without pulling in the dependencies
  of the browser tests.
 
 Ah, no it wouldn't help there, as the testrunner would find the tests in 
 the browser subpackage and it would try to run them regardless.

You could always conditionally disable them: in each test*.py file have

def test_suite():
suite = unittest.TestSuite()
if some condition:
suite.addTest(unittest.makeSuite(...))
suite.addTest(doctest.DocTestSuite(...))
suite.addTest(doctest.DocFileSuite(...))
return suite

Marius Gedminas
-- 
http://pov.lt/ -- Zope 3/BlueBream consulting and development


signature.asc
Description: Digital 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] Yet more unicode and page template weirdness

2010-10-13 Thread Marius Gedminas
On Wed, Oct 13, 2010 at 08:53:08AM +0100, Chris Withers wrote:
 Hi All,
 
 In Zope 2.12, try putting the following in a TTW ZPT:
 
 tal:c content=#8250;/

Are you sure you didn't mean

  tal:c content=string:#8250;/

?  Because I am pretty sure your TALES namespace does not contain
a variable named ›.

 ...nothing more, nothing less.
 
 On save, I get:
 
 Compilation failed
 type 'exceptions.UnicodeEncodeError': 'ascii' codec can't encode 
 character u'\u203a' in position 0: ordinal not in range(128)
...
 Any ideas where the non-ascii character is in the above?

#8250; is the non-ASCII character, obviously.

The way XML works, all entities in an attribute value are decoded before
being interpreted, so your TALES interpreter gets an expression
u'\u203a' which it then fails to interpret.

Marius Gedminas
-- 
http://pov.lt/ -- Zope 3/BlueBream consulting and development


signature.asc
Description: Digital 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] Yet more unicode and page template weirdness

2010-10-13 Thread Chris Withers
On 13/10/2010 13:47, Marius Gedminas wrote:
 On Wed, Oct 13, 2010 at 08:53:08AM +0100, Chris Withers wrote:
 Hi All,

 In Zope 2.12, try putting the following in a TTW ZPT:

 tal:c content=#8250;/

 Are you sure you didn't mean

tal:c content=string:#8250;/

Ah, d'oh! Thanks for the catch!

 The way XML works, all entities in an attribute value are decoded before
 being interpreted, so your TALES interpreter gets an expression
 u'\u203a' which it then fails to interpret.

Makes sense, thanks! What about entities outside of attributes?

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
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] (re)moving browser subpackage from zc.catalog?

2010-10-13 Thread Michael Howitz

Am 13.10.2010 um 13:50 schrieb Jan-Wijbrand Kolman:

 On 10/13/10 13:42 , Jan-Wijbrand Kolman wrote:
 Good idea. This would improve the testing situation. That would
 definitely help the Grok Toolkit, as it could then run the normal
 tests in the context of the toolkit, without pulling in the dependencies
 of the browser tests.
 
 Ah, no it wouldn't help there, as the testrunner would find the tests in 
 the browser subpackage and it would try to run them regardless.
 
 Then there's no real need for a browser extra, as the browser subpackage 
 does not really have any code (only registrations). Or maybe you meant 
 something different?

When someone wants to use the browser package he could use the browser extra 
to get all the packages needed for the ZCML registrations successfully load. 
Otherwise he has to find out himself where the ZCML directives are declared. 


Yours sincerely,
-- 
Michael Howitz · m...@gocept.com · software developer
gocept gmbh  co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 8 · 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 )


Re: [Zope-dev] Yet more unicode and page template weirdness

2010-10-13 Thread Marius Gedminas
On Wed, Oct 13, 2010 at 01:56:58PM +0100, Chris Withers wrote:
 On 13/10/2010 13:47, Marius Gedminas wrote:
  On Wed, Oct 13, 2010 at 08:53:08AM +0100, Chris Withers wrote:
  In Zope 2.12, try putting the following in a TTW ZPT:
 
  tal:c content=#8250;/
 
  Are you sure you didn't mean
 
 tal:c content=string:#8250;/
 
 Ah, d'oh! Thanks for the catch!
 
  The way XML works, all entities in an attribute value are decoded before
  being interpreted, so your TALES interpreter gets an expression
  u'\u203a' which it then fails to interpret.
 
 Makes sense, thanks! What about entities outside of attributes?

You're absolutely right, 

  #8250;

is a much more straightforward way to insert that character than

  tal:c content=string:#8250;/

Marius Gedminas
-- 
http://pov.lt/ -- Zope 3/BlueBream consulting and development


signature.asc
Description: Digital 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] Moving concrete IAuthenticatorPlugin implementations to zope.pluggableauth

2010-10-13 Thread Jan-Wijbrand Kolman
Hi,

A while ago zope.pluggable split off reusable components from 
zope.app.authentication. The concrete IAuthenticatorPlugin 
implementations (principalfolder and groupfolder) however, were left in 
zope.app.authentication.

I think it makes sense to move these IAuthenticatorPlugin 
implementations to zope.pluggableauth.plugins as well, leaving backwards 
compatibility imports and the browser code in zope.app.authentication.

For both packages I created branches [1][2] for working on this. I moved 
the components and made sure the tests pass again.

If there're no objections I'd like to merge these branches to the 
respective trunks and eventually release zope.pluggableauth 1.1.0 and 
zope.app.authentication 3.9.0.

kind regards, jw

[1] 
http://svn.zope.org/zope.pluggableauth/branches/jw-authenticator-plugins/

[2] 
http://svn.zope.org/zope.app.authentication/branches/jw-move-authenticator-plugins/

___
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 Toolkit 1.0 release

2010-10-13 Thread Jan-Wijbrand Kolman
Hello.

On behalf of the Zope Toolkit release team and the Zope community, I'm
happy to announce the release of Zope Toolkit version 1.0!

You can read more about the release at
http://docs.zope.org/zopetoolkit/releases/overview-1.0.html. The
first ZTK release supports all of Python 2.4, 2.5 and 2.6.

To use the ZTK release, you can use:

[buildout]
extends =
http://download.zope.org/zopetoolkit/index/1.0/ztk-versions.cfg
http://download.zope.org/zopetoolkit/index/1.0/zopeapp-versions.cfg

This release focuses on cleaning up the ztk and zopeapp package lists
by deprecating packages that are not used by any of the frameworks
that use the ZTK. It should provide a stable set of libraries that are 
known to work well together and for the frameworks to expand on.

We post our meeting notes at
http://docs.zope.org/zopetoolkit/releaseteam/index.html. Feel free to
start discussing with us on this mailing list.

Kind regards,
Jan-Wijbrand Kolman

___
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] Buggy zc.recipe.testrunner 1.4.0?

2010-10-13 Thread Jonathan Ballet
Hello,

I noticed that some of our tests started to fail due to missing
environment values in the test script generated by zc.recipe.testrunner.
Switching back the version from 1.4.0 to 1.3.0 fixed the issue.

So, I tried to run the tests of the 1.4.0 release (using the tarball
from Pypi), and I have a bunch of failures, which are summed in the
attached file (also available in http://pastebin.com/HtVk8sKX if the
mailing list doesn't allow attachments). My problem reflects in the
following test:

=
File 
/tmp/sb/zc.recipe.testrunner-1.4.0/src/zc/recipe/testrunner/README.txt,
line 487, in README.txt
Failed example:
cat(sample_buildout, 'bin', 'testdemo')
Expected:
#!python -S
BLANKLINE
import sys
sys.path[0:0] = [
'/sample-buildout/parts/testdemo/site-packages',
]
BLANKLINE
BLANKLINE
import os
path = sys.path[0]
if os.environ.get('PYTHONPATH'):
path = os.pathsep.join([path, os.environ['PYTHONPATH']])
os.environ['PYTHONPATH'] = path
import site # imports custom buildout-generated site.py
import os
sys.argv[0] = os.path.abspath(sys.argv[0])
os.chdir('/sample-buildout/parts/testdemo/working-directory')
os.environ['zc.recipe.testrunner'] = '42'
BLANKLINE
import zope.testrunner
BLANKLINE
if __name__ == '__main__':
zope.testrunner.run([
'--test-path', '/sample-buildout/demo',
])
Got:
#!python
BLANKLINE
import sys
sys.path[0:0] = [
'/sample-buildout/demo',
'/sample-buildout/eggs/zope.testrunner-X-pyN.N.egg',
'/sample-buildout/eggs/zope.interface-X-pyN.N.egg',
'/sample-buildout/eggs/zope.exceptions-X-pyN.N.egg',
'/sample-buildout/eggs/setuptools-X-pyN.N.egg',
]
BLANKLINE
BLANKLINE
import zope.testrunner
BLANKLINE
if __name__ == '__main__':
zope.testrunner.run([
'--test-path', '/sample-buildout/demo',
])
=

As you can see, the generated file misses the line
``os.environ['zc.recipe.testrunner'] = '42' ``.

Here is the content of bin/test generated by Buildout in the
zc.recipe.testrunner 1.4.0 directory (in case there are weird
dependencies):

=
#!/tmp/sb/zc.recipe.testrunner-1.4.0/../bin/python

import sys
sys.path[0:0] = [
'/tmp/sb/zc.recipe.testrunner-1.4.0/src',

'/tmp/sb/zc.recipe.testrunner-1.4.0/eggs/zope.testrunner-4.0.0b5-py2.5.egg',

'/tmp/sb/zc.recipe.testrunner-1.4.0/eggs/zope.interface-3.6.1-py2.5-linux-x86_64.egg',

'/tmp/sb/zc.recipe.testrunner-1.4.0/eggs/zope.exceptions-3.6.1-py2.5.egg',

'/tmp/sb/zc.recipe.testrunner-1.4.0/eggs/setuptools-0.6c12dev_r85381-py2.5.egg',
'/tmp/sb/zc.recipe.testrunner-1.4.0/eggs/zope.testing-3.10.0-py2.5.egg',

'/tmp/sb/zc.recipe.testrunner-1.4.0/eggs/z3c.recipe.scripts-1.0.1-py2.5.egg',
'/tmp/sb/zc.recipe.testrunner-1.4.0/eggs/zc.buildout-1.5.2-py2.5.egg',
'/tmp/sb/zc.recipe.testrunner-1.4.0/eggs/zc.recipe.egg-1.3.2-py2.5.egg',
]


import zope.testrunner

if __name__ == '__main__':
zope.testrunner.run([
'--test-path', '/tmp/sb/zc.recipe.testrunner-1.4.0/src',
])
=

It seems to be a serious regression, so I guess I have something wrong
on my side, otherwise other people would have noticed it. What do I
miss?
Are there any public continuous integration reports for those projects?

Thanks,

 Jonathan
$ cd /tmp/
tmp$ virtualenv --no-site-packages --unzip-setuptools sb
New python executable in sb/bin/python2.5
Also creating executable in sb/bin/python
Installing setuptools.done.
tmp$ cd sb
sb$ wget http://pypi.python.org/packages/source/z/zc.recipe.testrunner/zc.recipe.testrunner-1.4.0.tar.gz
--2010-10-13 17:45:14--  http://pypi.python.org/packages/source/z/zc.recipe.testrunner/zc.recipe.testrunner-1.4.0.tar.gz
Résolution de pypi.python.org... 82.94.164.168, 2001:888:2000:d::a8
Connexion vers pypi.python.org|82.94.164.168|:80...connecté.
requête HTTP transmise, en attente de la réponse...200 OK
Longueur: 27973 (27K) [application/x-gzip]
Sauvegarde en : «zc.recipe.testrunner-1.4.0.tar.gz»

100%[=] 27 973  --.-K/s   ds 0,08s   

2010-10-13 17:45:14 (325 KB/s) - «zc.recipe.testrunner-1.4.0.tar.gz» sauvegardé [27973/27973]

sb$ tar xf zc.recipe.testrunner-1.4.0.tar.gz 
sb$ cd zc.recipe.testrunner-1.4.0/
zc.recipe.testrunner-1.4.0$ ../bin/python bootstrap.py 
Creating directory 

Re: [Zope-dev] PAS CookieAuthHelper and insufficient privileges

2010-10-13 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 10/11/2010 08:21 PM, Laurence Rowe wrote:
 I'm currently implementing single sign on across Plone sites but have
 run into a bit of an issue with the CookieAuthHelper.
 
 Unauthorized accesses are redirected to its login_path attribute even
 when a user is already logged in. Plone works around this with a
 require_login script that traverses to insufficient_privileges (rather
 than login_form) when the user is not anonymous.
 http://dev.plone.org/plone/browser/Plone/trunk/Products/CMFPlone/skins/plone_login/require_login.py
 
 I'd like to avoid having two redirects (one to require_login and then
 one to the remote login page).
 
 One option (as suggested in require_login.py) would be to have
 CookieAuthHelper traverse rather than redirect to the login_path so
 that sites could override the behaviour, though they would then
 presumably need to duplicate the functionality currently in
 CookieAuthHelper.unauthorized (which I must admit to only barely
 understanding...)
 http://zope3.pov.lt/trac/browser/Products.PluggableAuthService/trunk/Products/PluggableAuthService/plugins/CookieAuthHelper.py
 
 Instead, it would seem to make sense to move this functionality login
 / insufficient privileges functionality into the CookieAuthHelp
 itself. I could add an insufficient_privs_path and redirect there
 instead of login_path when a user is already authorized.
 
 Yet another option would be to let logged in unauthorized to percolate
 up and implement that page with an error view.
 
 Any opinions? I'm leaning towards adding an insufficient_privs_path as
 it seems simplest and least invasive. (When not set it would just use
 login_path as normal).

zope-dev@zope.org is the wrong mailing list for PAS-related questions:
please keep them on zope-...@zope.org:

 https://mail.zope.org/mailman/listinfo/zope-pas


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/

iEYEARECAAYFAky12sIACgkQ+gerLs4ltQ6kMgCeK7BdQ7yQryspLaYlT9O8ljWS
ntYAn3qwCRG6V9sW8ihFOLReyIYREkZ5
=C1EF
-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] PAS CookieAuthHelper and insufficient privileges

2010-10-13 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 10/11/2010 08:21 PM, Laurence Rowe wrote:
 I'm currently implementing single sign on across Plone sites but have
 run into a bit of an issue with the CookieAuthHelper.
 
 Unauthorized accesses are redirected to its login_path attribute even
 when a user is already logged in. Plone works around this with a
 require_login script that traverses to insufficient_privileges (rather
 than login_form) when the user is not anonymous.
 http://dev.plone.org/plone/browser/Plone/trunk/Products/CMFPlone/skins/plone_login/require_login.py
 
 I'd like to avoid having two redirects (one to require_login and then
 one to the remote login page).
 
 One option (as suggested in require_login.py) would be to have
 CookieAuthHelper traverse rather than redirect to the login_path so
 that sites could override the behaviour, though they would then
 presumably need to duplicate the functionality currently in
 CookieAuthHelper.unauthorized (which I must admit to only barely
 understanding...)
 http://zope3.pov.lt/trac/browser/Products.PluggableAuthService/trunk/Products/PluggableAuthService/plugins/CookieAuthHelper.py
 
 Instead, it would seem to make sense to move this functionality login
 / insufficient privileges functionality into the CookieAuthHelp
 itself. I could add an insufficient_privs_path and redirect there
 instead of login_path when a user is already authorized.
 
 Yet another option would be to let logged in unauthorized to percolate
 up and implement that page with an error view.
 
 Any opinions? I'm leaning towards adding an insufficient_privs_path as
 it seems simplest and least invasive. (When not set it would just use
 login_path as normal).

Please do this kind of disruptive change in a *new* plugin, perhaps
subclassed from the existing one.  The whole point of plugins in the
first place was to allow for folks with different needs to handle them
by replacement.


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/

iEYEARECAAYFAky123AACgkQ+gerLs4ltQ7L+wCZASZR/p9/K/0W+/Yski/6nMBp
LkQAnj6nCfaq+1oTXK4JRgxvqxpxPE5n
=Fh3T
-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] Moving concrete IAuthenticatorPlugin implementations to zope.pluggableauth

2010-10-13 Thread Michael Howitz
Am 13.10.2010 um 16:05 schrieb Jan-Wijbrand Kolman:

 Hi,
 
 A while ago zope.pluggable split off reusable components from 
 zope.app.authentication. The concrete IAuthenticatorPlugin 
 implementations (principalfolder and groupfolder) however, were left in 
 zope.app.authentication.
 
 I think it makes sense to move these IAuthenticatorPlugin 
 implementations to zope.pluggableauth.plugins as well, leaving backwards 
 compatibility imports and the browser code in zope.app.authentication.
 
 For both packages I created branches [1][2] for working on this. I moved 
 the components and made sure the tests pass again.
 
 If there're no objections I'd like to merge these branches to the 
 respective trunks and eventually release zope.pluggableauth 1.1.0 and 
 zope.app.authentication 3.9.0.

+1

Yours sincerely,
-- 
Michael Howitz · m...@gocept.com · software developer
gocept gmbh  co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 8 · 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 )


Re: [Zope-dev] Zope Toolkit 1.0 release

2010-10-13 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 10/13/2010 11:59 AM, Jan-Wijbrand Kolman wrote:
 Hello.
 
 On behalf of the Zope Toolkit release team and the Zope community, I'm
 happy to announce the release of Zope Toolkit version 1.0!
 
 You can read more about the release at
 http://docs.zope.org/zopetoolkit/releases/overview-1.0.html. The
 first ZTK release supports all of Python 2.4, 2.5 and 2.6.
 
 To use the ZTK release, you can use:
 
 [buildout]
 extends =
 http://download.zope.org/zopetoolkit/index/1.0/ztk-versions.cfg
 http://download.zope.org/zopetoolkit/index/1.0/zopeapp-versions.cfg
 
 This release focuses on cleaning up the ztk and zopeapp package lists
 by deprecating packages that are not used by any of the frameworks
 that use the ZTK. It should provide a stable set of libraries that are
 known to work well together and for the frameworks to expand on.
 
 We post our meeting notes at
 http://docs.zope.org/zopetoolkit/releaseteam/index.html. Feel free to
 start discussing with us on this mailing list.

Yay!  Congratulations and thanks for all the hard work the team has put
into getting this release out the door.


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/

iEYEARECAAYFAky19GkACgkQ+gerLs4ltQ4aWQCdEiVC9rXZ8HXRA3sfadeSd8PD
NNIAn0syAOwqWaJW7qCfaDOV1+cPzyHw
=ngww
-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] PAS CookieAuthHelper and insufficient privileges

2010-10-13 Thread Laurence Rowe
On 13 October 2010 17:16, Tres Seaver tsea...@palladion.com wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 10/11/2010 08:21 PM, Laurence Rowe wrote:
 I'm currently implementing single sign on across Plone sites but have
 run into a bit of an issue with the CookieAuthHelper.

 Unauthorized accesses are redirected to its login_path attribute even
 when a user is already logged in. Plone works around this with a
 require_login script that traverses to insufficient_privileges (rather
 than login_form) when the user is not anonymous.
 http://dev.plone.org/plone/browser/Plone/trunk/Products/CMFPlone/skins/plone_login/require_login.py

 I'd like to avoid having two redirects (one to require_login and then
 one to the remote login page).

 One option (as suggested in require_login.py) would be to have
 CookieAuthHelper traverse rather than redirect to the login_path so
 that sites could override the behaviour, though they would then
 presumably need to duplicate the functionality currently in
 CookieAuthHelper.unauthorized (which I must admit to only barely
 understanding...)
 http://zope3.pov.lt/trac/browser/Products.PluggableAuthService/trunk/Products/PluggableAuthService/plugins/CookieAuthHelper.py

 Instead, it would seem to make sense to move this functionality login
 / insufficient privileges functionality into the CookieAuthHelp
 itself. I could add an insufficient_privs_path and redirect there
 instead of login_path when a user is already authorized.

 Yet another option would be to let logged in unauthorized to percolate
 up and implement that page with an error view.

 Any opinions? I'm leaning towards adding an insufficient_privs_path as
 it seems simplest and least invasive. (When not set it would just use
 login_path as normal).

 Please do this kind of disruptive change in a *new* plugin, perhaps
 subclassed from the existing one.  The whole point of plugins in the
 first place was to allow for folks with different needs to handle them
 by replacement.

I'd be interested to hear how other PAS users deal with this issue -
showing an insufficient privileges page rather than a login form to
already logged in users seems a common requirement.

Would you consider adding an optional insufficient_privs_path to
CookieAuthHelper a disruptive change? (Assuming it defaulted to the
current behaviour when set to a default ''.)

Making plone.session's SessionPlugin subclass CookieAuthHelper rather
than work in concert with it would certainly be an option if that was
thought preferable.

(Keeping this thread on this list rather than starting a new one on
Zope-PAS. Is the Zope-PAS list still alive or does it come under the
list rationalization that's been discussed? Two comments from Wichert
in the last year on checkin messages, no discussion.)

Laurence
___
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] Zope Tests: 35 OK, 6 Failed

2010-10-13 Thread Marius Gedminas
On Wed, Oct 13, 2010 at 01:58:29PM +0200, Zope Tests Summarizer wrote:
 Summary of messages to the zope-tests list.
 Period Tue Oct 12 12:00:00 2010 UTC to Wed Oct 13 12:00:00 2010 UTC.
 There were 41 messages: 6 from Zope Tests, 4 from buildbot at pov.lt,
 20 from buildbot at winbot.zope.org, 11 from ccomb at free.fr.
 
 
 Test failures
 -
 
 Subject: FAILED : winbot / ztk_dev py_254_win32
 From: buildbot at winbot.zope.org
 Date: Tue Oct 12 16:19:06 EDT 2010
 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021426.html

Let's fix them, there aren't many left.

Here there's just zope.testrunner.  So what if I don't have a Windows
machine handy?

  $ wine python-2.7.msi
  $ cd ~/src/zope.testrunner
  $ wine c:/python27/python.exe bootstrap.py
  $ wine bin/buildout.exe
  $ wine bin/test.exe -pvc
  hack hack hack

Wine worked like a charm, except for pdb support -- input buffering is
all screwed up, the tty remains in cooked mode, so I have to type a
bunch of pdb commands blind, then hit Ctrl-D to get them all to execute
and see the results.  And it screws my terminal mode.  Anyway.

In short, I fixed those.  Will ZTK trunk pick them up, or does somebody
need to make a zope.testrunner release and edit some version pins in the
ZTK?

Incidentally, someone familiar with subunit should take a look at
http://zope3.pov.lt/trac/changeset/117532

 Subject: FAILED : winbot / ztk_dev py_265_win32
 From: buildbot at winbot.zope.org
 Date: Tue Oct 12 16:27:57 EDT 2010
 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021427.html

Same error.

 Subject: FAILED : winbot / ztk_dev py_265_win64
 From: buildbot at winbot.zope.org
 Date: Tue Oct 12 16:37:21 EDT 2010
 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021428.html

Same error.

 Subject: FAILED : winbot / ztk_dev py_270_win32
 From: buildbot at winbot.zope.org
 Date: Tue Oct 12 16:45:58 EDT 2010
 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021429.html

Two errors here, but the second (zope.app.wsgi) happens on Linux too.
The Health Agency runs a buildbot that doesn't send any error emails
(yet, I hope), here's the same failure:
http://dev.thehealthagency.com/buildbot/builders/zopetoolkit-py2.7%20slave-ubuntu32/builds/0/steps/test_1/logs/stdio

 Subject: FAILED : winbot / ztk_dev py_270_win64
 From: buildbot at winbot.zope.org
 Date: Tue Oct 12 16:54:46 EDT 2010
 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021430.html

Ditto.

 Subject: FAILED : winbot / zc_buildout_dev py_244_win32
 From: buildbot at winbot.zope.org
 Date: Tue Oct 12 17:42:56 EDT 2010
 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021435.html

I ran out of steam before looking at this one.

Marius Gedminas
-- 
http://pov.lt/ -- Zope 3/BlueBream consulting and development


signature.asc
Description: Digital 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] Zope Tests: 35 OK, 6 Failed

2010-10-13 Thread Jan-Jaap Driessen
On 14 October 2010 03:18, Marius Gedminas mar...@gedmin.as wrote:
 On Wed, Oct 13, 2010 at 01:58:29PM +0200, Zope Tests Summarizer wrote:
...
 Subject: FAILED : winbot / ztk_dev py_270_win32
 From: buildbot at winbot.zope.org
 Date: Tue Oct 12 16:45:58 EDT 2010
 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021429.html

 Two errors here, but the second (zope.app.wsgi) happens on Linux too.
 The Health Agency runs a buildbot that doesn't send any error emails
 (yet, I hope), here's the same failure:
 http://dev.thehealthagency.com/buildbot/builders/zopetoolkit-py2.7%20slave-ubuntu32/builds/0/steps/test_1/logs/stdio

I have a hunch where this error comes from and am working on a fix.
The THA buildbot is back in active duty, it started sending emails
last night.

-- 
Jan-Jaap Driessen
___
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 )