[Zope3-dev] Add function for schema validation in zope.schema

2007-08-20 Thread Christian Zagrodnick
Hi, zope.schema defines how a schema can be validated, defines errors and provides a way to validate single fields. I think we should add a function to validate a given schema on a given class. This should include constraints and invariants: validateSchema(IMySchema, myobject) [or alike]

Re: [Zope3-dev] Add function for schema validation in zope.schema

2007-08-20 Thread Fred Drake
On 8/20/07, Christian Zagrodnick [EMAIL PROTECTED] wrote: I think we should add a function to validate a given schema on a given class. This should include constraints and invariants: I do presume you mean object, rather than class, as your example implies. validateSchema(IMySchema, myobject)

Re: AW: [Zope3-dev] Re: AW: relying on win32api in windows supportofzc.zope3recipes

2007-08-20 Thread Stephan Richter
On Friday 17 August 2007 17:32, Gary Poster wrote: However, it's worth noting to clarify this discussion that buildout   is being successfully used to install a wide variety of software on   *nix systems (I know of Red Hat, Ubuntu, and OS X). This includes   software that does not have eggs

Re: [Zope3-dev] Add function for schema validation in zope.schema

2007-08-20 Thread Christian Theune
Hi, Am Montag, den 20.08.2007, 08:59 -0400 schrieb Fred Drake: On 8/20/07, Christian Zagrodnick [EMAIL PROTECTED] wrote: I think we should add a function to validate a given schema on a given class. This should include constraints and invariants: I do presume you mean object, rather than

[Zope3-dev] Re: Add function for schema validation in zope.schema

2007-08-20 Thread Christian Zagrodnick
On 2007-08-20 14:59:52 +0200, Fred Drake [EMAIL PROTECTED] said: On 8/20/07, Christian Zagrodnick [EMAIL PROTECTED] wrote: I think we should add a function to validate a given schema on a given class. This should include constraints and invariants: I do presume you mean object, rather than

Re: [Zope3-dev] Add function for schema validation in zope.schema

2007-08-20 Thread Benji York
Christian Theune wrote: From my latest experience and research of when to use exceptions and when to use return values I'd say let's not use an exception. +1 -- Benji York Senior Software Engineer Zope Corporation ___ Zope3-dev mailing list

Re: [Zope3-dev] Add function for schema validation in zope.schema

2007-08-20 Thread Wichert Akkerman
Previously Christian Theune wrote: Hi, Am Montag, den 20.08.2007, 08:59 -0400 schrieb Fred Drake: On 8/20/07, Christian Zagrodnick [EMAIL PROTECTED] wrote: I think we should add a function to validate a given schema on a given class. This should include constraints and invariants:

Re[2]: AW: [Zope3-dev] Re: AW: relying on win32api in windows supportofzc.zope3recipes

2007-08-20 Thread Adam Groszer
Monday, August 20, 2007, 3:05:45 PM, Stephan Richter wrote: Windows is pretty different in this respect. You really want to use an installer, which means you get a wizard. People in Windows expect this behavior and want it. It is quiet ignorant to ask them to use eggs instead. Hackers on

[Zope3-dev] browser:page's for= can be class browser:menuItem can't

2007-08-20 Thread Christian Zagrodnick
Hoi I just figured, that the browser:menuItem cannot be registered for classes. But you can with browser:page. I think if a browser:page can be registered for a class a menuItem should support this, too. Also a browser:page for=someclass menu=... / will break on getting the menu items

Re: [Zope3-dev] Add function for schema validation in zope.schema

2007-08-20 Thread Benji York
Wichert Akkerman wrote: That would be confusing though: I would expect the result of a method that checks validaty to return something that evaluates to True if everything is valid. Code like this just messes up my brain: if not zope.schema.validate(obj, IMySchema): print Everything

[Zope3-dev] Re: browser:page's for= can be class browser:menuItem can't

2007-08-20 Thread Philipp von Weitershausen
Christian Zagrodnick wrote: Hoi I just figured, that the browser:menuItem cannot be registered for classes. But you can with browser:page. I think if a browser:page can be registered for a class a menuItem should support this, too. Also a browser:page for=someclass menu=... / will break on

[Zope3-dev] Re: Add function for schema validation in zope.schema

2007-08-20 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Fred Drake wrote: On 8/20/07, Christian Zagrodnick [EMAIL PROTECTED] wrote: I think we should add a function to validate a given schema on a given class. This should include constraints and invariants: I do presume you mean object, rather than

[Zope3-dev] Re: Add function for schema validation in zope.schema

2007-08-20 Thread Philipp von Weitershausen
Christian Theune wrote: Hi, Am Montag, den 20.08.2007, 08:59 -0400 schrieb Fred Drake: On 8/20/07, Christian Zagrodnick [EMAIL PROTECTED] wrote: I think we should add a function to validate a given schema on a given class. This should include constraints and invariants: I do presume you mean

[Zope3-dev] Re: Add function for schema validation in zope.schema

2007-08-20 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Wichert Akkerman wrote: Previously Christian Theune wrote: Hi, Am Montag, den 20.08.2007, 08:59 -0400 schrieb Fred Drake: On 8/20/07, Christian Zagrodnick [EMAIL PROTECTED] wrote: I think we should add a function to validate a given schema on a

[Zope3-dev] Re: Add function for schema validation in zope.schema

2007-08-20 Thread Christian Theune
Am Montag, den 20.08.2007, 16:05 +0200 schrieb Philipp von Weitershausen: This is exactly what I would suggest: The function should return a list of validation errors. Similar semantics are used in zope.formlib's validate() method. I agree with Wichert's objection about being a bit

Re: [Zope3-dev] Re: Add function for schema validation in zope.schema

2007-08-20 Thread Philipp von Weitershausen
On 20 Aug 2007, at 16:12 , Benji York wrote: Philipp von Weitershausen wrote: This is exactly what I would suggest: The function should return a list of validation errors. Similar semantics are used in zope.formlib's validate() method. I agree with Wichert's objection about being a bit

Re: [Zope3-dev] Add function for schema validation in zope.schema

2007-08-20 Thread Jim Fulton
On Aug 20, 2007, at 7:48 AM, Christian Zagrodnick wrote: Hi, zope.schema defines how a schema can be validated, defines errors and provides a way to validate single fields. I think we should add a function to validate a given schema on a given class. This should include constraints and

Re: [Zope3-dev] browser:page's for= can be class browser:menuItem can't

2007-08-20 Thread Jim Fulton
On Aug 20, 2007, at 9:45 AM, Christian Zagrodnick wrote: Hoi I just figured, that the browser:menuItem cannot be registered for classes. But you can with browser:page. I think if a browser:page can be registered for a class a menuItem should support this, too. Also a browser:page

[Zope3-dev] Re: AW: Re: AW: relying on win32api in windows supportofzc.zope3recipes

2007-08-20 Thread Martijn Faassen
Adam Groszer wrote: Monday, August 20, 2007, 3:05:45 PM, Stephan Richter wrote: Windows is pretty different in this respect. You really want to use an installer, which means you get a wizard. People in Windows expect this behavior and want it. It is quiet ignorant to ask them to use eggs

[Zope3-dev] Re: AW: Re: AW: relying on win32api in windows supportofzc.zope3recipes

2007-08-20 Thread Martijn Faassen
Stephan Richter wrote: On Friday 17 August 2007 17:32, Gary Poster wrote: However, it's worth noting to clarify this discussion that buildout is being successfully used to install a wide variety of software on *nix systems (I know of Red Hat, Ubuntu, and OS X). This includes software that

Re: [Zope3-dev] Re: AW: Re: AW: relying on win32api in windows supportofzc.zope3recipes

2007-08-20 Thread Benji York
Martijn Faassen wrote: It would be nice if one could install Zope 3-based *applications* using a Windows installer. But to ask developers to install all the *library* dependencies separately using click-through wizards is rather strange. As a recovering Windows developer, I agree. -- Benji

[Zope3-dev] Re: ZODB versions / and windows eggs

2007-08-20 Thread Martijn Faassen
Hey, Thanks for noticing. I think we need to adopt a routine of building Windows eggs whenever we make a new release of a package that has C extensions. There aren't that many packages like that (about a dozen) and they hopefully aren't going to have that many releases in the future. I've

[Zope3-dev] Re: AW: Re: AW: relying on win32api in windows supportofzc.zope3recipes

2007-08-20 Thread Martijn Faassen
Benji York wrote: Martijn Faassen wrote: It would be nice if one could install Zope 3-based *applications* using a Windows installer. But to ask developers to install all the *library* dependencies separately using click-through wizards is rather strange. As a recovering Windows developer,

[Zope3-dev] Heads up: major change in zc.buildout policy for selecting distributions

2007-08-20 Thread Jim Fulton
I'm about to make a new release of zc.buildout that uses a different policy for selecting distributions. In particular, by default, zc.buildout will now prefer final distributions over non-final ones. If there are final and non-final distributions that satisfy a requirement, buildout

Re: [Zope3-dev] Heads up: major change in zc.buildout policy for selecting distributions

2007-08-20 Thread Benji York
Jim Fulton wrote: I'm about to make a new release of zc.buildout that uses a different policy for selecting distributions. In particular, by default, zc.buildout will now prefer final distributions over non-final ones. Yay! -- Benji York Senior Software Engineer Zope Corporation

[Zope3-dev] Re: ZODB versions / and windows eggs

2007-08-20 Thread Martijn Faassen
Hey, On 8/20/07, Philipp von Weitershausen [EMAIL PROTECTED] wrote: On 20 Aug 2007, at 18:48 , Martijn Faassen wrote: [snip] How solid are MinGW eggs? So far nobody can tell me, except that Andreas Jung, Hanno Schlichting and a couple of other guys seem to be able to use MinGW well. That

[Zope3-dev] Re: Heads up: major change in zc.buildout policy for selecting distributions

2007-08-20 Thread Martin Aspeli
Jim Fulton wrote: I'm about to make a new release of zc.buildout that uses a different policy for selecting distributions. In particular, by default, zc.buildout will now prefer final distributions over non-final ones. If there are final and non-final distributions that satisfy a

Re: [Zope3-dev] Re: Heads up: major change in zc.buildout policy for selecting distributions

2007-08-20 Thread Jim Fulton
On Aug 20, 2007, at 2:02 PM, Martin Aspeli wrote: Jim Fulton wrote: I'm about to make a new release of zc.buildout that uses a different policy for selecting distributions. In particular, by default, zc.buildout will now prefer final distributions over non- final ones. If there are

Re: [Zope3-dev] Re: Heads up: major change in zc.buildout policy for selecting distributions

2007-08-20 Thread Jim Fulton
On Aug 20, 2007, at 2:18 PM, Jim Fulton wrote: On Aug 20, 2007, at 2:02 PM, Martin Aspeli wrote: Jim Fulton wrote: I'm about to make a new release of zc.buildout that uses a different policy for selecting distributions. In particular, by default, zc.buildout will now prefer final

Re: [Zope3-dev] Re: Heads up: major change in zc.buildout policy for selecting distributions

2007-08-20 Thread Christian Theune
Am Montag, den 20.08.2007, 14:27 -0400 schrieb Jim Fulton: No, I'm wrong, I'm going to back these changes out with a b30 release and then release them with a 2x release. Will the 2x release be picked up automatically because the stable policy isn't in 1x and it tries to update itself? Oh

[Zope3-dev] Re: Heads up: major change in zc.buildout policy for selecting distributions

2007-08-20 Thread Jim Fulton
On Aug 20, 2007, at 1:18 PM, Jim Fulton wrote: I'm about to make a new release of zc.buildout that uses a different policy for selecting distributions. In particular, by default, zc.buildout will now prefer final distributions over non- final ones. If there are final and non-final

Re: [Zope3-dev] browser:page's for= can be class browser:menuItem can't

2007-08-20 Thread Stephan Richter
On Monday 20 August 2007 09:45, Christian Zagrodnick wrote: Should we fix that? Yes, or just deprecate the menu stuff. ;-) The default menu framework was insufficient in every real-world project I have worked on. Menu items based on the context just do not work. Regards, Stephan -- Stephan

Re: [Zope3-dev] browser:page's for= can be class browser:menuItem can't

2007-08-20 Thread Stephan Richter
On Monday 20 August 2007 20:02, Jim Fulton wrote: On Aug 20, 2007, at 7:57 PM, Stephan Richter wrote: On Monday 20 August 2007 09:45, Christian Zagrodnick wrote: Should we fix that? Yes, or just deprecate the menu stuff. ;-) The default menu   framework was insufficient in every

Re: [Zope3-dev] Re: Add function for schema validation in zope.schema

2007-08-20 Thread Fred Drake
On 8/20/07, Benji York [EMAIL PROTECTED] wrote: I like getValidationErrors. It's use would probably normally look something like this: ... Both look good to me. Ok, agreed, for reasons people have already given. -Fred -- Fred L. Drake, Jr.fdrake at gmail.com Chaos is the score upon