Re: [Zope-dev] Proposal: refactoring of zope.app.security

2009-03-11 Thread Dan Korostelev
2009/3/11 Roger Ineichen d...@projekt01.ch: Betreff: [Zope-dev] Proposal: refactoring of zope.app.security - Move IAuthentication and other interfaces into new zope.authentication package. Also move there PrincipalSource and the checkPrincipal utility function. Also move there the

[Zope-dev] Namespace declaration using pkgutil vs pkg_resources

2009-03-11 Thread Baiju M
Hi All, Now we have 'setuptools' as a dependency for all packages. (I guess this is to make Buildout happy ?) So, it is certain that 'pkg_resources' module will be always available as it is bundled with 'setuptools'. If that is the case, why do we need a fall-back import of 'pkgutil' to

[Zope-dev] z3c.form: object.createObject should raise TypeError

2009-03-11 Thread Christian Theune
Hi, the data converter for objects raises a ValueError if it can't find a factory. This is caught by the validation machinery around it and displayed to the user with 'There were errors'. This isn't helpful as the user isn't told whats going on and he won't be able to do anything about it. The

Re: [Zope-dev] Namespace declaration using pkgutil vs pkg_resources

2009-03-11 Thread Jim Fulton
On Mar 11, 2009, at 8:24 AM, Baiju M wrote: Hi All, Now we have 'setuptools' as a dependency for all packages. (I guess this is to make Buildout happy ?) No, it is because setuptools is needed for namespace packages. So, it is certain that 'pkg_resources' module will be always

Re: [Zope-dev] Proposal: refactoring of zope.app.security

2009-03-11 Thread Dan Korostelev
2009/3/11 Dan Korostelev nad...@gmail.com: Hi people! One of most large packages that really wants to be refactored but still wasn't touched is zope.app.security. It has much in it and it brings many dependencies, including zope.app.form and company. And even some zope.* packages, like

Re: [Zope-dev] zope.password

2009-03-11 Thread Martijn Faassen
Hanno Schlichting wrote: Dan Korostelev wrote: This was done to avoid dependency on zope.schema. However, I also find it very useful to have that vocabulary in zope.password. I think we can add it to the vocabulary submodule without adding dependency on zope.schema at egg level, because one

Re: [Zope-dev] zope.password

2009-03-11 Thread Martijn Faassen
Hey, If it's more convenient to have the vocabulary available in zope.password, by all means add it there. Regards, Martijn ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML

Re: [Zope-dev] zope.password

2009-03-11 Thread Martijn Faassen
Hi there, Okay, having read the whole thread, there seem to be two forces pulling on zope.password: * it'd be nice if zope.password had the vocabulary so that you didn't have to include zope.app.authentication anymore just to get it. * it'd be nice if zope.password didn't need any extra

Re: [Zope-dev] Namespace declaration using pkgutil vs pkg_resources

2009-03-11 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jim Fulton wrote: On Mar 11, 2009, at 8:24 AM, Baiju M wrote: Hi All, Now we have 'setuptools' as a dependency for all packages. (I guess this is to make Buildout happy ?) No, it is because setuptools is needed for namespace packages.

Re: [Zope-dev] Proposal: refactoring of zope.app.security

2009-03-11 Thread Martijn Faassen
Hey, Dan Korostelev wrote: One of most large packages that really wants to be refactored but still wasn't touched is zope.app.security. In fact we did touch it a bit, moving some bits from it into zope.security. And your zope.password work affected its dependencies of course. But I know

Re: [Zope-dev] Proposal: refactoring of zope.app.security

2009-03-11 Thread Martijn Faassen
Dan Korostelev wrote: 2009/3/11 Roger Ineichen d...@projekt01.ch: Betreff: [Zope-dev] Proposal: refactoring of zope.app.security - Move IAuthentication and other interfaces into new zope.authentication package. Also move there PrincipalSource and the checkPrincipal utility function. Also

Re: [Zope-dev] Proposal: refactoring of zope.app.security

2009-03-11 Thread Martijn Faassen
Hey, Dan Korostelev wrote: If there's no more opinions/objections/suggestions, I'd start refactoring. See my replies just now. I'm in favor of starting the refactoring work, as long as you do it step by step. Regards, Martijn ___ Zope-Dev maillist

Re: [Zope-dev] z3c.form: object.createObject should raise TypeError

2009-03-11 Thread Stephan Richter
On Wednesday 11 March 2009, Christian Theune wrote: Objections for changing this? No. As long as all the tests pass, everything is game for z3c.form 2.0. :-) Regards, Stephan -- Stephan Richter Web Software Design, Development and Training Google me. Zope Stephan Richter

Re: [Zope-dev] zope.password

2009-03-11 Thread Stephan Richter
On Wednesday 11 March 2009, Martijn Faassen wrote: I think the latter is the least important right now, especially since zope.component and zope.schema are already very foundational libraries. So just add the vocabulary to zope.password if that is the only new dependencies it will pull in as a

[Zope-dev] z3c.form: nested group

2009-03-11 Thread Laurent Mignon
Hi, 2 weeks ago, I've implemented a support for nested group into the branch svn://svn.zope.org/repos/main/z3c.form/branches/sagblmi-nestedgroup All test pass and no compatibility issue. Can I merge it to the trunk? Regards Laurent Mignon ___

Re: [Zope-dev] z3c.form: nested group

2009-03-11 Thread Dan Korostelev
2009/3/11 Laurent Mignon laurent.mig...@softwareag.com: Hi, 2 weeks ago, I've implemented a support for nested group into the branch svn://svn.zope.org/repos/main/z3c.form/branches/sagblmi-nestedgroup All test pass and no compatibility issue. Can I merge it to the trunk? I think yes, if

Re: [Zope-dev] Proposal: refactoring of zope.app.security

2009-03-11 Thread Martijn Faassen
Dan Korostelev wrote: 2009/3/11 Martijn Faassen faas...@startifact.com: [snip] You would expect from the naming that bits of zope.app.authentication would end up in zope.authentication as well. Yep, that can be expected from the naming, but really, zope.app.authentication is just one of

Re: [Zope-dev] Proposal: refactoring of zope.app.security

2009-03-11 Thread Martijn Faassen
Dan Korostelev wrote: 2009/3/11 Martijn Faassen faas...@startifact.com: [snip] - Move global principal registry, its IPrincipal/IGroup implementations and its directives into new zope.principalregistry package. Why not name it zope.principal? It sounds confusing to me. Also, the global

Re: [Zope-dev] zope.password

2009-03-11 Thread Martijn Faassen
Dan Korostelev wrote: [snip] Well, as I said before, I wanted to use zope.password in my old Pylons application that only uses zope.interface currently. I don't expect it to be developed in more zope-ish way (though I don't expect it to be developed much in near future :)), so I'd like to

Re: [Zope-dev] zope.password

2009-03-11 Thread Martijn Faassen
Hi there, Stephan Richter wrote: [snip] In my opinion going for an extra here just to avoid this is speculating a bit too much right now. Do we really have users that want to use zope.password and really don't want zope.component and zope.schema? If so, we'll hear from them when they speak up

Re: [Zope-dev] z3c.form: nested group

2009-03-11 Thread Martin Aspeli
Laurent Mignon wrote: Hi, 2 weeks ago, I've implemented a support for nested group into the branch svn://svn.zope.org/repos/main/z3c.form/branches/sagblmi-nestedgroup All test pass and no compatibility issue. Can I merge it to the trunk? What's the use case for this? Martin --

[Zope-dev] zope.localpermission and the zope app permissions

2009-03-11 Thread Dan Korostelev
Hi people! As a part of zope.app.security refactoring process, I extracted local (persistent) permissions to new zope.localpermission. And I faced one problem and I'm not sure about its resolution. Originally, I wanted to only move the zope.Public permission declaration into zope.security,

Re: [Zope-dev] Namespace declaration using pkgutil vs pkg_resources

2009-03-11 Thread Zvezdan Petkovic
On Mar 11, 2009, at 10:29 AM, Martijn Faassen wrote: Since Jim says you're not missing something, I'm going to add to the Zope Framework Steering Group decisions that this is enough and we could clean up __init__.py's to this if we would want to. So, let me try to understand the decision

Re: [Zope-dev] zope.localpermission and the zope app permissions

2009-03-11 Thread Martijn Faassen
Hey, Dan Korostelev wrote: As a part of zope.app.security refactoring process, I extracted local (persistent) permissions to new zope.localpermission. And I faced one problem and I'm not sure about its resolution. Originally, I wanted to only move the zope.Public permission declaration

Re: [Zope-dev] Namespace declaration using pkgutil vs pkg_resources

2009-03-11 Thread Baiju M
On Wed, Mar 11, 2009 at 10:56 PM, Zvezdan Petkovic zvez...@zope.com wrote: On Mar 11, 2009, at 10:29 AM, Martijn Faassen wrote: Since Jim says you're not missing something, I'm going to add to the Zope Framework Steering Group decisions that this is enough and we could clean up __init__.py's

Re: [Zope-dev] Proposal: refactoring of zope.app.security

2009-03-11 Thread Dan Korostelev
2009/3/11 Martijn Faassen faas...@startifact.com: You should write up a short description of what zope.principalregistry does. In fact whenever we propose a new package we should describe its mission statement in just a couple of lines. That'll help us think about it better. I'll add a short

Re: [Zope-dev] Namespace declaration using pkgutil vs pkg_resources

2009-03-11 Thread Martijn Faassen
Hey, Zvezdan Petkovic wrote: On Mar 11, 2009, at 10:29 AM, Martijn Faassen wrote: Since Jim says you're not missing something, I'm going to add to the Zope Framework Steering Group decisions that this is enough and we could clean up __init__.py's to this if we would want to. So, let me

Re: [Zope-dev] zope.localpermission and the zope app permissions

2009-03-11 Thread Dan Korostelev
2009/3/11 Martijn Faassen faas...@startifact.com: Dan Korostelev wrote: Originally, I wanted to only move the zope.Public permission declaration into zope.security, because that permission name is special and always available. As for other permissions

Re: [Zope-dev] Namespace declaration using pkgutil vs pkg_resources

2009-03-11 Thread Benji York
On Wed, Mar 11, 2009 at 3:22 PM, Shane Hathaway sh...@hathawaymix.org wrote: Nit: In this case, two lines are better than one.   import pkg_resources   pkg_resources.declare_namespace(__name__) There's no need to use the lesser known __import__ function when an ordinary import statement

[Zope-dev] Dependencies for ZCML

2009-03-11 Thread 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

Re: [Zope-dev] zope.password

2009-03-11 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Martijn Faassen wrote: Hi there, Stephan Richter wrote: [snip] In my opinion going for an extra here just to avoid this is speculating a bit too much right now. Do we really have users that want to use zope.password and really don't want

Re: [Zope-dev] Proposal: refactoring of zope.app.security

2009-03-11 Thread Benji York
On Wed, Mar 11, 2009 at 1:52 PM, Dan Korostelev nad...@gmail.com wrote: 2009/3/11 Martijn Faassen faas...@startifact.com: You should write up a short description of what zope.principalregistry does. In fact whenever we propose a new package we should describe its mission statement in just a

Re: [Zope-dev] Proposal: refactoring of zope.app.security

2009-03-11 Thread Dan Korostelev
2009/3/12 Benji York be...@zope.com: On Wed, Mar 11, 2009 at 1:52 PM, Dan Korostelev nad...@gmail.com wrote: 2009/3/11 Martijn Faassen faas...@startifact.com: You should write up a short description of what zope.principalregistry does. In fact whenever we propose a new package we should

[Zope-dev] Proposal: move zope.site.next functions to zope.component.

2009-03-11 Thread Dan Korostelev
Hey, people! While working on splitting authentication interfaces and PrincipalSource from zope.app.security to new zope.authentication package, I discovered that PrincipalSource uses some functions from zope.site, which is unacceptable dependency. Those functions are getNextUtility and

Re: [Zope-dev] Proposal: refactoring of zope.app.security

2009-03-11 Thread Martijn Faassen
Benji York wrote: On Wed, Mar 11, 2009 at 1:52 PM, Dan Korostelev nad...@gmail.com wrote: 2009/3/11 Martijn Faassen faas...@startifact.com: You should write up a short description of what zope.principalregistry does. In fact whenever we propose a new package we should describe its mission

Re: [Zope-dev] Proposal: refactoring of zope.app.security

2009-03-11 Thread Martijn Faassen
Hey, Dan Korostelev wrote: The zope.principalregistry is an non-persistent implementation of IAuthentication that allows us to define principals via zcml (the principal directive and company) or with simple python calls. It's also quite useful for tests. It defines the registry and the ZCML

Re: [Zope-dev] zope.localpermission and the zope app permissions

2009-03-11 Thread Martijn Faassen
Dan Korostelev wrote: 2009/3/11 Martijn Faassen faas...@startifact.com: [snip] If it doesn't introduce new dependencies, I think a few more definitions of permissions in zope.security won't hurt (only those commonly used). I'd like that better than introducing a new package. Do you think this

[Zope-dev] Release of zope.component (was [Checkins] SVN: zope.component/trunk/ Merge the 'tseaver-wo_zope_deferredimport' branch)

2009-03-11 Thread Dan Korostelev
I decided to start a new branch of that, because there's no still response on my requests for a release. Here's the last message: Let's decide that and make a release of zope.component so we could move forward on adapting other packages to recent removal of BBB interfaces. Here's three

[Zope-dev] New package: zope.authentication AND the problem.

2009-03-11 Thread Dan Korostelev
Hey, community. As a part of zope.app.security refactoring process, a new package has been created - zope.authentication. It basically contains IAuthentication and other auth-related interfaces, as well as PrincipalSource. So it's intended to define a basic concepts and contracts of principal

Re: [Zope-dev] Dependencies for ZCML

2009-03-11 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Martijn Faassen wrote: Dan Korostelev wrote: 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

[Zope-dev] z3c.form: TextLineConverter and IFromUnicode

2009-03-11 Thread Martin Aspeli
Hi, Sorry for doing this by email rather than unit test, but I'm a bit over-stretched at the moment. plone.z3cform has a backport of z3c.form trunk's TextLines widget (when's that release coming, any ideas?). In using it, I discovered that the converter (converter.py on z3c.form trunk) does

[Zope-dev] Common permissions (final bits of zope.app.security refactoring)

2009-03-11 Thread Dan Korostelev
Hey, people! The refactoring of zope.app.security is now almost done. There's still some polishing work to do and two little issues to resolve. One of them is the zope's common permissions. Most of zope.* and zope.app.* (and other) packages define some security protections for their classes and

Re: [Zope-dev] z3c.form: TextLineConverter and IFromUnicode

2009-03-11 Thread Martin Aspeli
Martin Aspeli wrote: Hi, Sorry for doing this by email rather than unit test, but I'm a bit over-stretched at the moment. plone.z3cform has a backport of z3c.form trunk's TextLines widget (when's that release coming, any ideas?). In using it, I discovered that the converter

Re: [Zope-dev] Namespace declaration using pkgutil vs pkg_resources

2009-03-11 Thread Baiju M
On Thu, Mar 12, 2009 at 12:52 AM, Shane Hathaway sh...@hathawaymix.org wrote: Martijn Faassen wrote:    Since ``setuptools`` is a dependency of our packages anyway, we    can instead do the following::        __import__('pkg_resources').declare_namespace(__name__)    Feel free to use that

Re: [Zope-dev] z3c.form: TextLineConverter and IFromUnicode

2009-03-11 Thread Stephan Richter
On Wednesday 11 March 2009, Martin Aspeli wrote: It's confusing to users when the widget renders the value in seemingly random order. :) +1 on the first and second E-mail. Regards, Stephan -- Stephan Richter Web Software Design, Development and Training Google me. Zope Stephan Richter

Re: [Zope] Order of method calls of ZopePageTemplate

2009-03-11 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11.03.2009 6:22 Uhr, Analog Kid wrote: Hi All: I need to know the order of method calls inside ZopePageTemplate.py whenever a form from the PT is submitted or even when the PT is rendered. Can anyone shed some light on this please? This

Re: [Zope] Order of method calls of ZopePageTemplate

2009-03-11 Thread Analog Kid
sry about that ... what i mean is i need to know the order of methods when a page is rendered (on server) ... regards, AK On Wed, Mar 11, 2009 at 1:02 PM, Andreas Jung li...@zopyx.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11.03.2009 6:22 Uhr, Analog Kid wrote: Hi All:

Re: [Zope] Order of method calls of ZopePageTemplate

2009-03-11 Thread Andreas Jung
Where and why is this relevant? -aj On Wed, Mar 11, 2009 at 08:54, Analog Kid garlictrom...@gmail.com wrote: sry about that ... what i mean is i need to know the order of methods when a page is rendered (on server) ... regards, AK On Wed, Mar 11, 2009 at 1:02 PM, Andreas Jung

[Zope] session data object question

2009-03-11 Thread Dvir Bar-lev
Hi I was wondering if there is a way to connect the creation of a session object to a button push. I'll explain in more detail: I have a log in from called login_form, and I have a dtml method called looged_in that is called when we push the submit button in the log in form. What I did

Re: [Zope] session data object question

2009-03-11 Thread Andrew Milton
+---[ Dvir Bar-lev ]-- | Hi | | | | I was wondering if there is a way to connect the creation of a session object | to a button push. | | I?ll explain in more detail: | | | | I have a log in from called login_form, and I have a dtml method called | looged_in that

Re: [Zope] Order of method calls of ZopePageTemplate

2009-03-11 Thread Analog Kid
i want to make sure that a certain method gets called before anything else when the template gets rendered. so if i know about the order in which page template methods get called, i can patch one (the first in the order). thanks, AK On Wed, Mar 11, 2009 at 1:28 PM, Andreas Jung li...@zopyx.com

Re: [Zope] Order of method calls of ZopePageTemplate

2009-03-11 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 This approach is broken by design-by-design. If you want to depend on the execution order: move the related code into a Python script and call the script from within the template. - -aj On 11.03.2009 9:18 Uhr, Analog Kid wrote: i want to make sure

Re: [Zope] session data object question

2009-03-11 Thread Dvir Bar-lev
Hi I have a button like that but the the problem is that it also has this value if I refresh the page, what I mean Is this, I put in the logged_in page: dtml-if Request.has_key('theButton') Do something /dtml-if And it has the key even if I refresh the page. I also tried to put dtm-var

Re: [Zope] Order of method calls of ZopePageTemplate

2009-03-11 Thread Analog Kid
hi andreas: the reason i need to do it this way is that no page template must be modified ... so i cant call a py script from the template. regards, AK On Wed, Mar 11, 2009 at 1:56 PM, Andreas Jung li...@zopyx.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 This approach is broken

Re: [Zope] session data object question

2009-03-11 Thread Dvir Bar-lev
I also tried to change the value of theButton key like so: dtml-if REQUEST.has_key('submit') dtml-if REQUEST.get('submit') == 'Login' dtml-call REQUEST.set('submit', 'LoggedIn') /dtml-if /dtml-if But if refresh the button it still thinks it has the value Login

Re: [Zope] session data object question

2009-03-11 Thread Andrew Milton
+---[ Dvir Bar-lev ]-- | Hi | | I have a button like that but the the problem is that it also has this | value if I refresh the page, what I mean Is this, I put in the logged_in | page: That is highly unlikely, unless you are refreshing AFTER you submit the form, in which

Re: [Zope] session data object question

2009-03-11 Thread Dvir Bar-lev
Yep I refresh after, I'll try to work with cookies than, tx -Original Message- From: Andrew Milton [mailto:a...@theinternet.com.au] Sent: Wednesday, March 11, 2009 11:13 AM To: Dvir Bar-lev Cc: zope@zope.org Subject: Re: [Zope] session data object question +---[ Dvir Bar-lev

Re: [Zope] session data object question

2009-03-11 Thread Lennart Regebro
On Wed, Mar 11, 2009 at 09:32, Dvir Bar-lev dvi...@puresight.com wrote: What I need is a way to know if we loaded the page as a result of pressing the button or as a result of refreshing the page, as I need to do different things in each case. There is no difference between a refresh and a

Re: [Zope] session data object question

2009-03-11 Thread Andrew Milton
+---[ Lennart Regebro ]-- | On Wed, Mar 11, 2009 at 09:32, Dvir Bar-lev dvi...@puresight.com wrote: | What I need is a way to know if we loaded the page as a result of | pressing the button or as a result of refreshing the page, as I need to | do different things in each

[Zope] redirect timeout doesn't work

2009-03-11 Thread Dvir Bar-lev
Hi I want to redirect a user from my page to another page after a certain time, I put this code in the dtml page at the top I want to redirect from: dtml-call REQUEST.RESPONSE.setHeader('Refresh', '5', 'URL Address') But although it does refresh after the timeout it stays in the same

Re: [Zope] redirect timeout doesn't work

2009-03-11 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11.03.2009 13:59 Uhr, Dvir Bar-lev wrote: Hi I want to redirect a user from my page to another page after a certain time, I put this code in the dtml page at the top I want to redirect from: dtml-call

Re: [Zope] redirect timeout doesn't work

2009-03-11 Thread Dvir Bar-lev
Yep, you were right, the syntax I used was bad, but now I encountered a diffrent problem. If i set the header as you said and manually refresh the page than it wont redirect again. Anyone encountered this before? Can't find anything on the web about this problem -Original Message-

Re: [Zope] redirect timeout doesn't work

2009-03-11 Thread Dvir Bar-lev
Hi just wanted to add something that I forgot to meantion. The problem I described only happenes on IE, on firefox it does the redirect even after I refresh the page manually -Original Message- From: zope-boun...@zope.org [mailto:zope-boun...@zope.org] On Behalf Of Dvir Bar-lev Sent:

Re: [Zope] Order of method calls of ZopePageTemplate

2009-03-11 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Analog Kid wrote: hi andreas: the reason i need to do it this way is that no page template must be modified ... so i cant call a py script from the template. regards, AK On Wed, Mar 11, 2009 at 1:56 PM, Andreas Jung li...@zopyx.com wrote: