Re: [Zope-dev] Re: Five registerPackage results in unresolved ConflictError

2008-05-22 Thread Michael Howitz

Am 22.05.2008 um 08:20 schrieb Dieter Maurer:

[...]
This looks like the misfeature Zope does not start in debug mode
when a single product import fails. In non debug mode, product
import failures are logged but Zope nevertheless starts.



I don't think that this is a misfeature because in debug mode you want  
to know if something fails as early as possible, so you can fix it.


Yours sincerely,
--
Michael Howitz · [EMAIL PROTECTED] · 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
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] [Checkins] SVN: zc.recipe.testrunner/trunk/src/zc/recipe/testrunner/README.txt made doctest sections from the literal sections

2008-08-25 Thread Michael Howitz
Am 25.08.2008 um 15:25 schrieb Benji York:

 On Mon, Aug 25, 2008 at 6:24 AM, Michael Howitz [EMAIL PROTECTED] wrote:
 Log message for revision 90184:
 made doctest sections from the literal sections

 Thanks for removing the unneccesary -- and inappropriate -- double
 colons.  However, for better or worse, the nearly universal style in
 zope.* code is to indent doctest blocks in stand-alone text files, so
 please restore the previous indentation.


Sorry, did not know this, corrected it now.

Yours sincerely,
-- 
Michael Howitz · [EMAIL PROTECTED] · 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
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] [Checkins] SVN: zc.sourcefactory/trunk/src/zc/sourcefactory/browser/token.txt as it seems impossible to upload umlauts in long_description to pypi using distutils, so I had to replace t

2008-08-28 Thread Michael Howitz
Am 27.08.2008 um 14:21 wrote Jacob Holm:

 This looks like a bad idea.  You are weakening the test by removing  
 non-ascii chars here.  A better approach would have been to rewrite  
 the non-ascii chars using \N (or \u or \U) escapes.

According to Christian Then this suggestion does not help as the test  
should test real umlauts.
So I'll try harder on preparing the long_description (encoding it to  
unicode by myself before distutils tries to do) and revert the test.

Yours sincerely,
-- 
Michael Howitz · [EMAIL PROTECTED] · 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
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] Interface for renderable component

2008-11-06 Thread Michael Howitz
Am 17.09.2008 um 01:57 schrieb Roger Ineichen:
[...]
 Could this package be called ``zope.browser`` then?

 +1 to this hot topic

 I like the idea to have a pure interface package
 for some basic (context, request) adapter components
 called views, browser pages or contentprovider etc.


Hi, is there any progress on this idea? Anyone who plans to implement  
it?


Yours sincerely,
-- 
Michael Howitz · [EMAIL PROTECTED] · 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
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] [Checkins] SVN: zc.sourcefactory/trunk/buildout.cfg color by default

2008-12-09 Thread Michael Howitz
Am 08.12.2008 um 21:05 schrieb Fred Drake:
[...]
 - add configuration support, so this can be set per-user, rather than
 polluting buildout.cfg for everyone.


+1

I reverted the change in zc.sourcefactory.


Yours sincerely,
-- 
Michael Howitz · [EMAIL PROTECTED] · 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
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.form 2.0 release

2008-12-09 Thread Michael Howitz
Am 08.12.2008 um 08:27 schrieb Stephan Richter:
 On Friday 05 December 2008, Martin Aspeli wrote:
 Is there any indication on when we'll see a 2.0 release of z3c.form?

 We need a widget that's not in the 1.9 release, but is on trunk  
 (for a
 list with textline value type), and are wondering whether to roll our
 own or wait for a new z3c.form release.

 I am considering the code feature complete. I would like to get  
 confirmation
 from people that (a) the z3c.pt integration works well and (b) the  
 object
 widget is useful. Oh yes, and since I have not done the development,  
 are we
 100% test covered?


There is still the zagy-sources branch which makes z3c.form usable  
together with sources (not only vocabularies). I'd be happy to merge  
it to the trunk.

But it adds a dependency to zope.app.form as it needs  
zope.app.form.browser.interfaces.ITerms.
There was a discussion to move this interface to a new package called  
zope.browser [1].
But I don't know if there was any progress.


[1] ... http://www.mail-archive.com/zope-dev@zope.org/msg26480.html

Yours sincerely,
-- 
Michael Howitz · [EMAIL PROTECTED] · 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
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.form 2.0 release

2008-12-09 Thread Michael Howitz
Am 09.12.2008 um 11:01 schrieb Roger Ineichen:
[...]
 There is still the zagy-sources branch which makes z3c.form
 usable together with sources (not only vocabularies). I'd be
 happy to merge it to the trunk.

 But it adds a dependency to zope.app.form as it needs
 zope.app.form.browser.interfaces.ITerms.
 There was a discussion to move this interface to a new
 package called zope.browser [1].
 But I don't know if there was any progress.

 Uhh, that's me. I will definitely move the ITerms
 around like proposed in this and other mails.
 But the leak of time is the problem.

 I think it should not be a show stopper. Or is it?
 If so I should probably do that ASAP?

As Stephan suggested a zope.browser package with only the ITerms  
interface would be enough for the first step.

 A dependency to zope.app.form is definitely a no go
 for z3c.form!

ACK.

Yours sincerely,
-- 
Michael Howitz · [EMAIL PROTECTED] · 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
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.form 2.0 release

2008-12-09 Thread Michael Howitz
Am 09.12.2008 um 12:15 schrieb Roger Ineichen:
[...]
 Should I do that tomorrow? And adjust all related packages
 like zope.app.form, z3c.form etc. Are there other packages
 which use ITerms except the one in zope.*?

zc.sourcefactory, but I can migrate it myself.

 Christian, are you fine with this? Can you based on that
 merge your branch to z3c.form?

Which Christian? If you mean me (I added tests to Christian  
Zagrodnick's branch.), I can merge it when  
zope.browser.interfaces.ITerms is there.

Yours sincerely,
-- 
Michael Howitz · [EMAIL PROTECTED] · 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
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.form 2.0 release

2008-12-09 Thread Michael Howitz
Am 09.12.2008 um 11:06 schrieb Stephan Richter:
 On Tuesday 09 December 2008, Michael Howitz wrote:
 There is still the zagy-sources branch which makes z3c.form usable
 together with sources (not only vocabularies). I'd be happy to merge
 it to the trunk.

 I would love to have this branch merged and even wait a few days  
 with the
 release process.

Nice.

 But it adds a dependency to zope.app.form as it needs
 zope.app.form.browser.interfaces.ITerms.
 There was a discussion to move this interface to a new package called
 zope.browser [1].
 But I don't know if there was any progress.

 That is a real problem, as I really do not want a dependency on  
 zope.app.form.

 I do not think there has been progress on the discussion, but we  
 should just
 release the zope.browser package with this one interface in it for  
 now.

+1

 Another alternative would be for z3c.form to specify an ITerms  
 interface.
 Porting from zope.app.form to z3c.form would be easy, since only one  
 import
 would need to change.


-1
This does not work with other products like zc.sourcefactory which  
expect the interface in zope.app.form.
As zc.sourcefactory has to work with zope.formlib, it can't use an  
interface from z3c.form to register its adapters.


Yours sincerely,
-- 
Michael Howitz · [EMAIL PROTECTED] · 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
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.form 2.0 release

2008-12-11 Thread Michael Howitz
Am 09.12.2008 um 12:15 schrieb Roger Ineichen:
[...]
 Should I do that tomorrow? And adjust all related packages
 like zope.app.form, z3c.form etc. Are there other packages
 which use ITerms except the one in zope.*?

 Christian, are you fine with this? Can you based on that
 merge your branch to z3c.form?


I merged the zagy-sources branch to the trunk.

Yours sincerely,
-- 
Michael Howitz · [EMAIL PROTECTED] · 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
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] [Checkins] SVN: zope.viewlet/trunk/ Removed the dependency on `zope.app.publisher` by moving four simple helper functions into this package and making the interface for describing the Z

2009-01-08 Thread Michael Howitz
Am 08.01.2009 um 08:23 schrieb Christian Theune:
 On Wed, 2009-01-07 at 14:45 -0500, Hanno Schlichting wrote:
 Log message for revision 94597:
  Removed the dependency on `zope.app.publisher` by moving four  
 simple helper functions into this package and making the interface  
 for describing the ZCML content provider directive explicit.

 I dislike the redundancy that got introduced by copying those four
 functions.

Could it be an idea to move the code and the interface over to the new  
zope.browser package to avoid the redundancy or is it too far away  
from browser code?

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
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] [Checkins] SVN: z3c.layer/tags/0.3.0/setup.py -dev

2009-02-08 Thread Michael Howitz
Am 08.02.2009 um 05:14 schrieb Stephan Richter:
 On Saturday 07 February 2009, Michael Howitz wrote:
 Changed:
   U   z3c.layer/tags/0.3.0/setup.py

 I'll note that we retired this package in favor of

 z3c.layer.minimal
 z3c.layer.trusted
 etc.


Thanks for clarification. After releasing z3c.layer I noticed the  
other packages.
So I'll do another release pointing to the split-of packages and  
delete the trunk of z3c.layer so it is clear that the package is dead.


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
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] [Checkins] SVN: z3c.pagelet/trunk/ Using ``z3c.ptcompat`` instead of deprecated ``z3c.pt.compat``.

2009-02-21 Thread Michael Howitz
Am 21.02.2009 um 11:23 schrieb Michael Howitz:
 Log message for revision 96885:
  Using ``z3c.ptcompat`` instead of deprecated ``z3c.pt.compat``.
[...]

There are still test failures and I don't know how to fix them. Anyone?

File /Users/mac/Documents/tmp/z3c.pagelet/src/z3c/pagelet/ 
README.txt, line 164, in README.txt
Failed example:
 print myView()
Expected:
 Traceback (most recent call last):
 ...
 ContentProviderLookupError: pagelet
Got:
 Traceback (most recent call last):
 ...
 PTRuntimeError: ['Compilation failed',  
'zope.tal.taldefs.TALError: Unrecognized expression type provider.  
in expression u\'provider:pagelet\', at line 4, column 7']

There are even more errors complaining about 'Unrecognized expression  
type provider'.

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
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] [Checkins] SVN: zope.app.component/trunk/setup.py set missing minimum version

2009-03-15 Thread Michael Howitz
Am 15.03.2009 um 04:25 schrieb Stephan Richter:
 On Saturday 14 March 2009, Michael Howitz wrote:
 Log message for revision 98113:
   set missing minimum version

 Changed:
   U   zope.app.component/trunk/setup.py

 -=-
 Modified: zope.app.component/trunk/setup.py
 =
 --- zope.app.component/trunk/setup.py   2009-03-14 19:56:47 UTC  
 (rev 98112)
 +++ zope.app.component/trunk/setup.py   2009-03-14 20:14:47 UTC  
 (rev 98113)
 @@ -78,7 +78,7 @@
'zope.interface',
'zope.lifecycleevent',
'zope.location3.4.0b1',
 -  'zope.publisher',
 +  'zope.publisher=3.6.0',
'zope.schema',
'zope.security',
'zope.traversing',

 Please, please, please no versions in setup.py.


But it is impossible to use zope.app.component together with an older  
version of zope.publisher: an ImportError is raised in zope/app/ 
component/__init__.py otherwise.

I upgraded zope.app.component in a project of mine and it broke  
because I did not upgrade zope.publisher the same time. With the  
version information in setup.py I would have known what's the minimum  
version of zope.publisher I have to use.


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
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] [Checkins] SVN: z3c.layer.pagelet/trunk/ Removed dependency on``zope.app.security`` by using the new packages``zope.authentication`` and ``zope.principalregistry``.

2009-03-16 Thread Michael Howitz
Am 15.03.2009 um 23:47 schrieb Roger Ineichen:

 Hi Michael

 Can you explain why you implemented the login viewlets?

The login in zope.app.security is implemented using browser pages and  
metal-macros and is not really customizable. I needed a login/logout  
which works fine with pagelets and behaves like the one in  
zope.app.security as I think zope.app.security was not implemented so  
badly.

 What does this viewlets have to do with the pagelet layer?

It's a pagelet implementation of login/logout, so I thought it matches  
the goal of this package very well.

 I think they are very project specific and should go to
 an explicit package which offers login viewlets.

I'm not sure about this, as the implementation as adopted from the one  
in zope.app.security. I don't think the one in zope.app.security is  
project specific. But I might be wrong.

 The pagelet layer has nothing to do with such explicit
 implementations. The z3c.layer.pagelet package offers
 only the minimum setup for make pagelets traversable
 and offers error handling etc.

My implementation does not even require new dependencies.  
``zope.authentication`` and ``zope.principalregistry`` where split out  
from zope.app.security to reduce dependencies.

 What do you think, can we move your viewlet part into
 another package which is based on z3c.layer.pagelet
 or probably on z3c.layer.ready2go which uses the pagelet
 layer too?

It could be an idea to add it to z3c.layer.ready2go which currently  
only contains some interfaces. But a completely new package seems a  
bit overkill to me.

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
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] [Zope3-checkins] [Checkins] SVN: zope.app.component/trunk/setup.py set missing minimum version

2009-03-16 Thread Michael Howitz
Am 16.03.2009 um 03:33 schrieb Stephan Richter:
 On Sunday 15 March 2009, Wichert Akkerman wrote:
 If the package does not work with an older version of zope.publisher
 than imho that version restriction *has* to be in setup.py.

 And what if I backport the fix?

In this case it was not a little fix which can be back-ported, it was  
a larger refactoring where a couple of packages where involved.

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
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] [Zope3-checkins] [Checkins] SVN:zope.app.component/trunk/setup.py set missing minimum version

2009-03-16 Thread Michael Howitz
Am 16.03.2009 um 03:53 schrieb Roger Ineichen:

 Hi Stephan, Wichert, Michael

 Betreff: Re: [Zope3-checkins] [Checkins]
 SVN:zope.app.component/trunk/setup.py set missing minimum version

 On Sunday 15 March 2009, Wichert Akkerman wrote:
 If the package does not work with an older version of
 zope.publisher
 than imho that version restriction *has* to be in setup.py.

 And what if I back-port the fix?

 We have done version specification like this in the Zope
 packages before and it almost brought development to complete
 halt, because versions would not match anymore.

 +1

 If one of several packages doesn't get updated with buildout
 is only possible if someone uses an index server which only
 have one of the both released packages available.

It is also possible if someone uses fixed versions in buildout (like  
me) and starts to upgrade versions of individual packages step by step  
to see if the current versions work together with the project code (as  
I did).
It would be really helpful to know if an updated version requires new  
versions of other packages before seeing that the tests break. The  
version requirement produces is a much more explicit error message  
than an ImportError (which was the reason I added the minimum version).

[...]
 Michael,
 can you explain what's happen that you didn't got the
 zope.publisher release? And was this problem solved
 after fixing the version or did you do something else too?

I described above what I did. Fixing the version did not help me  
directly as this would require a new release of zope.app.component  
first, but it might help somebody else after a release was done.

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
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] [Checkins] SVN: z3c.layer.pagelet/trunk/ Removed dependency on``zope.app.security`` by using the new packages``zope.authentication`` and ``zope.principalregistry``.

2009-03-16 Thread Michael Howitz
Am 16.03.2009 um 16:43 schrieb Roger Ineichen:
[...]
 It's a pagelet implementation of login/logout, so I thought
 it matches the goal of this package very well.

 Yes and No. It's of corse usefull to have predefined login
 views available. But I use a z3c.form based implementation
 for this.

I thought this as the next step: the template for cookie login is not  
really nice and makes wrong assumptions (e. g. unauthenticated  
principal has the id zope.anybody). So I planned to replace it with a  
z3c.form based login form. But this would add a new dependency and I  
was not sure if this is a good idea.

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
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] setting missing minimum version in setup.py

2009-03-16 Thread Michael Howitz
Am 16.03.2009 um 15:49 schrieb Benji York:
[...]
 I don't like version requirements in setup.py because they assume too
 much about how people are using the package.

 Lets say that someone adds two bug fixes to zope.foo (call them fix A
 and fix B) and then does a release.  Fix A requires zope.bar = 1.5  
 and
 fix B doesn't.  If I want to benefit from fix B in my app (and don't  
 use
 the feature fix A repaired), then I shouldn't be forced to upgrade
 zope.bar.

+1 in principal, but this thread arose from adding a minimum version  
because the package failed with an ImportError in its main __init__.py

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
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] setting missing minimum version in setup.py

2009-03-16 Thread Michael Howitz
Am 16.03.2009 um 16:56 schrieb Martijn Faassen:
 Hey,

 Stephan Richter wrote:
 [snip]
 There is a compromise I am willing to take. If package zope.bar  
 depends on a
 *new feature* or *feature change* in zope.foo 1.3.x, then it should  
 specify
 the version. In other words specifying open restrictions on the  
 major version
 levels is okay, but never on the bug fix level. (I just hope this  
 does not
 bite us later. ;-)

 Yes, I was thinking in this direction too. I can see this as more of  
 an
 issue with bug fixes than with feature changes. This means that
 requirements can only say zope.foo = x.y, and never zope.foo =  
 x.y.z.

 What do people think?


Sounds reasonable: +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
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] Dependencies for ZCML

2009-03-16 Thread Michael Howitz
Am 12.03.2009 um 19:25 schrieb Tres Seaver:
[...]
 Now when testing these libraries you could do three things:

 * not use ZCML at all and recreate the effect of these  
 registrations in
 Python code.

 +1.

 * use the ZCML in the package's configure.zcml. (perhaps through
 ftesting.zcml)

 - -lots.

I disagree: if there is ZCML inside the package it must be tested  
inside the package.
If there is a syntax errors in the zcml, tests do not find it. It is  
even possible to make a release without noticing this defect. I think  
that's really bad.
Otherwise we should we require to run the compat-tests before  
releasing a package of the zope framework. This might find the errors  
in zcml, maybe.


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
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] Dependencies for ZCML

2009-03-16 Thread Michael Howitz
Am 11.03.2009 um 21:26 schrieb Dan Korostelev:
 2009/3/11 Martijn Faassen faas...@startifact.com:
 Oh, and on the topic, one more time: can we have a steering group
 decision on the package requirements for zcml statements? Are we  
 doing
 extras for them or simply skipping them?

 Sorry, I wasn't clear that there was an open question and I'm  
 afraid I
 don't understand this one. :)

 Could you point me to the appropriate thread that was left in the
 middle, or could you start a new thread with a description of the  
 open
 question?

 I'm too lazy now to search in archives, so I'll just describe again.
 For example, the zope.password package only requires zope.interface to
 be functional. But it's configure.zcml contains directives that need
 zope.component (or repoze.zcml) and zope.security. Also, the zcml
 thing itself needs zope.configure as well. Should we mention it in
 extra dependencies somehow or just document it, saying that zcml is
 intented to be used in more zope3-ish environment that already has
 needed packages, so others can simply ignore these files.


zope.container has a similar problem: its configure.zcml uses  
zope:view directives. When I'd like to use zope.container in a Zope 3  
the application server environment I have to know that zope:view is  
defined in zope.app..component or I have to find it out. There is no  
dependency, not test and no documentation mentioning this inside  
zope.container.

I think that's bad as it makes it more difficult to learn Zope for new  
developers.

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
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] [Checkins] SVN: zope.annotation/trunk/setup.py Whitespace fixes

2009-04-02 Thread Michael Howitz
Am 01.04.2009 um 23:44 schrieb Jacob Holm:

 Hi Baiju

 If this whitespace fix is based on the current style guide, I think  
 the
 guide needs to be fixed. I find the fixed version much less  
 readable. A
 function that takes this many arguments should have an exception to  
 the
 PEP 8 rule of no whitespace around the equals sign used for keyword
 arguments. I *think* a reasonable rule is that if you split the call
 over multiple lines with one argument per line, you should add single
 spaces before and after the equals sign. What does anyone else think?

What about defining the version number in front of the setup call as a  
variable and using it in the call like:

version = '3.5.0dev'

setup(
 name='zope.annotation',
 version=version,
 ...
)

This way no exception from the rule is necessary.

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
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] Proposal: Remove the dependency of zope.app.exception on zope.formlib

2009-04-07 Thread Michael Howitz

Hi,

zope.app.exception depends on zope.formlib to use the NamedTemplate  
for the Unauthorized view.
As zope.formlib has many dependencies I propose to depend on  
z3c.template to get a named template.
(Even z3c.layer.pagelet depends on zope.app.exception (for the  
Unauthorized view) and so it depends on zope.formlib.)


I implemented the proposal in svn+ssh://svn.zope.org/repos/main/ 
zope.app.exception/branches/icemac_no_formlib (I also added a  
minimized patch of my changes to this e-mail.)


Any comments on this implementation?

Should I do the include
include package=z3c.template file=meta.zcml /
in zope.app.exception's configure.zcml or only in the ftesting.zcml?



no_formlib.patch
Description: Binary data




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
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] z3c.form: Problem validating file uploads

2009-04-12 Thread Michael Howitz
Hi,

I'm using a trunk version of z3c.form and have the following situation:
In my interface I have a zope.schema.Bytes field.
z3c.form.converter.FileUploadDataConverter.toFieldValue returns  
z3c.form.interfaces.NOT_CHANGED when I do not upload a file.
z3c.form.validator.SimpleFieldValidator.validate fails later on as the  
value (z3c.form.interfaces.NOT_CHANGED) is not of type str (which is  
required by the Bytes field).
I created a branch in svn to show the behavior. (z3c.form/branches/ 
icemac_validate_NOT_CHANGED)

I'm not sure how to fix this generally, some possible solutions come  
to my mind, but each idea has its own problems:

1) Create a special validator for zope.schema.Bytes +  
z3c.form.interfaces.IFileWidget which knows how to handle NOT_CHANGED.
This does not seem to be a really general solution and might have  
the same problems like the following ideas.

2) When z3c.form.validator.SimpleFieldValidator.validate is called  
with NOT_CHANGED as value, try to look up the value on the context  
object.
This fails on AddForms as the context there is the parent object.

3) When z3c.form.validator.SimpleFieldValidator.validate is called  
with NOT_CHANGED as value, do not validate hoping the previous value  
was valid.
This approach fails with AddForms, too, when the Bytes field is  
required. (The missing-value-error does not get raised.)

Anyone having an idea for a possibly working solution?

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
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] Proposal: Remove the dependency of zope.app.exception on zope.formlib

2009-04-20 Thread Michael Howitz
Am 07.04.2009 um 20:39 schrieb Michael Howitz:

 Hi,

 zope.app.exception depends on zope.formlib to use the NamedTemplate  
 for the Unauthorized view.
 As zope.formlib has many dependencies I propose to depend on  
 z3c.template to get a named template.
 (Even z3c.layer.pagelet depends on zope.app.exception (for the  
 Unauthorized view) and so it depends on zope.formlib.)

 I implemented the proposal in svn+ssh://svn.zope.org/repos/main/ 
 zope.app.exception/branches/icemac_no_formlib (I also added a  
 minimized patch of my changes to this e-mail.)

 Any comments on this implementation?


As there where no further comments besides the one of Stefan Richter,  
I'll merge the proposed changes soon and do a new release.


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
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.form: Problem validating file uploads

2009-04-22 Thread Michael Howitz
Am 12.04.2009 um 15:12 schrieb Michael Howitz:
 Hi,

 I'm using a trunk version of z3c.form and have the following  
 situation:
 In my interface I have a zope.schema.Bytes field.
 z3c.form.converter.FileUploadDataConverter.toFieldValue returns
 z3c.form.interfaces.NOT_CHANGED when I do not upload a file.
 z3c.form.validator.SimpleFieldValidator.validate fails later on as the
 value (z3c.form.interfaces.NOT_CHANGED) is not of type str (which is
 required by the Bytes field).
 I created a branch in svn to show the behavior. (z3c.form/branches/
 icemac_validate_NOT_CHANGED)

 I'm not sure how to fix this generally, some possible solutions come
 to my mind, but each idea has its own problems:

 1) Create a special validator for zope.schema.Bytes +
 z3c.form.interfaces.IFileWidget which knows how to handle NOT_CHANGED.
This does not seem to be a really general solution and might have
 the same problems like the following ideas.

 2) When z3c.form.validator.SimpleFieldValidator.validate is called
 with NOT_CHANGED as value, try to look up the value on the context
 object.
This fails on AddForms as the context there is the parent object.

 3) When z3c.form.validator.SimpleFieldValidator.validate is called
 with NOT_CHANGED as value, do not validate hoping the previous value
 was valid.
This approach fails with AddForms, too, when the Bytes field is
 required. (The missing-value-error does not get raised.)

 Anyone having an idea for a possibly working solution?

As I got no responsed, I'd like to put this issue into z3c.form's  
bugtracker. But which is the correct one?
https://bugs.launchpad.net/zope3/ ?

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
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] Zope 2.12.0 beta 1 released

2009-05-05 Thread Michael Howitz
Am 05.05.2009 um 17:51 schrieb Hanno Schlichting:
 Andreas Jung wrote:
 On 05.05.09 17:36, Jens Vagelpohl wrote:
 On May 5, 2009, at 17:23 , Andreas Jung wrote:

 Unfortunately I can't get SVN 1.5 get working on my Mac.
 SVN 1.5 from Fink works perfectly fine here.

 Macports seems to provide only 1.6 - I see no option for reverting to
 1.5 with Macports.

 Maybe:

 port deactivate subversion

 port install -f subvers...@1.5.6

This does not work if this version wasn't already built before and  
archived. Putting built versions into archive is switched off by  
default.
To switch back from svn 1.6 I installed the binaries from 
http://svnbinaries.open.collab.net/servlets/ProjectDocumentList 
  They which work fine here.


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
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] zc.buildout (small) failures

2009-05-12 Thread Michael Howitz
Am 12.05.2009 um 03:21 schrieb Sebastien Douche:
 http://misc.buildbot.securactive.org/builders/zc.buildout-py2.4-32bit-linux/builds/1/steps/test/logs/stdio
 http://misc.buildbot.securactive.org/builders/zc.buildout-py2.4-64bit-linux/builds/7/steps/test/logs/stdio
 http://misc.buildbot.securactive.org/builders/zc.buildout-py2.6-32bit-linux/builds/0/steps/test/logs/stdio
 http://misc.buildbot.securactive.org/builders/zc.buildout-py2.6-64bit-linux/builds/4/steps/test/logs/stdio

 Failed example:
print 'X'; print system(
zc.buildout.easy_install._safe_arg(sys.executable)+' '+
'bootstrap.py --version 1.1.1'); print 'X'
 Expected:
X
Generated script '/sample/bin/buildout'.
BLANKLINE
X
 Got:
X
Generated script '/sample/bin/buildout'.
/tmp/tmp64BRh4/zc.buildout-1.1.1-py2.6.egg/zc/buildout/ 
 buildout.py:21:
 DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
BLANKLINE
X

This one I fixed in r99860.

 -
 Expected:
X
No local packages or download links found for zc.buildout==UNKNOWN
error: Could not find suitable distribution for
 Requirement.parse('zc.buildout==UNKNOWN')
Traceback (most recent call last):
  File bootstrap.py, line 78, in module
) == 0
AssertionError
BLANKLINE
X
 Got:
X
No local packages or download links found for zc.buildout==UNKNOWN
error: Could not find suitable distribution for
 Requirement.parse('zc.buildout==UNKNOWN')
Traceback (most recent call last):
  File bootstrap.py, line 75, in ?
PYTHONPATH=
AssertionError
BLANKLINE
X


Not sure what to do here.

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
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] zope.app.publication dependencies (volunteers needed!)

2009-05-14 Thread Michael Howitz
Am 13.05.2009 um 19:55 schrieb Martijn Faassen:
[...]
 From this little graph, it looks clear we could do some of the
 following things (research is needed to see how difficult they are):

 * cut the dependency of zope.app.publisher on zope.app.component

 * OR cut the dependency of zope.app.component on zope.formlib

 * cut the dependency of zope.app.publisher on zope.app.publication

 * OR cut the dependency of zope.app.component on zope.app.security

 * cut the dependency of zope.app.publisher on zope.app.publication

 * OR cut the dependency of zope.app.publication on zope.app.exception

 * OR cut the dependency of zope.app.exception on zope.formlib

The last option I already implemented on the icemac_no_formlib branch  
in zope.app.exception.
z3c.template is used there instead of zope.formlib.

I can merge this branch in the next days and cut a release.


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
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] zope.app.publication dependencies (volunteersneeded!)

2009-05-14 Thread Michael Howitz
Am 14.05.2009 um 11:00 schrieb Roger Ineichen:
 The last option I already implemented on the
 icemac_no_formlib branch in zope.app.exception.
 z3c.template is used there instead of zope.formlib.

 I can merge this branch in the next days and cut a release.

 As long as z3c.template depends on chameleon, lxml etc. I think
 this is a no go for core zope packages.

According to its setup.py z3c.template does not depend on chameleon.  
It depends on z3c.ptcompat [zpt] which does not depend on z3c.pt but  
only on zope.app.pagetemplate.

 We need to get rid of z3c.pt and offer a better optional
 implementation for z3c.pt support.

This is right but another problem.

 note;
 I like z3c.pt very much and think this is a great package.
 But the built in compatibility layer is a very bad thing.

Mit freundlichen Grüßen
-- 
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
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] zope.app.publication dependencies (volunteersneeded!)

2009-05-14 Thread Michael Howitz
Am 14.05.2009 um 12:05 schrieb Martijn Faassen:
 Michael Howitz wrote:
 Am 14.05.2009 um 11:00 schrieb Roger Ineichen:
 The last option I already implemented on the
 icemac_no_formlib branch in zope.app.exception.
 z3c.template is used there instead of zope.formlib.

 I can merge this branch in the next days and cut a release.
 As long as z3c.template depends on chameleon, lxml etc. I think
 this is a no go for core zope packages.

 According to its setup.py z3c.template does not depend on chameleon.
 It depends on z3c.ptcompat [zpt] which does not depend on z3c.pt  
 but
 only on zope.app.pagetemplate.

 I still think there's a problem in pulling in 2 more packages.
 zope.app.exception is not a big package in the amount of code inside..

 Could you talk a bit about what your branch is trying to accomplish?

zope.app.exception depends on zope.formlib's namedtemplate mechanism.
zope.formlib has many many dependencies but only this special function  
of it is used by zope.app.exception. It's needed to render  
customizable the unauthorized views.
So I replaced zope.formlib by the much more lightweight z3c.template.

See also the proposal 
http://mail.zope.org/pipermail/zope-dev/2009-April/035833.html

 (see elsewhere on the thread for a way to cut the dependency of
 zope.app.publication to zope.app.exception completely with little  
 effort)


This (move the ISystemErrorView) seems to be the right solution to get  
rid of the zope.app.publication dependency on zope.app.exception.
In a project of mine I need zope.app.exception independently of this  
dependency but I do not want to depend on zope.formlib for a little  
feature of it which can be done by another smaller package.


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
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] [Checkins] SVN: zope.intid/trunk/ - Remove a dependency on ``zope.container.contained.Contained``

2009-05-15 Thread Michael Howitz
Am 15.05.2009 um 05:32 schrieb Chris McDonough:

 Log message for revision 99961:
  - Remove a dependency on ``zope.container.contained.Contained``
(this is a dumb base class that defines __parent__ and __name__
as None and declares that the class implements IContained).

What's the reason behind this refactoring?
Instead of zope.container.contained.Contained the IntIds class now  
depends on zope.container.interface.IContained plus it redefines the  
things which are already defined in  
zope.container.contained.Contained. I do not see why this is better  
than using the base class.


 Changed:
  U   zope.intid/trunk/CHANGES.txt
  U   zope.intid/trunk/src/zope/intid/__init__.py
[...]

 Modified: zope.intid/trunk/src/zope/intid/__init__.py
 =
 --- zope.intid/trunk/src/zope/intid/__init__.py   2009-05-15 02:41:49  
 UTC (rev 99960)
 +++ zope.intid/trunk/src/zope/intid/__init__.py   2009-05-15 03:31:59  
 UTC (rev 99961)
 @@ -24,10 +24,9 @@

 import BTrees
 from persistent import Persistent
 -from ZODB.interfaces import IConnection
 from zope.component import adapter, getAllUtilitiesRegisteredFor,  
 subscribers
 from zope.container.interfaces import IObjectAddedEvent,  
 IObjectRemovedEvent
 -from zope.container.contained import Contained
 +from zope.container.interfaces import IContained
 from zope.event import notify
 from zope.interface import implements
 from zope.keyreference.interfaces import IKeyReference, NotYet
 @@ -37,14 +36,16 @@
 from zope.intid.interfaces import IIntIds, IIntIdEvent
 from zope.intid.interfaces import IntIdAddedEvent, IntIdRemovedEvent

 -class IntIds(Persistent, Contained):
 +class IntIds(Persistent):
 This utility provides a two way mapping between objects and
 integer ids.

 IKeyReferences to objects are stored in the indexes.
 
 -implements(IIntIds)
 +implements(IIntIds, IContained)

 +__parent__ = __name__ = None
 +
 _v_nextid = None

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
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] zope.app.publication dependencies (volunteersneeded!)

2009-05-15 Thread Michael Howitz
Am 14.05.2009 um 15:02 schrieb Martijn Faassen:
 Michael Howitz wrote:
 Am 14.05.2009 um 12:05 schrieb Martijn Faassen:
 [snip]
 Could you talk a bit about what your branch is trying to accomplish?

 zope.app.exception depends on zope.formlib's namedtemplate mechanism.
 zope.formlib has many many dependencies but only this special  
 function
 of it is used by zope.app.exception. It's needed to render
 customizable the unauthorized views.
 So I replaced zope.formlib by the much more lightweight z3c.template.

 Is this replacement compatible with zope.formlib's namedtemplate
 mechanism? Will anything break?

No it is not compatible. So I think it's a bad idea. Breaking the  
dependency between zope.app.publication and zope.app.exception by  
moving the ISystemErrorView interface and maybe the class which  
implements it to zope.browser would be better. I'll look into it at  
weekend.

 The guaranteed compatible step forward to reduce dependencies would be
 to extract the namedtemplate mechanism from zope.formlib and place  
 that
 somewhere else. zope.formlib can then have an import for backwards
 compatibility.

Maybe, but is this namedtemplate mechanism used outside zope.formlib?  
If so we should extract it.

 See also the proposal 
 http://mail.zope.org/pipermail/zope-dev/2009-April/035833.html

 I missed this discussion then, my apologies. I still stand by my  
 opinion
 that this would suddenly pull in *new* libraries in with a significant
 chunk of new code, and we need to be very careful with that and not  
 just
 do it to lift a dependency.

Right. I will not merge my branch, but look into breaking the  
zope.app.publisher dependency.

 (see elsewhere on the thread for a way to cut the dependency of
 zope.app.publication to zope.app.exception completely with little
 effort)

 This (move the ISystemErrorView) seems to be the right solution to  
 get
 rid of the zope.app.publication dependency on zope.app.exception.
 In a project of mine I need zope.app.exception independently of this
 dependency but I do not want to depend on zope.formlib for a little
 feature of it which can be done by another smaller package.

I looked into it, its not a project of mine it's z3c.layer.pagelet but  
it can be refactored to use only the ISystemErrorView interface. It  
uses some classes from zope.app.exception but does not need their  
features. So I'll refactor it.

 I understand. Why not move the namedtemplate mechanism somewhere else
 entirely, though? This way we'd not introduce new code. The
 namedtemplate code itself only seems to depend on zope.traversing, but
 that doesn't sound like a good home. The tests depend on
 zope.app.pagetemplate, so perhaps it should move there? This is  
 still a
 dependency of zope.app.exception anyway, and it itself doesn't  
 appear to
 depend on zope.formlib.

Nice idea. I'll look into it.

 zope.app.exception's UI bits are a curious case in that they're not
 really part of the ZMI, though they integrate with the ZMI and assume
 the existence of some macros. It's also a zope.app.* package and we'd
 like to get rid of those in the toolkit. What to do with it?


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
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.recipe.i18n tests break on unix

2009-05-15 Thread Michael Howitz
Am 15.05.2009 um 11:40 schrieb Christian Zagrodnick:
 Hi,

 the tests of z3c.reipce.i18n break on unix systems, for instance with:

 Failed example:
ls('bin')
 Expected:
-  buildout-script.py
-  buildout.exe
-  i18ncompile-script.py
-  i18ncompile.exe
-  i18nextract-script.py
-  i18nextract.exe
-  i18nmergeall-script.py
-  i18nmergeall.exe
-  i18nstats-script.py
-  i18nstats.exe
 Got:
-  buildout
-  i18ncompile
-  i18nextract
-  i18nmergeall
-  i18nstats


 What's the general way of testing those things in both environments? I
 don't have a windows box to test this. I also see most recipes are
 tested only for unix (which would be fine for me).

In z3c.recipe.paster I solved this with two re normalizers, see
http://tinyurl.com/ofc6nx lines 115 and 116.


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
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.recipe.i18n tests break on unix

2009-05-15 Thread Michael Howitz
Am 15.05.2009 um 12:36 schrieb Christian Zagrodnick:
[...]
 Okay, would you give me the pypi access (user zagy)?


Done.

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
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] [Fwd: [Bug 376907] Re: AttributeError: 'str' object has no attribute 'registerSynch']

2009-05-16 Thread Michael Howitz
Am 15.05.2009 um 15:24 schrieb Tim Cook:
[...]
 Traceback here:
 =
 2009-05-15 08:30:05,890 ERROR [SiteError] http://localhost:8080
 Traceback (most recent call last):
  File
 /home/tim/.buildout/eggs/zope.publisher-3.4.6-py2.5.egg/zope/ 
 publisher/publish.py, line 129, in publish
obj = publication.getApplication(request)
  File
 /home/tim/.buildout/eggs/grok-1.0a3-py2.5.egg/grok/publication.py,
 line 70, in getApplication
result = super(ZopePublicationSansProxy,
 self).getApplication(request)
  File
 /home/tim/.buildout/eggs/zope.app.publication-3.4.3-py2.5.egg/zope/ 
 app/publication/zopepublication.py, line 150, in getApplication
conn = self.db.open(version)


You use a really ancient version of zope.app.publication. This bug was  
fixed in version 3.5.0 of zope.app.publication. I think at least this  
version is required to be used together with ZODB 3.9.


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
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.form: Problem validating file uploads

2009-05-17 Thread Michael Howitz
Am 22.04.2009 um 14:48 schrieb Jacob Holm:
 Michael Howitz wrote:
[...]
 Anyone having an idea for a possibly working solution?
 As I got no responsed, I'd like to put this issue into z3c.form's   
 bugtracker. But which is the correct one?
 https://bugs.launchpad.net/zope3/ ?

 I don't know about the right tracker for this, but I think the right  
 solution is 2) except that when widget.ignoreContext is True the  
 default value should be looked up and validated instead.  In other  
 words, change z3c.form.validator.SimpleFieldValidator.validate to  
 something like this (untested):

[snipped really good suggestion]

 Unless I am missing something, the above code should compute the  
 same value as z3c.form.widget.Widget.update would when ignoreRequest  
 is True.   Thus effectively converting NOT_CHANGED into the  
 existing value before validating,


Many thanks, Jacob. Your suggestion works very well. I implemented it  
on my branch and merged it to the trunk.

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
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] z3c.form 2.0 release?

2009-05-17 Thread Michael Howitz
Hi,

what is still to be done for the z3c.form 2.0 release?
Something I can help?

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
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] zope.app.publication dependencies (volunteersneeded!)

2009-05-18 Thread Michael Howitz
Am 15.05.2009 um 13:30 schrieb Martijn Faassen:
[...]
 Cool. It would seem to make sense that the named template mechanism is
 bundled along with the page template library anyway (instead of the  
 form
 library). zope.formlib currently depends on zope.app.pagetemplate  
 too so
 we could easily leave a backwards compatibility import in place.


Done. Moved namedtemplate to zope.app.pagetemplate and made new  
releases of
zope.app.pagetemplate
zope.formlib

Also cut the dependency of zope.app.publication on zope.app.exception  
by moving ISystemErrorView to zope.browser. Released:
zope.browser
zope.app.exception
zope.app.publication


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
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] ComponentLookupError

2009-05-19 Thread Michael Howitz
Am 19.05.2009 um 16:53 schrieb Tim Cook:
[...]
 /home/tim/.buildout/eggs/zope.component-3.6.0-py2.5.egg/zope/ 
 component/_api.py, line 171, in getUtility
raise ComponentLookupError(interface, name)
 ComponentLookupError: (InterfaceClass
 zope.password.interfaces.IPasswordManager, u'SHA1')


Did you include zope.password's configure.zcml? This is where the  
password manager utilities are defined.

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
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] [Checkins] SVN: z3c.form/trunk/ merged branch icemac_validate_NOT_CHANGED

2009-05-26 Thread Michael Howitz
Am 24.05.2009 um 10:46 schrieb Adam GROSZER:
 Hello Michael,

 After some simple thinking there are some fears that this wrecks other
 basic fields validation.

 Something like the field is required, has a default value but is
 omitted on input. What will be the result?

When the field is omitted on input it should not have the value  
interfaces.NOT_CHANGED but no value, so special handling for  
NOT_CHANGED does not apply.

 Accepting the default value
 instead of raising an error is definitely a problem.

 Also, values in the system might not be needed to re-validate?
 Image passing around a 100mb uploaded file.

z3c.form has definitely a problem with this use-case. Not only the  
validator but also the edit form reads the whole file into RAM.

 If this is meant only for a file upload field, then I think there  
 should
 be a special validator registered for those.

interfaces.NOT_CHANGED is currently only used for file uploads, but it  
might be used for other fields as well, so I see no reason to put the  
handling into a special validator.

 Would be nice to see some (functional) tests closing out the above  
 fears.
 Functional, because on the unittest level you can force the widget to
 a lot of unexpected things, but that might not be inline with what
 happens when it's really done by the framework.
 Or better said, revert the changes locally, add those tests, apply the
 changes back and see whether the tests still pass.

File upload fields did not work at all after someone introduced  
interfaces.NOT_CHANGED and before adding my changes.

Jacob Holm, who suggested the patch, wrote in 
http://mail.zope.org/pipermail/zope-dev/2009-April/036258.html
The code should compute the same value as  
z3c.form.widget.Widget.update would when ignoreRequest is True.   Thus  
effectively converting NOT_CHANGED into the existing value before  
validating.

 MH Modified: z3c.form/trunk/src/z3c/form/validator.py
 MH  
 ===
 MH --- z3c.form/trunk/src/z3c/form/validator.py2009-05-17  
 13:18:11 UTC (rev 100027)
 MH +++ z3c.form/trunk/src/z3c/form/validator.py2009-05-17  
 13:21:18 UTC (rev 100028)
 MH @@ -42,9 +42,28 @@
 MH
 MH  def validate(self, value):
 MH  See interfaces.IValidator
 MH +context = self.context
 MH  field = self.field
 MH -if self.context is not None:
 MH -field = field.bind(self.context)
 MH +widget = self.widget
 MH +if context is not None:
 MH +field = field.bind(context)
 MH +if value is interfaces.NOT_CHANGED:
 MH +if (interfaces.IContextAware.providedBy(widget) and
 MH +not widget.ignoreContext):
 MH +# get value from context
 MH +value = zope.component.getMultiAdapter(
 MH +(context, field),
 MH +interfaces.IDataManager).query()
 MH +else:
 MH +value = interfaces.NO_VALUE
 MH +if value is interfaces.NO_VALUE:
 MH +# look up default value
 MH +value = field.default
 MH +adapter = zope.component.queryMultiAdapter(
 MH +(context, self.request, self.view, field,  
 widget),
 MH +interfaces.IValue, name='default')
 MH +if adapter:
 MH +value = adapter.get()
 MH  return field.validate(value)
 MH
 MH  def __repr__(self):

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
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] z3c.form: data manager for PersistentDict/PersistentMapping

2009-07-11 Thread Michael Howitz
Hello,

z3c.form.datamanager.DictionaryField is a data manager which is  
registered for fields on a dict. In its __init__ it checks whether the  
data object is an instance of dict. So this data manager does neither  
work for UserDict nor PersistentDict/PersistentMapping.
I'd like to change this but there are two possibilities and I'm not  
sure which is the best one:

1.) Add a subclasses of DictionaryField which is registered for  
UserDict and which checks whether the data object is an instance of  
UserDict.
 (PersistentDict and PersistentMapping are subclasses of UserDict.)

2.) Register DictionaryField for  
zope.interface.common.mapping.IMapping. This might have a problem as  
neither UserDict nor PersistentDict/PersistentMapping seem to provide  
this interface. (Why?)

Any suggestions?

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
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.form: data manager forPersistentDict/PersistentMapping

2009-07-13 Thread Michael Howitz
Am 12.07.2009 um 01:46 schrieb Roger Ineichen:
 Hi Michael

 Betreff: [Zope-dev] z3c.form: data manager
 forPersistentDict/PersistentMapping

 Hello,

 z3c.form.datamanager.DictionaryField is a data manager which
 is registered for fields on a dict. In its __init__ it checks
 whether the data object is an instance of dict. So this data
 manager does neither work for UserDict nor
 PersistentDict/PersistentMapping.
 I'd like to change this but there are two possibilities and
 I'm not sure which is the best one:

 1.) Add a subclasses of DictionaryField which is registered
 for UserDict and which checks whether the data object is an
 instance of UserDict.
 (PersistentDict and PersistentMapping are subclasses of
 UserDict.)

 I think this is the right solution

I think so, too, but I was not sure.

 because there are many
 places in zope which do not work if a PeristentDict or
 PeristentList is given instead of a simple dict or list
 type.

 I'm not sure but I guess not even the zope.schema validation
 implementation does this part correct for list or dict fields.

This is another problem. z3c.form.datamanager.DictionaryField sets the  
value directly on the dict, so I'd like to use a PersistentMapping  
instead of a dict to get the persistency stuff for free. I use the  
PersistentMapping to store the schema values, as I need to keep them  
in the session.

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
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.form: data manager for PersistentDict/PersistentMapping

2009-07-13 Thread Michael Howitz
Am 11.07.2009 um 17:43 schrieb Michael Howitz:
 Hello,

 z3c.form.datamanager.DictionaryField is a data manager which is
 registered for fields on a dict. In its __init__ it checks whether the
 data object is an instance of dict. So this data manager does neither
 work for UserDict nor PersistentDict/PersistentMapping.
 I'd like to change this but there are two possibilities and I'm not
 sure which is the best one:

 1.) Add a subclasses of DictionaryField which is registered for
 UserDict and which checks whether the data object is an instance of
 UserDict.
 (PersistentDict and PersistentMapping are subclasses of UserDict.)

 2.) Register DictionaryField for
 zope.interface.common.mapping.IMapping. This might have a problem as
 neither UserDict nor PersistentDict/PersistentMapping seem to provide
 this interface. (Why?)


Replying to myself, as I saw on the z3c.form trunk that  
DictionaryField already allows providers of  
zope.interface.common.mapping.IMapping additionally to dict instances  
as the storage object.
The existing solution uses the second of my possibilities, but this is  
not the one which I'd like to prefer, as it does not work with  
PersistentMapping out of the box.
The idea behind this change on the trunk seems to be: to allow  
SessionPkgData as storage. I currently do not use it directly but use  
a PersistentMapping inside SessionPkgData. But maybe this is a  
sufficient solution for now.

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
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.form: data manager for PersistentDict/PersistentMapping

2009-07-14 Thread Michael Howitz
Am 13.07.2009 um 16:49 schrieb Stephan Richter:
 On Saturday 11 July 2009, Michael Howitz wrote:
 z3c.form.datamanager.DictionaryField is a data manager which is
 registered for fields on a dict. In its __init__ it checks whether  
 the
 data object is an instance of dict. So this data manager does neither
 work for UserDict nor PersistentDict/PersistentMapping.
 I'd like to change this but there are two possibilities and I'm not
 sure which is the best one:

 1.) Add a subclasses of DictionaryField which is registered for
 UserDict and which checks whether the data object is an instance of
 UserDict.
 (PersistentDict and PersistentMapping are subclasses of  
 UserDict.)

 2.) Register DictionaryField for
 zope.interface.common.mapping.IMapping. This might have a problem as
 neither UserDict nor PersistentDict/PersistentMapping seem to provide
 this interface. (Why?)

 I looked at this recently and the reason is that for containers we  
 did not
 usually want the dictionary field data manager, because we usually  
 want the
 regular instance based one.

 I am okay to add PersistentDict and PersistentMapping to the list. I  
 am
 already feeling unsure about UserDict, because people might want the  
 instance
 version instead. It is better to register the adapter for the  
 specific cases of
 your application.


I'm fine with that, so I'm going to allow PersistentDict and  
PersistentMapping in the constructor of DictionaryField and I'll add  
an note why the adapter is only registered for dict and not for the  
other possible data storages.

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
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] [Checkins] SVN: z3c.form/branches/icemac_compatibility/ - Made compatible with `zope.app.publisher` 3.8.2

2009-07-17 Thread Michael Howitz
Am 17.07.2009 um 18:24 schrieb Michael Howitz:
 Log message for revision 101967:
  - Made compatible with `zope.app.publisher` 3.8.2 (and above) by  
 using
the new absolute url adapter for resources introduced in 3.8.2.

The current trunk of z3c.form is not compatible with  
zope.app.publisher 3.8.2 and above, as this version introduced an  
absolute url adapter for resources. This adapter does not exist in  
versions before 3.8.2. It returns a str instead of a unicode as  
Resource.__call__ did before. (Relying on this feature seems to be bad  
anyway.)

So my question is whether z3c.form 2.x still has to be compatible with  
KGS 3.4 of if we can break this compatibility to get compatible with  
more recent versions of other packages.
Trying to stay compatible requires at least some conditional code to  
register the new absolute url adapter in the tests.

Is there any buildbot which tests z3c.form against KGS 3.4 and above?

  - Fixed tests to run with `z3c.pt` 1.0b17 (and above) by adding a
missing test dependency on `zope.app.component`.

This is necessary because zope.app.component no longer gets pulled in  
indirectly. But z3c.pt expects zope.app.component to be installed when  
zope.app.security is installed. (zope.app.security is a test  
dependency needed by browser/README.txt)
zope.app.component is even required for one test (browser/README.txt)  
of z3c.form.

 Changed:
  U   z3c.form/branches/icemac_compatibility/CHANGES.txt
  U   z3c.form/branches/icemac_compatibility/buildout.cfg
  U   z3c.form/branches/icemac_compatibility/setup.py
  U   z3c.form/branches/icemac_compatibility/src/z3c/form/browser/ 
 README.txt
  U   z3c.form/branches/icemac_compatibility/src/z3c/form/browser/ 
 image.py
  U   z3c.form/branches/icemac_compatibility/src/z3c/form/button.py
  U   z3c.form/branches/icemac_compatibility/src/z3c/form/button.txt

 -=-
 Modified: z3c.form/branches/icemac_compatibility/CHANGES.txt
 ===
 --- z3c.form/branches/icemac_compatibility/CHANGES.txt2009-07-17  
 16:22:39 UTC (rev 101966)
 +++ z3c.form/branches/icemac_compatibility/CHANGES.txt2009-07-17  
 16:24:27 UTC (rev 101967)
 @@ -12,6 +12,13 @@
   manager is only registered for dict, because it would otherwise get
   picked up in undesired scenarios.

 +- Made compatible with `zope.app.publisher` 3.8.2 (and above) by  
 using
 +  the new absolute url adapter for resources introduced in 3.8.2.
 +
 +- Fixed tests to run with `z3c.pt` 1.0b17 (and above) by adding a
 +  missing test dependency on `zope.app.component`.
 +
 +
 Version 2.0.0 (2009-06-14)
 --


 Modified: z3c.form/branches/icemac_compatibility/buildout.cfg
 ===
 --- z3c.form/branches/icemac_compatibility/buildout.cfg   2009-07-17  
 16:22:39 UTC (rev 101966)
 +++ z3c.form/branches/icemac_compatibility/buildout.cfg   2009-07-17  
 16:24:27 UTC (rev 101967)
 @@ -2,7 +2,12 @@
 develop = . benchmark
 parts = test test-no-z3cpt checker coverage-test coverage-report  
 docs i18n
 benchmark python
 +versions = versions

 +[versions]
 +zope.app.publisher = 3.8.3
 +z3c.pt = 1.0.0
 +
 [test-environment]
 CHAMELEON_DEBUG = False
 CHAMELEON_CACHE = False

 Modified: z3c.form/branches/icemac_compatibility/setup.py
 ===
 --- z3c.form/branches/icemac_compatibility/setup.py   2009-07-17  
 16:22:39 UTC (rev 101966)
 +++ z3c.form/branches/icemac_compatibility/setup.py   2009-07-17  
 16:24:27 UTC (rev 101967)
 @@ -91,6 +91,8 @@
 'zope.app.testing',
 'zope.container',
 'zope.testing',
 +'zope.app.component', # required by z3c.pt from 1.0b17 on
 +  # also required by our browser/ 
 README.txt
 ],
 adding = ['zope.app.container'],
 docs = ['z3c.recipe.sphinxdoc'],

 Modified: z3c.form/branches/icemac_compatibility/src/z3c/form/ 
 browser/README.txt
 ===
 --- z3c.form/branches/icemac_compatibility/src/z3c/form/browser/ 
 README.txt2009-07-17 16:22:39 UTC (rev 101966)
 +++ z3c.form/branches/icemac_compatibility/src/z3c/form/browser/ 
 README.txt2009-07-17 16:24:27 UTC (rev 101967)
 @@ -500,6 +500,14 @@
 zope.component.provideAdapter(
   ... resource, (None, None), ITraversable, name=resource)

 +  # Register resource absolute url adapter
 +   import zope.app.publisher.browser.resource
 +   from zope.app.publisher.interfaces import IResource
 +   import zope.traversing.browser.interfaces
 +   zope.component.provideAdapter(
 +  ... zope.app.publisher.browser.resource.AbsoluteURL,  
 (IResource, None),
 +  ... zope.traversing.browser.interfaces.IAbsoluteURL)
 +
   # Register the pressme.png resource
 from zope.app.publisher.browser.resource import Resource

Re: [Zope-dev] Broken authentication with zope.app.component 3.4.1 BBB code

2009-07-20 Thread Michael Howitz
Am 19.07.2009 um 22:40 schrieb Jim Fulton:
 On Sun, Jul 19, 2009 at 4:25 PM, Marius Gedminasmar...@gedmin.as  
 wrote:
 On Sun, Jul 19, 2009 at 11:55:45AM -0400, Jim Fulton wrote:
 ...
 You should use a generation to fix the problem rather hacking
 __setstate__.  The hard part of this is figuring out where to put  
 the
 generation. I wonder where that standard schema manager is. Maybe  
 you
 should just create one for zope.app.component.

 It used to be in zope.app.generations.  I don't know how exactly the
 coordination for all that works now after the eggsplosion.

 Maybe someone will enlighten us about where it went. :)

Do you search this one?

zope.app.zopeappgenerations.ZopeAppSchemaManager

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
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] New release of zope.app.testing fixes tests on Python 2.4

2009-08-20 Thread Michael Howitz
Am 20.08.2009 um 14:07 schrieb Fabio Tranchitella:
 Hello,

 zope.app.testing (which is part of thee ZTK) has failing tests on  
 Python
 2.4 introduced by the release 3.7.1 on the 2009-07-21 ; I've just  
 committed
 the fix (two lines diff), and I would like to make a new release and  
 update
 the ZTK KGS.

 I don't have the right to make a new release on PyPi, can somebody  
 help me
 please?


Hi,

I gave the user 'kobold' (hoping that is you) the owner role on  
zope.app.testing.

Mit freundlichen Grüßen
-- 
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
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] Proposal: zope.app.publisher refactoring

2009-08-22 Thread Michael Howitz
Am 21.08.2009 um 23:14 schrieb Dan Korostelev:
 2009/8/22 Shane Hathaway sh...@hathawaymix.org:
 Hi Dan,

 I'll provide feedback for a few parts of your proposal.
 Thanks

 Few developers care about XML-RPC these days.  Most web developers  
 are now
 working with REST, JSON, and other similar stuff.  It's probably  
 best to
 move all XML-RPC artifacts, including those in zope.publisher, to a  
 single
 package, so that most developers can safely ignore the XML-RPC code.

 That's a good point. After a quick look, it seems to be easy to move
 xmlrpc-related things from zope.publisher and zope.app.publisher to
 new zope.xmlrpc package. One problem is how to make BBB imports then.
 It doesn't look good to me to make zope.publisher dependent on
 zope.xmlrpc for xmlrpc stuff, but moving things without BBB imports
 will break applications that currently uses zope.publisher xmlrpc. One
 option is to use the notorious extra dependencies,

Another option are conditional imports: only import from zope.xmlrpc  
when it does not lead to an import error.


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
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] Proposal: zope.app.publisher refactoring

2009-08-22 Thread Michael Howitz
Am 21.08.2009 um 21:06 schrieb Dan Korostelev:
[...]
 ILogin, ILogout from zope.app.publisher.interfaces.http - looks like
 these don't really mean anything and are used only in
 zope.app.security. I'd move them to zope.app.security even without BBB
 imports (not to make zope.app.publisher dependent on
 zope.app.security), but maybe I just don't know something about them?
 :)

z3c.layer.pagelet also uses these interfaces to re-implement login/ 
logout like zope.app.security but by using pagelets and viewlets.
So it would be nice to have a better place for these interfaces, so  
z3c.layer.pagelet does not need to depend on zope.app.security.

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
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] Proposal: zope.app.publisher refactoring

2009-08-25 Thread Michael Howitz
Am 24.08.2009 um 19:02 schrieb Dan Korostelev:
 2009/8/22 Michael Howitz m...@gocept.com:
 Am 21.08.2009 um 21:06 schrieb Dan Korostelev:
[...]
 z3c.layer.pagelet also uses these interfaces to re-implement login/ 
 logout
 like zope.app.security but by using pagelets and viewlets.
 So it would be nice to have a better place for these interfaces, so
 z3c.layer.pagelet does not need to depend on zope.app.security.

 Are these interfaces used for anything else than just declaring them
 as implemented? :-) I don't see much sense in them, because they are
 too abstract and it's hard to understand what they are for, so I'd get
 just rid of them in z3c.layer.pegelet.


I looked a bit into the code of z3c.layer.pagelet and it seems that  
you are right.
Only the ILogin interface is used there. (The ILogout interface is the  
one from zope.authentication which seems to be semantically different  
from the one in zope.app.publisher.interfaces.http.)
Although it is a bad idea to copy interfaces, z3c.layer.pagelet could  
reinvent ILogin if it is really needed.

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
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] Proposal: zope.app.publisher refactoring

2009-08-25 Thread Michael Howitz
Am 24.08.2009 um 22:55 schrieb Roger Ineichen:
[...]
 Everything which has to do with login has nothing to do
 in z3c.layer.pagelet.
 z3c.layer.pagelet should only offer a working setup for
 pagelet based traversal stuff and error handling.

Until we find a better place for it I'd like to keep it there as it is  
a basic implementation (ported from zope.app.security) of login/logout  
using pagelets/viewlets. It is the pagelet version of login/logout as  
the other parts are the pagelet version of error handling and traversal.

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
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] Proposal: zope.app.publisher refactoring

2009-09-22 Thread Michael Howitz
Am 25.08.2009 um 14:39 schrieb Roger Ineichen:
[...]
 I was looking another time at the z3c.layer.pagelet package.

 I agree that the added authentication support is useful and
 was missing in the first releases. The loginForm.html pagelet
 should stay there. But we should move the viewlets to another
 package since this is optional and another concept which is not
 really needed by pagelets. e.g. z3c.authviewlet or so.

Right. Nice naming idea, I'll put it on my to do list.

 Another reason for moving this viewlets is that this login/
 logout viewlets are useful too without using pagelets.

Right, too.

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] Undeclared dependency of zope.site on zope.app.publication

2009-09-23 Thread Michael Howitz
Am 23.09.2009 um 08:06 schrieb Thomas Lotze:
 I just noticed that zope.site depends on zope.app.publication, both  
 via
 configure.zcml and the tests. The dependency isn't currently declared.
 On the other hand, zope.app.publication doesn't yet depend on  
 zope.site.

 I'd like to get rid of the dependency of zope.site on  
 zope.app.publisher

Do you mean zope.app.publication here and in the following lines?

 and I think it would be OK to invert it by moving the relevant ZCML
 declarations (two event handler registrations) and the two pieces of  
 test
 regarding traversal behaviour to zope.app.publisher, which would  
 thereby
 grow a new dependency on zope.site. What do others think?

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] five.localsitemanager and unregisterUtility

2009-10-12 Thread Michael Howitz
Am 09.10.2009 um 14:41 schrieb Hanno Schlichting:

 Hi Sylvain.

 I'm including Michael here, who's added the mentioned feature in the
 first place.

 On Fri, Oct 9, 2009 at 2:22 PM, Sylvain Viollon sylv...@infrae.com  
 wrote:
   I used to use those features in Silva. It work well with 0.4, but
   it's broken in 1.x. (I have tests in Silva testing that).

   This have to do with the wrapping (to remember the acquisition  
 path)
   of an utility which is done inside the registry by registerUtility,
   which breaks the unregisterUtility.

   unregisterUtility is checking that the component you want to
   unregister is the same than the one which is in the registry, for
   the same specification, which is not true, because the one in the
   registry in wrapped with a ComponentPathWrapper (in register).

It seems that I overlooked the unregisterUtility functionality when  
implementing that registerUtility stores the acquisition path.

   If you do grep unregisterUtility in five.localsitemanager, you have
   no match, but the site API defines both, so they should both
   works (and so be tested).

   I volunteer myself to add test (and fix it) in the SVN, as I need
   that fix.

   Does anyone have an objection with that ?

 No objection, please go ahead.

+ 1

   Does any official maintainer will do a release (1.1.1, as it will  
 be
   a bug fix) afterwards ?

 Sure, ping me once you are done and I'll cut a new release. Michael,
 do you want to test anything, before I do a new release?

For me it's enough that the tests inside five.localsitemanager succeed.


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] Releasing zope.browserresource

2009-11-25 Thread Michael Howitz
Am 25.11.2009 um 15:49 schrieb Chris Withers:
[...]
 Yes, PyPI is broken if you're an admin of many packages, feel free to 
 me too on this issue:
 
 http://sourceforge.net/tracker/?func=detailaid=2793544group_id=66150atid=513503

It's fixed since yesterday.

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] [Checkins] SVN: zope.app.security/tags/3.7.4/ release 3.7.4

2009-12-20 Thread Michael Howitz
Am 20.12.2009 um 05:52 schrieb Nikolay Kim:
 Log message for revision 106800:
  release 3.7.4
 
 Changed:
  A   zope.app.security/tags/3.7.4/
  U   zope.app.security/tags/3.7.4/CHANGES.txt
  U   zope.app.security/tags/3.7.4/setup.py
 
 -=-
 Modified: zope.app.security/tags/3.7.4/CHANGES.txt
 
 --- zope.app.security/trunk/CHANGES.txt   2009-12-20 04:50:49 UTC (rev 
 106799)
 +++ zope.app.security/tags/3.7.4/CHANGES.txt  2009-12-20 04:52:54 UTC (rev 
 106800)
 @@ -2,7 +2,7 @@
 CHANGES
 ===
 
 -3.7.4 (unreleased)
 +3.7.4 (2009-12-19)
 --
 
 - Move 'zope.ManageApplication' permission to zope.app.applicationcontrol

As you moved code between packages, I think this should have been a major 
release instead of a bug fix release.


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 )


[Zope-dev] z3c.form: GroupForm and ModificationEvents

2010-01-12 Thread Michael Howitz
Hi,

it seems to me that z3c.form.group.GroupForm does not send enough 
ModificationEvents: only one event for the context of the GroupForm but not for 
each modified object in the groups.

In a project of mine I have the following situation: I have a folder with some 
contained objects. A GroupForm displays the schema fields of the folder and the 
ones of all contained objects.
When I modify one of the fields of a contained object I would expect a 
ModifiedEvent for this object. (Is this a valid expectation?)
But GroupForm sends only one ModifiedEvent for the Folder (context of the 
form). This is even wrong in my case. At least the ModifiedEvent-Subscriber in 
zope.dublincore can't handle this and wrongly marks only the folder as modified.

Do I have a very special use case which should be handled inside my project?
Or should I change GroupForm to send a ModifiedEvent for each modified object?

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] z3c.form: GroupForm and ModificationEvents

2010-01-13 Thread Michael Howitz
Am 13.01.2010 um 06:08 schrieb Martin Aspeli:
 Michael Howitz wrote:
 Hi,
 
 it seems to me that z3c.form.group.GroupForm does not send enough
 ModificationEvents: only one event for the context of the GroupForm
 but not for each modified object in the groups.
 
 -1 to this being default behaviour.
 
 IObjectModifiedEvent is fired from EditForms, not from forms in general. 

GroupForm has an applyChanges method which send this event. The Group class 
collects some data for it in its applyChanges method.

 Normally, an EditForm is used to edit a context. The groups could come 
 from various locations (we use groups to create fieldsets based on 
 schema hints, but they're all logically part of the same content 
 object). I would not expect more than one event sent (in fact, doing 
 this would significantly break code in the wild).

The refactoring needn't break the code in the wild by sending only one 
ModifiedEvent for each different context object being changed. When a group has 
the same context as the group form, I agree, there should not be two events.

 In a project of mine I have the following situation: I have a folder
 with some contained objects. A GroupForm displays the schema fields
 of the folder and the ones of all contained objects. When I modify
 one of the fields of a contained object I would expect a
 ModifiedEvent for this object. (Is this a valid expectation?) But
 GroupForm sends only one ModifiedEvent for the Folder (context of the
 form). This is even wrong in my case. At least the
 ModifiedEvent-Subscriber in zope.dublincore can't handle this and
 wrongly marks only the folder as modified.
 
 Do I have a very special use case which should be handled inside my
 project? Or should I change GroupForm to send a ModifiedEvent for
 each modified object?
 
 I think you should override the action handler and do this for your 
 project. I don't think it should be the default behaviour.

I can do so. But am I the only one who edits more than one object in a 
GroupForm and might need this feature?


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] z3c.form: GroupForm and ModificationEvents

2010-01-13 Thread Michael Howitz
Am 12.01.2010 um 22:22 schrieb Roger:
 Hi Michael 
 
 Betreff: [Zope-dev] z3c.form: GroupForm and ModificationEvents
[...]
 Do I have a very special use case which should be handled 
 inside my project?
 Or should I change GroupForm to send a ModifiedEvent for each 
 modified object?
 
 I'm not using group forms so I can't say if it's wrong or right.
 But I have a question. Does the ISublocation adapter not
 dispatch the modified event to the containers items?

I think ISublocation does not help me here, as the folder is not changed only 
one item in it. The event wrongly (at least to me) tells the folder as modified.

 Are you sure that you use the ISublocation adapter which
 will dispatch events to container items?
 
 If this will not help, I think it's not bad to 
 implement such an event notification. Probably
 in a method or with a marker which allows others
 to simply disable the additional event notification.

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] SVN: z3c.form/trunk/ ``GroupForm`` and ``Group`` now use ``getContent`` method when instantiating group classes instead of directly accessing ``self.context``, as this is the usual way

2010-01-19 Thread Michael Howitz
Am 19.01.2010 um 09:44 schrieb Laurent Mignon:
 Hi,
 
 I doesn't understand the motivation behind this change and I've the 
 feeling that it'll break some existing code

The motivation is the following:

self.getContent() seems to be the pattern to access the context of a form. I 
used grep: there is no place where self.context is used directly besides in 
group.py. So it seems to be an error in the code not to use the common pattern.
But after reading the doctests of z3c.form I'm no longer sure whether this is 
correct.

My use case is the following:

I have a folder with contained items. In a form I display the schema of the 
folder in the group form and the schemas of all contained items as groups. Each 
group has a nested group displaying the meta data for the group's content. As 
the context of the groups was the folder (group = groupClass(self.context, 
self.request, self)) the meta data displayed was wrong.

 May be am I wrong but  ``getContent`` method is used to provides values 
 to widgets and actions as described into the interface:  '''Return the 
 content to be displayed and/or edited.''' Why do you want to give the 
 content to the subform. Providing the wright content according to its 
 definition is under the subform responsability.
 
 If not overrided, it's true that ``getContent`` return by default the 
 context. But for me the fact that you give the result of a call to 
 getContent as context for groupForm will break the following code:
 
 Class IAddress(Interface):
 street = zope.schema.TextLine(
   title='street')
 
 Class IPerson(Interface);
 firstname = zope.schema.TextLine(
   title='firstname')
 
 address = zope.schema.Object(
   title='address',
   schema = IAddress)
 
 
 class Address(object):
 implements(IAddress)
 
 def __init__(self, **kw):
 for name, value in kw.items():
   setattr(self, name, value)
 
 
 class Person(object):
 implements(IPerson)
 
 def __init__(self, **kw):
 for name, value in kw.items():
   setattr(self, name, value)
 
 class AddressGroup(group.Group):
 label = 'Address'
 fields = field.Fields(zope.schema.TextLine(
 __name__ = 'owner',
 title='Owner',
 readOnly=True)
 fields += field.Fields(IAddress).select('street')
 
 def getContext(self):

Should be getContent, I think.

 return {
'owner': self.context.firstname,
'street': self.context.address.street}
 
 class PersonGroup(group.Group):
 label = 'Person'
 fields += field.Fields(IPerson).select('firstname')
 
 
 class PersonEditForm(group.GroupForm, form.EditForm):
  fields = field.Fields(zope.schema.TextLine(
__name__=description',
title='Description',
readOnly=True)
  groups = (PersonGroup, AddressGroup)
 
  def getContent(self):
  return {'description': 'Form used to edit a person and its 
 Address'}

I had never seen this before but according to the doctests of z3c.form it is a 
valid use case.

 person = Person(firstname='fName', address=Address(street='street'))
 request = testing.TestRequest()
 
 edit = PersonEditForm(person, request)
 
 
 Before the changes the previous 'not tested' code worked as expected. 
 Since you give the result of getContent when instantiating the SubForms, 
 This code is now broken and I've to modify the getContent method on each 
 subfoms to take the context on the parentForm pointer.
 
 class AddressGroup(group.Group):
 label = 'Address'
 fields = field.Fields(zope.schema.TextLine(
 __name__ = 'owner',
 title='Owner',
 readOnly=True)
 fields += field.Fields(IAddress).select('street')
 
 def getContext(self):
 return {
'owner': self.parentForm.context.firstname,
'street': self.parentform.context.address.street}
 
 
 As I've said, may be am I wrong but I've the feeling that using the 
 ``getContent`` as context for a subform introduce a mismatch between the 
 2 concepts behind ``context`` and ``getContent`` and can break existing 
 code.
 The same result can be achieved, by explicitly instantiating the 
 subforms into the parentForm constructor.
 
 class MyEditForm(group.GroupForm, form.EditForm):
 
 def __init__(self, context, request):
 super(MyEditForm, self).__init__(context, request)
 firstContext = {}
 secondContext = {}
   self.groups = (
   MyFirstGroup(firstcontext, request, self),
 MySecondGroup(secondContext, request, self))

I'm not sure whether this works. (I'll try it.) Whether it works it obsoletes 
my changes.

 
 
 Michael Howitz wrote:
 Log message for revision 108077:
  ``GroupForm`` and ``Group`` now use ``getContent`` method when 
 instantiating group classes instead of directly accessing ``self.context``, 
 as this is the usual way to access the context

Re: [Zope-dev] SVN: z3c.form/trunk/ ``GroupForm`` and ``Group`` now use ``getContent`` method when instantiating group classes instead of directly accessing ``self.context``, as this is the usual way

2010-01-19 Thread Michael Howitz
Am 19.01.2010 um 16:58 schrieb Laurent Mignon:
 Michael Howitz wrote:
 The motivation is the following:
 
 self.getContent() seems to be the pattern to access the context of a form. I 
 used grep: there is no place where self.context is used directly besides in 
 group.py. So it seems to be an error in the code not to use the common 
 pattern.
 But after reading the doctests of z3c.form I'm no longer sure whether this 
 is correct.
 
 My use case is the following:
 
 I have a folder with contained items. In a form I display the schema of the 
 folder in the group form and the schemas of all contained items as groups. 
 Each group has a nested group displaying the meta data for the group's 
 content. As the context of the groups was the folder (group = 
 groupClass(self.context, self.request, self)) the meta data displayed was 
 wrong.
 
 But if your Groupform override getContent to provide an object 
 implementing the expected interface, that's right

This might be a solution.

 Class IAddress(Interface):
street = zope.schema.TextLine(
 title='street')
 
 Class IPerson(Interface);
firstname = zope.schema.TextLine(
 title='firstname')
 
address = zope.schema.Object(
 title='address',
 schema = IAddress)
 
 
 class Address(object):
implements(IAddress)
 
def __init__(self, **kw):
for name, value in kw.items():
 setattr(self, name, value)
 
 
 class Person(object):
implements(IPerson)
 
def __init__(self, **kw):
for name, value in kw.items():
 setattr(self, name, value)
 
 class AddressGroup(group.Group):
label = 'Address'
fields = field.Fields(zope.schema.TextLine(
__name__ = 'owner',
title='Owner',
readOnly=True)
fields += field.Fields(IAddress).select('street')
 
def getContext(self):
 
 Should be getContent, I think.
 
return {
   'owner': self.context.firstname,
   'street': self.context.address.street}
 
 class PersonGroup(group.Group):
label = 'Person'
fields += field.Fields(IPerson).select('firstname')
 
 
 class PersonEditForm(group.GroupForm, form.EditForm):
 fields = field.Fields(zope.schema.TextLine(
   __name__=description',
   title='Description',
   readOnly=True)
 groups = (PersonGroup, AddressGroup)
 
 def getContent(self):
 return {'description': 'Form used to edit a person and its 
 Address'}
 
 I had never seen this before but according to the doctests of z3c.form it is 
 a valid use case.
 
 My understand of ``getContent`` is to provide a way to give values used 
 by the widgets. By default, since the common use case is to edit / 
 display values from the context, the implementation return the context.

I see it differently. So I'd like to ask what was the original intention of 
``getContent``? 
Anyone here to answer this question?

 If your form has to deal with fields defined in an interface not 
 provided by the context, you have a lot of ways to provides the related 
 values.
 * The first one is to provide an adapter adapting the context to the 
 interface defining the field
 * The second one is to override the ``getContent`` implementation so 
 it'll return an object implementing the right interface
 * The thirds one is to override the ``getContent`` implementation so 
 it'll return a dictionary where key = field.__name__ and value = the 
 value expected by the field. (In fact a default adapter exist that adapt 
 a dict to an interface)
 * ...

I might argue the other way round: when you override ``getContent`` in your 
form resp. group class you are on your own as you changed the default behavior 
of the form. Then you have to take care for for your groups to get the correct 
context.

 Have a look to datamanager.txt
 
 
 class MyEditForm(group.GroupForm, form.EditForm):
 
def __init__(self, context, request):
super(MyEditForm, self).__init__(context, request)
firstContext = {}
secondContext = {}
 self.groups = (
 MyFirstGroup(firstcontext, request, self),
MySecondGroup(secondContext, request, self))
 
 I'm not sure whether this works. (I'll try it.) Whether it works it 
 obsoletes my changes.

I tried it, it works, both in __init__ and in update. But this also works four 
your use case.

 According to the z3c.form implemention, the right place to put your 
 subform initialization is into the ``update`` method.
 
 class MyEditForm(group.GroupForm, form.EditForm):
 
 def update(self):
   self.groups = (
   MyFirstGroup(self.context.obj1, request, self),
  MySecondGroup(self.context.obj2, request, self))
 super(MyEditForm,self).update()
 
 Yours sincerely,
 
 sagblmi

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

Re: [Zope-dev] SVN: z3c.form/trunk/ ``GroupForm`` and ``Group`` now use ``getContent`` method when instantiating group classes instead of directly accessing ``self.context``, as this is the usual way

2010-01-19 Thread Michael Howitz
Am 19.01.2010 um 21:30 schrieb Stephan Richter:

 On Tuesday 19 January 2010, Michael Howitz wrote:
 My understand of ``getContent`` is to provide a way to give values used 
 by the widgets. By default, since the common use case is to edit / 
 display values from the context, the implementation return the context.
 
 I see it differently. So I'd like to ask what was the original intention of
 ``getContent``?  Anyone here to answer this question?
 
 Originally we only supported the context to be modified. We later found this 
 far too limiting as a form should be able to modify any sort of objects 
 within 
 a context or not caring about the context at all.
 
 getContent() can return anything it wants to as long as a data manager can 
 map the fields to it. So I think Laurent is correct.

Okay, then I'll revert my changes and make a new release.


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 )


[Zope-dev] zope.dublincore and zope.copypastemove not compatible?

2010-02-06 Thread Michael Howitz
Hi,

I found something strange in metadata when copying a persistent object.

My situation is the following:
I have a container with some elements inside. I create a copy of this container 
using

zope.copypastemove.ObjectCopier(my_container).copyTo(my_container.__parent__)

(Actually I use zope.copypastemove.interfaces.IObjectCopier(my_container) but 
this calls the adapter mentioned above.)

Side note: Is this the right way to copy an persistent object nowadays?

This happens tho dublin core metadata then:
As zope.dublincore.timeannotators.CreatedAnnotator is subscribed to 
zope.lifecycleevent.IObjectCreatedEvent it gets called as the ObjectCopiedEvent 
is a subclass of ObjectCreatedEvent. The copy of the container gets a new 
creation date set in its metadata.

But zope.copypastemove.dispatchToSublocations calls the subscribers for the 
sublocations using 
zope.component.subscribers((sub, event), None)

So the zope.dublincore.timeannotators.CreatedAnnotator does not get called as 
it is not registered for (object, event) but only for (event,).

This leads to a strange situation: the metadata of the copied container get 
updated but not the metadata of its contents.
This behavior has not changed since version 3.4.0 which was about 2,5 years ago.

I think this is a long-standing bug and it should it be fixed in 
zope.dublincore by registering the subscribers for (object, event)? 
(Additionally or exclusively, I'm not sure.)

Any thoughts?

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] Reminder : zope.app.authentication

2010-02-08 Thread Michael Howitz
Am 05.02.2010 um 17:31 schrieb Souheil CHELFOUH:
[...]
 If it's possible, I like to get the ownership on the
 zope.app.authentication so I can proceed with the release.

What's your pypi-name?


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] Reminder : zope.app.authentication

2010-02-08 Thread Michael Howitz
Am 08.02.2010 um 10:14 schrieb Souheil CHELFOUH:
 it's `trollfot`
 Thank you :)

Done.

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] release for z3c.password with Dutch translations

2010-02-18 Thread Michael Howitz
Am 18.02.2010 um 12:25 schrieb Jan-Wijbrand Kolman:
 Hello,
 
 I would be greatly helped with a new release of z3c.password with the
 Dutch translations that I recently added.
 
 Would it be possible for one of the package owners to make a release, 
 or, alternatively, allow me to upload a new version to the package 
 index? (My pypi username is jw).

Done.

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 )


[Zope-dev] Poposal: Split zope.app.preference into two packages

2010-04-15 Thread Michael Howitz
Hi,

I propose to split zope.app.preference into two separate packages:
- zope.preference -- which contains the ZMI independent stuff,
- zope.app.preference -- which contains the ZMI stuff and depends on 
zope.preference.

By ZMI stuff I mean the views and page templates which depend on ZMI to be 
displayed. 
As there are no tests for these views I'll write some testbrowser tests first.

Later on there might be a package z3c.preference which integrates 
zope.preference using z3c.pagelet.

Risks: I do not see any.

Any objections, hints, …?

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] [Checkins] SVN: zope.dublincore/trunk/ Renamed the ``zope.app.dublincore.*`` permissions to ``zope.dublincore.*`.

2010-04-23 Thread Michael Howitz
Am 19.04.2010 um 22:21 schrieb Tres Seaver:
 Log message for revision 45:
  Renamed the ``zope.app.dublincore.*`` permissions to ``zope.dublincore.*`.
 
  Applications may need to fix up grants based on the old permissions.
 
   fixes lp:566724
 
 
 Changed:
  U   zope.dublincore/trunk/CHANGES.txt
  U   zope.dublincore/trunk/src/zope/dublincore/configure.zcml
 
 -=-
 Modified: zope.dublincore/trunk/CHANGES.txt
 ===
 --- zope.dublincore/trunk/CHANGES.txt 2010-04-19 20:19:54 UTC (rev 44)
 +++ zope.dublincore/trunk/CHANGES.txt 2010-04-19 20:21:52 UTC (rev 45)
 @@ -5,6 +5,9 @@
 3.6.1 (2010-04-19)
 ==
 
 +- Renamed the ``zope.app.dublincore.*`` permissions to ``zope.dublincore.*`.
 +  Applications may need to fix up grants based on the old permissions.

Hi Tres,

It's fine to rename these permissions, I like it.

But this change is so big that it requires a new major version of this package: 
it requires changes in other packages, too, as you already said in your log 
message.

Could you please:
- unmerge these changes from the 3.6 branch and re-release a new 3.6.3 without 
the permission renaming,
- do a new 3.7.0 release including the renaming and
- depend on the 3.7 release in the packages where you updated ftesting.zcml to 
use the new permissions (zope.app.file and zope.app.container)?

Thanks in advance.

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] [Checkins] SVN: zope.dublincore/trunk/ Renamed the ``zope.app.dublincore.*`` permissions to ``zope.dublincore.*`.

2010-04-23 Thread Michael Howitz
Am 23.04.2010 um 15:19 schrieb Tres Seaver:
[...]
 Thanks for pointing out that directive, whose existence I had forgotten.
 Assuming we put the 'redefinePermssion' directives in place on the
 trunk, why shouldn't we leave the version number as is?  I consider the
 rename a bugfix, not a feature, and if we make it backwared compatible,
 there is no reason to bump the major version.

When it is fully backwards compatible I do not see a reason to bump the major 
version.
Otherwise it is required according to the ZTK steering group decisions[1].


[1] ... http://docs.zope.org/zopetoolkit/steeringgroup/decisions.html (sorry, 
there is no anchor for the list item I mean)


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] zc.recipe.testrunner 1.0.1

2010-05-06 Thread Michael Howitz
Am 05.05.2010 um 11:11 schrieb Adam GROSZER:
 Hello Andreas,
 
 Seems like you pinned there 'zope.testing=3.4.', what is rather
 in conflict even with the KGS3.4.0 (which has 3.5.1).
 Do you remember why you pinned it?

Version 1.1.0 is not compatible with zope.testing 3.4.x, it requires at least 
3.6.0 [1] [2]

But that's not the reason not to allow 3.5.x versions. It seems to be here: [3]


[1] https://mail.zope.org/pipermail/checkins/2008-August/024226.html
[2] https://mail.zope.org/pipermail/checkins/2008-August/024227.html
[3] https://mail.zope.org/pipermail/checkins/2008-August/024259.html


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] zmi_views menu in zope.dublincore

2010-06-09 Thread Michael Howitz
Am 06.06.2010 um 18:51 schrieb Ilshad Khabibullin:

 Hi,
 
 zope/dublincore/browser/configure.zcml uses zmi_views menu.
 Then if we use zope.dublincore (and it is great package) then we need 
 zope.app.zcmlfiles and many other zope.app.* packages.
 
 I think it's wrong.
 
 Your opinions?

You can exclude the browser package using 

  exclude package=zope.dublincore.browser /

in a ZCML file of your application.

But you are right, zope.dublincore should not contain any browser code which 
depends on zope.app.* packages.


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] Poposal: Split zope.app.preference into two packages

2010-06-12 Thread Michael Howitz
Am 15.04.2010 um 17:06 schrieb Michael Howitz:
 Hi,
 
 I propose to split zope.app.preference into two separate packages:
 - zope.preference -- which contains the ZMI independent stuff,
 - zope.app.preference -- which contains the ZMI stuff and depends on 
 zope.preference.
 
 By ZMI stuff I mean the views and page templates which depend on ZMI to be 
 displayed. 
 As there are no tests for these views I'll write some testbrowser tests first.
 
 Later on there might be a package z3c.preference which integrates 
 zope.preference using z3c.pagelet.
 
 Risks: I do not see any.
 
 Any objections, hints, …?

As there were no objections or other comments, I did the splitting and released 
zope.preference and zope.app.preference as version 3.8.0 on pypi.

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.0a1 release

2010-07-07 Thread Michael Howitz
Am 30.06.2010 um 21:47 schrieb Hanno Schlichting:
 Hi.
 
 On behalf of the Zope Toolkit release team and the Zope community, I'm
 happy to announce the first 1.0 alpha release of the Zope Toolkit.
 
 You can read more about the release at
 http://docs.zope.org/zopetoolkit/releases/overview-1.0a1.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.0a1/ztk-versions.cfg
http://download.zope.org/zopetoolkit/index/1.0a1/zopeapp-versions.cfg

Tried it with a project of mine.

It works nearly completely fine.
I only saw some a test breaking because between zope.testbrowser 3.6.0a2 and 
3.9.0 behavior of browser.goBack() seems to have changed. It does now a reload 
of the previous page (causing form re-submit in my test).
But maybe this is caused by the new mechanize 0.2.x version.



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 )


[Zope-dev] z3c.form: Problem with DictionaryField datamanger

2010-07-10 Thread Michael Howitz
Hi Wichert,

In Revision r112225 (see [1]) you make sure that the DictionaryField data 
manager conforms to the interface by raising an exception in datamanager.get() 
when a requested key is not found in the underlying dictionary.

Although it is nice to conform to the interface, this changes breaks code in a 
project of mine: z3c.form.form.applyChanges uses datamanager.get() to check 
whether the value has changed. Before r112225 this call returned the 
field.missing_value when the requested key does not exist. Now it raises an 
AttributeError, so applyChanges cannot continue.

I'm not sure whether it was intended that now all keys must exist in the 
dictionary.

In r114527 I prepared a change on a branch which uses datamanager.query() get 
the old value for comparison which allows that keys can be missing again in the 
dictionary.


I'd like to merge this change (it breaks no tests) into the trunk. Any 
objections?


[1] .. http://svn.zope.org/?rev=112225view=rev
[2] .. http://svn.zope.org/?view=revrev=114527
 
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 )


[Zope-dev] Changelog of differences between ztk 1.0a1 and 1.0a2?

2010-07-12 Thread Michael Howitz
Hi,

is there a change log showing the differences between versions 1.0a1 and the 
lately released 1.0a2 of the ztk?



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] Changelog of differences between ztk 1.0a1 and 1.0a2?

2010-07-12 Thread Michael Howitz

Am 12.07.2010 um 09:52 schrieb Hanno Schlichting:

 On Mon, Jul 12, 2010 at 8:42 AM, Michael Howitz m...@gocept.com wrote:
 is there a change log showing the differences between versions 1.0a1 and the 
 lately released 1.0a2 of the ztk?
 
 There's no changelog yet. Diff'ing the files from the tags is the best
 you get right now.
 
 We are planning to automatically generate one. The code for doing so
 in out there, we just need to adjust it and put it in somewhere.

Nice news.

 Probably into the script that generates
 http://docs.zope.org/zopetoolkit/releases/packages-1.0a2.html.

I did not know that this page exists (seems to be relatively well hidden).

I would expect the change log here: 
http://docs.zope.org/zopetoolkit/releases/overview-1.0a2.html which is a bit 
more prominent in the table of contents. At least it should contain a link to 
the changes.


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] Request for review: z3c.recipe.i18n (branch: baijum-zcml-path)

2010-08-09 Thread Michael Howitz
Am 09.08.2010 um 09:38 schrieb Baiju M:[...]Incidentally, can you usezcml = include file="/absolute/path/name" /without specifying a package? In other words, is this just syntacticsugar for something that's already possible, or a way to do somethingthat wasn't possible before?Thanks for the review!I can use "file" option without specifying the package.So, I am not going to merge my branch.But could you please document this in the package for the next one who wants this feature?Thanks in advance.Yours sincerely,--Michael Howitz · m...@gocept.com · software developergocept gmbh  co. kg · forsterstraße 29 · 06112 halle (saale) · germanyhttp://gocept.com · tel +49 345 1229889 8 · fax +49 345 1229889 1Zope 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 )


[Zope-dev] Blueprint: zope.generations

2010-08-19 Thread Michael Howitz
Hi,

I wrote a blue print to extract the parts of zope.app.generations into a new 
zope.generations package.
See: 
https://blueprints.launchpad.net/zope.app.generations/+spec/zope.generations

Any opinions?


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.dublincore and zope.copypastemove not compatible?

2010-08-19 Thread Michael Howitz
Am 06.02.2010 um 17:43 schrieb Michael Howitz:
 Hi,
 
 I found something strange in metadata when copying a persistent object.
 
 My situation is the following:
 I have a container with some elements inside. I create a copy of this 
 container using
 
 zope.copypastemove.ObjectCopier(my_container).copyTo(my_container.__parent__)
 
 (Actually I use zope.copypastemove.interfaces.IObjectCopier(my_container) but 
 this calls the adapter mentioned above.)
 
 Side note: Is this the right way to copy an persistent object nowadays?
 
 This happens tho dublin core metadata then:
 As zope.dublincore.timeannotators.CreatedAnnotator is subscribed to 
 zope.lifecycleevent.IObjectCreatedEvent it gets called as the 
 ObjectCopiedEvent is a subclass of ObjectCreatedEvent. The copy of the 
 container gets a new creation date set in its metadata.
 
 But zope.copypastemove.dispatchToSublocations calls the subscribers for the 
 sublocations using 
 zope.component.subscribers((sub, event), None)
 
 So the zope.dublincore.timeannotators.CreatedAnnotator does not get called as 
 it is not registered for (object, event) but only for (event,).
 
 This leads to a strange situation: the metadata of the copied container get 
 updated but not the metadata of its contents.
 This behavior has not changed since version 3.4.0 which was about 2,5 years 
 ago.
 
 I think this is a long-standing bug and it should it be fixed in 
 zope.dublincore by registering the subscribers for (object, event)? 
 (Additionally or exclusively, I'm not sure.)
 
 Any thoughts?

As there were no replies I this bug into launchpad: 
https://bugs.launchpad.net/zope.copypastemove/+bug/620353

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] Blueprint: zope.generations

2010-08-19 Thread Michael Howitz
Am 19.08.2010 um 14:36 schrieb Tres Seaver:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Michael Howitz wrote:
 Hi,
 
 I wrote a blue print to extract the parts of zope.app.generations into a new 
 zope.generations package.
 See: 
 https://blueprints.launchpad.net/zope.app.generations/+spec/zope.generations
 
 Any opinions?
 
 I see the blueprint, but it doesn't have any writeup linked:  did you
 intend to link something?

I had put everything in the summary. But now I added a proposal in the wiki and 
linked it to the blue print.

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.dublincore and zope.copypastemove not compatible?

2010-08-19 Thread Michael Howitz
Am 19.08.2010 um 11:56 schrieb Michael Howitz:
 Am 06.02.2010 um 17:43 schrieb Michael Howitz:
 Hi,
 
 I found something strange in metadata when copying a persistent object.
 
 My situation is the following:
 I have a container with some elements inside. I create a copy of this 
 container using
 
 zope.copypastemove.ObjectCopier(my_container).copyTo(my_container.__parent__)
 
 (Actually I use zope.copypastemove.interfaces.IObjectCopier(my_container) 
 but this calls the adapter mentioned above.)
 
 Side note: Is this the right way to copy an persistent object nowadays?
 
 This happens tho dublin core metadata then:
 As zope.dublincore.timeannotators.CreatedAnnotator is subscribed to 
 zope.lifecycleevent.IObjectCreatedEvent it gets called as the 
 ObjectCopiedEvent is a subclass of ObjectCreatedEvent. The copy of the 
 container gets a new creation date set in its metadata.
 
 But zope.copypastemove.dispatchToSublocations calls the subscribers for the 
 sublocations using 
 zope.component.subscribers((sub, event), None)
 
 So the zope.dublincore.timeannotators.CreatedAnnotator does not get called 
 as it is not registered for (object, event) but only for (event,).
 
 This leads to a strange situation: the metadata of the copied container get 
 updated but not the metadata of its contents.
 This behavior has not changed since version 3.4.0 which was about 2,5 years 
 ago.
 
 I think this is a long-standing bug and it should it be fixed in 
 zope.dublincore by registering the subscribers for (object, event)? 
 (Additionally or exclusively, I'm not sure.)
 
 Any thoughts?
 
 As there were no replies I this bug into launchpad: 
 https://bugs.launchpad.net/zope.copypastemove/+bug/620353

I implemented a solution, see comment 
https://bugs.launchpad.net/zope.copypastemove/+bug/620353/comments/1

Could someone please review the solution before I merge it into trunk?
Thanks in advance.


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 )


[Zope-dev] Persistent principal folder?

2010-08-20 Thread Michael Howitz
Hi,

I need to store persistent principals in a folder in the ZODB. I do not need 
any UI for the principal nor the principal folder. I'd like to use 
zope.pluggableauth to authenticate them.

zope.app.authentication.principalfolder does nearly exactly what I need. But I 
do not like to use it as it has many bad dependencies only needed for ZMI.
Even z3c.authenticator seems to do too much as it contains UI code, too.

Is there something else like 
zope.app.authentication.principalfolder.PrincipalFolder?
Or what is the way nowadays to store persistent principals?

Could it be a solution to extract zope.app.authentication.principalfolder into 
a new package like `zope.principalfolder` or even zope.pluggableauth? 


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] Blueprint: zope.generations

2010-08-20 Thread Michael Howitz
Am 19.08.2010 um 15:52 schrieb Jim Fulton:
 On Thu, Aug 19, 2010 at 4:05 AM, Michael Howitz m...@gocept.com wrote:
 Hi,
 
 I wrote a blue print to extract the parts of zope.app.generations into a new 
 zope.generations package.
 See: 
 https://blueprints.launchpad.net/zope.app.generations/+spec/zope.generations
 
 Any opinions?
 
 +1 in general.  Can you add to the proposal a list of what you think
 the dependencies of zope.generations will be?

This is the list: (I also added it to the proposal.)

- ZODB
- transaction
- zope.app.publication (only needed in a utility function to get the database 
root folder)
- zope.component
- zope.interface
- zope.processlifetime



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] Blueprint: zope.generations

2010-08-23 Thread Michael Howitz
Am 22.08.2010 um 15:09 schrieb Tres Seaver:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Michael Howitz wrote:
 Am 19.08.2010 um 15:52 schrieb Jim Fulton:
 On Thu, Aug 19, 2010 at 4:05 AM, Michael Howitz m...@gocept.com wrote:
 Hi,
 
 I wrote a blue print to extract the parts of zope.app.generations into a 
 new zope.generations package.
 See: 
 https://blueprints.launchpad.net/zope.app.generations/+spec/zope.generations
 
 Any opinions?
 +1 in general.  Can you add to the proposal a list of what you think
 the dependencies of zope.generations will be?
 
 This is the list: (I also added it to the proposal.)
 
 - ZODB
 - transaction
 - zope.app.publication (only needed in a utility function to get the 
 database root folder)
 - zope.component
 - zope.interface
 - zope.processlifetime
 
 It seems like we should be able to remove the zope.app.publication
 dependency:  don't the processlifetime events include a database
 opened event we could use?

The database opened event from zope.processlifetime is already used, 
zope.app.publication is needed for this function in 
zope.app.generations.utility:

def getRootFolder(context):
return context.connection.root().get(
zope.app.publication.zopepublication.ZopePublication.root_name, None)

I think this function is needed in every generation script.
Is there another way to get the root folder?
Should the root_name be hard coded here instead of importing it?



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] Persistent principal folder?

2010-08-23 Thread Michael Howitz
Am 21.08.2010 um 00:11 schrieb Vincent Fretin:
[...]
 Hi,
 
 Souheil Chelfouh initially extracted the pluggable auth utility from
 zope.app.authentication to zope.pluggableauth to not have all the
 browser views and this principalfolder implementation.
 In Dolmen http://www.dolmen-project.org/ (set of libraries you can use
 with Grok to build a small CMS), we have our own principal folder
 plugin implementation
 http://pypi.python.org/pypi/dolmen.app.authentication which is based
 on dolmen.authentication and zope.pluggableauth.

Hi,

I looked at dolmen.app.authentication, but it contains UI code, too and it has 
many grok resp. dolmen dependencies, so it is not really better than 
zope.app.authentication for my use case.

 And you have an example of a User content type in:
 http://gitweb.dolmen-project.org/menhir.contenttype.user.git

Same here.


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] Persistent principal folder?

2010-08-24 Thread Michael Howitz
Am 23.08.2010 um 13:50 schrieb Souheil CHELFOUH:
 The code you're interested in is in dolmen.authentication,
 dolmen.app.x are UI packages

This package only contains some interfaces and an adapter but no principal 
folder implementation.

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] Blueprint: zope.generations

2010-08-24 Thread Michael Howitz
Am 23.08.2010 um 15:52 schrieb Jim Fulton:
 On Mon, Aug 23, 2010 at 3:41 AM, Michael Howitz m...@gocept.com wrote:
[...]
 The database opened event from zope.processlifetime is already used, 
 zope.app.publication is needed for this function in 
 zope.app.generations.utility:
 
 def getRootFolder(context):
return context.connection.root().get(
zope.app.publication.zopepublication.ZopePublication.root_name, None)
 
 I think this function is needed in every generation script.
 
 Hm, this depends on a particular application (as defined by zope.app).
 
 Is there another way to get the root folder?
 
 Some apps probably don't use a root folder.

But most apps do so, I think. I moved the getRootFolder function to 
zope.app.generations from zope.app.zopeappgenerations some months ago as it was 
the only reason I needed the zope.app.zopeappgenerations package.

What about a condition? Only when zope.app.publication is available, the 
function gets defined. So we could get rid of it as a dependency and do not 
need a separate package for this function.


 Should the root_name be hard coded here instead of importing it?
 
 I think this is an issue for the individual zope.generations plug ins.
 Does zope.generations itself use this?

No it does not use it itself.


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] Bug day reports

2010-08-25 Thread Michael Howitz
Am 24.08.2010 um 17:12 schrieb Christian Theune:
 Hi everyone,
 
 last week was a bug day and I'd like to repeat the exercise from last 
 time: it would be nice if everyone who was involved in some way to speak 
 up and say what they worked on.

Hi,

I did the following:

- wrote a blueprint:
  https://blueprints.launchpad.net/zope.app.generations/+spec/zope.generations

- wrote a ticket and added a solution for review:
  https://bugs.launchpad.net/zope.copypastemove/+bug/620353
  https://bugs.launchpad.net/zope.copypastemove/+bug/620353/comments/1

- rejected a ticket:
  https://bugs.launchpad.net/zope.catalog/+bug/189783

- released some packages, which contain the permission renaming from 
zope.app.dublincore.* to zope.dublincore.*
  zope.dublincore
  zope.app.file
  zope.app.container

- updated migration documentation in ZTK accordingly:
  
http://docs.zope.org/zopetoolkit/releases/overview-1.0a3.html#zope-dublincore-permission-renaming

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] Blueprint: zope.generations

2010-08-25 Thread Michael Howitz
Am 24.08.2010 um 15:08 schrieb Jim Fulton:
 On Tue, Aug 24, 2010 at 2:32 AM, Michael Howitz m...@gocept.com wrote:
 Am 23.08.2010 um 15:52 schrieb Jim Fulton:
 ...
 I think this is an issue for the individual zope.generations plug ins.
 Does zope.generations itself use this?
 
 No it does not use it itself.
 
 Then this is easy. :)  zope.app.publication should not be a dependency of
 zope.generations.  It should be a dependency of anything that uses it,

The anything that uses it are the applications written on top of Zope. There 
is nothing in between.
I do not think that every application which uses a root folder should implement 
this function separately.
So you really suggest to put this little function into a separate package? 

 including some zope.generations plugins.

I'm not aware of any of those plug-ins and did not find any on PyPI.
So I'm not sure what you mean by zope.generations plugins.


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.dublincore and zope.copypastemove not compatible?

2010-09-14 Thread Michael Howitz
Am 19.08.2010 um 15:43 schrieb Michael Howitz:
 Am 19.08.2010 um 11:56 schrieb Michael Howitz:
 Am 06.02.2010 um 17:43 schrieb Michael Howitz:
 Hi,
 
 I found something strange in metadata when copying a persistent object.
 
 My situation is the following:
 I have a container with some elements inside. I create a copy of this 
 container using
 
 zope.copypastemove.ObjectCopier(my_container).copyTo(my_container.__parent__)
 
 (Actually I use zope.copypastemove.interfaces.IObjectCopier(my_container) 
 but this calls the adapter mentioned above.)
 
 Side note: Is this the right way to copy an persistent object nowadays?
 
 This happens tho dublin core metadata then:
 As zope.dublincore.timeannotators.CreatedAnnotator is subscribed to 
 zope.lifecycleevent.IObjectCreatedEvent it gets called as the 
 ObjectCopiedEvent is a subclass of ObjectCreatedEvent. The copy of the 
 container gets a new creation date set in its metadata.
 
 But zope.copypastemove.dispatchToSublocations calls the subscribers for the 
 sublocations using 
 zope.component.subscribers((sub, event), None)
 
 So the zope.dublincore.timeannotators.CreatedAnnotator does not get called 
 as it is not registered for (object, event) but only for (event,).
 
 This leads to a strange situation: the metadata of the copied container get 
 updated but not the metadata of its contents.
 This behavior has not changed since version 3.4.0 which was about 2,5 years 
 ago.
 
 I think this is a long-standing bug and it should it be fixed in 
 zope.dublincore by registering the subscribers for (object, event)? 
 (Additionally or exclusively, I'm not sure.)
 
 Any thoughts?
 
 As there were no replies I this bug into launchpad: 
 https://bugs.launchpad.net/zope.copypastemove/+bug/620353
 
 I implemented a solution, see comment 
 https://bugs.launchpad.net/zope.copypastemove/+bug/620353/comments/1
 
 Could someone please review the solution before I merge it into trunk?
 Thanks in advance.

As there were no comments, I merged the changes into trunk and released
zope.dublincore 3.8.0 and zope.copypastemove 3.8.0 today.

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 Tests: 46 OK, 7 Failed, 2 Unknown

2010-09-16 Thread Michael Howitz
Am 15.09.2010 um 13:58 schrieb Zope Tests Summarizer:
[...]
 Test failures
 -
[...]
 Subject: FAILED : ZTK 1.0 / Python2.4.6 Linux 64bit
 From: ccomb at free.fr
 Date: Wed Sep 15 01:26:59 EDT 2010
 URL: http://mail.zope.org/pipermail/zope-tests/2010-September/020028.html

Which SVN-URL does this buildbout use for buildout? Sorry, I did not find any 
hint in the buildbot UI.


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 Tests: 46 OK, 7 Failed, 2 Unknown

2010-09-16 Thread Michael Howitz
Am 16.09.2010 um 13:33 schrieb Patrick Gerken:
 I believe, nobody had yet the chance to change the configuration to
 follow the branch.
 that buildbot still follows the trunk.

The name is ZTK 1.0 so it should test the branch or
change its name and drop testing py24 as this is no longer supported by ZTK 
trunk.


 On Thu, Sep 16, 2010 at 13:12, Michael Howitz m...@gocept.com wrote:
 Am 15.09.2010 um 13:58 schrieb Zope Tests Summarizer:
 [...]
 Test failures
 -
 [...]
 Subject: FAILED : ZTK 1.0 / Python2.4.6 Linux 64bit
 From: ccomb at free.fr
 Date: Wed Sep 15 01:26:59 EDT 2010
 URL: http://mail.zope.org/pipermail/zope-tests/2010-September/020028.html
 
 Which SVN-URL does this buildbout use for buildout? Sorry, I did not find 
 any hint in the buildbot UI.
 
 
 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 )
 

Mit freundlichen Grüßen
-- 
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 )


[Zope-dev] Blueprint: zope.generations implemented

2010-09-18 Thread Michael Howitz
Hi,

I implemented the blue print 
https://blueprints.launchpad.net/zope.app.generations/+spec/zope.generations

I extracted the parts of zope.app.generations which are ZMI independent into a 
new zope.generations package.

Anyone who wants to review what I have done? (Although I already released the 
new packages as 3.7.0)


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 Tests: 42 OK, 12 Failed

2010-09-21 Thread Michael Howitz
Am 20.09.2010 um 17:22 schrieb Tres Seaver:
[...]
 Right, and we should be adding zope.testrunner to the ZTK trunk.

Done in r116694. But this change might lead to other problems: When updating to 
zope.testing 3.10.0 in ztk-versions.cfg I get the following error when running 
buildout:

The version, 3.10.0, is not consistent with the requirement, 
'zope.testing=3.6.0,3.10.0'.
While:
  Installing.
  Getting section test-ztk.
  Initializing section test-ztk.
  Installing recipe z3c.recipe.compattest.
Error: Bad version 3.10.0



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 Tests: 42 OK, 12 Failed

2010-09-21 Thread Michael Howitz
Am 21.09.2010 um 13:58 schrieb Gediminas Paulauskas:
 2010/9/21 Michael Howitz m...@gocept.com:
 Am 20.09.2010 um 17:22 schrieb Tres Seaver:
 [...]
 Right, and we should be adding zope.testrunner to the ZTK trunk.
 
 Done in r116694. But this change might lead to other problems: When updating 
 to zope.testing 3.10.0 in ztk-versions.cfg I get the following error when 
 running buildout:
 
 The version, 3.10.0, is not consistent with the requirement, 
 'zope.testing=3.6.0,3.10.0'.
 While:
  Installing.
  Getting section test-ztk.
  Initializing section test-ztk.
  Installing recipe z3c.recipe.compattest.
 Error: Bad version 3.10.0
 
 Need to update zc.recipe.testrunner to 1.3.0 that is compatible with
 zope.testing 3.10. The patch doing that is attached.
 
 Gediminas
 ztk-versions-using-zope.testing-3.10.diff

I used this patch and checked it in into a branch:
http://svn.zope.org/zopetoolkit/branches/zope.testing-3.10/

The reason why I did not check it in into trunk is that it breaks 17 packages 
in the ZTK mainly because zope.testing test dependency is not declared or the 
packages are not yet compatible with zope.testing no longer containing 
testrunner.

@Hanno: Could you please decide in the ZTK release team, whether zope.testing 
3.10 is a goal for the ZTK trunk. If so, I could merge the branch to the trunk 
and we could start fixing the tests. But maybe we should do this after the 1.0 
final release.


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 Tests: 32 OK, 24 Failed

2010-09-21 Thread Michael Howitz
Am 21.09.2010 um 13:58 schrieb Zope Tests Summarizer:
 Summary of messages to the zope-tests list.
 Period Mon Sep 20 12:00:00 2010 UTC to Tue Sep 21 12:00:00 2010 UTC.
 There were 56 messages: 6 from Zope Tests, 4 from buildbot at pov.lt, 20 from 
 buildbot at winbot.zope.org, 14 from ccomb at free.fr, 12 from jdriessen at 
 thehealthagency.com.
 
 
 Test failures
 -
 Subject: FAILED : ZTK 1.0dev / Python2.5.5 Linux 64bit
 From: ccomb at free.fr
 Date: Mon Sep 20 10:32:18 EDT 2010
 URL: http://mail.zope.org/pipermail/zope-tests/2010-September/020298.html

I might have fixed this by using branches/3.9 of zope.component which I created 
out of tags/3.9.5 as the trunk requires zope.testing 3.10



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 Tests: 42 OK, 12 Failed

2010-09-22 Thread Michael Howitz
Am 21.09.2010 um 15:43 schrieb Hanno Schlichting:
 On Tue, Sep 21, 2010 at 3:39 PM, Michael Howitz m...@gocept.com wrote:
 @Hanno: Could you please decide in the ZTK release team, whether 
 zope.testing 3.10 is a goal for the ZTK trunk. If so, I could merge the 
 branch to the trunk and we could start fixing the tests. But maybe we should 
 do this after the 1.0 final release.
 
 It's a goal for ZTK 1.1 (trunk) to use zope.testing 3.10 /
 zope.testrunner. It's definitely outside the scope for ZTK 1.0.
 
 If we already have lots of failing tests in the current state on trunk
 anyways, I'd be fine with you going ahead and merging the branch. We
 can fix all the other packages in the coming days. If we have an
 almost stable trunk, I'd prefer the work to be done on a branch first
 and only get it merged once the tests pass again.

Okay, then I'll do the work on the branch as the trunk currently seems to be 
quite stable. There seems to be only the zope.app.authentication vs. 
zope.app.securitypolicy issue left to be fixed on trunk.

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 Tests: 34 OK, 13 Failed, 3 Unknown

2010-09-22 Thread Michael Howitz
Am 22.09.2010 um 13:58 schrieb Zope Tests Summarizer:
 Summary of messages to the zope-tests list.
 Period Tue Sep 21 12:00:00 2010 UTC to Wed Sep 22 12:00:00 2010 UTC.
 There were 50 messages: 6 from Zope Tests, 4 from buildbot at pov.lt, 21 from 
 buildbot at winbot.zope.org, 11 from ccomb at free.fr, 8 from jdriessen at 
 thehealthagency.com.
 
 Test failures
 -
[...]
 Subject: FAILED : ZTK 1.0dev / Python2.5.5 Linux 64bit
 From: ccomb at free.fr
 Date: Tue Sep 21 23:15:02 EDT 2010
 URL: http://mail.zope.org/pipermail/zope-tests/2010-September/020388.html

This failure is due to missing zope.generations which is needed by 
zope.app.generations 3.7. So I switched to a maintenance branch of 
zope.app.generations.


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 )


  1   2   >