[Zope3-Users] Re: zc.buildout and unreleased eggs in svn
Jim Fulton wrote: easy_install lets me specify an egg from svn, e.g.: $ easy_install http://svn.plone.org/svn/collective/ZopeSkel/trunk#egg=ZopeSkel-dev Hm, interesting. I thought I had seen something like that, but I've never been able to find documentation for it. Do you know where this is documented? http://peak.telecommunity.com/DevCenter/setuptools#dependencies-that-aren-t-in-pypi Does this example actually work? No, it doesn't. The format is #egg=EGG-VERSION. We use it currently on the CheeseShop page for grok and grokproject. You can easy_install these two even though there's no release. Setuptools will simply get them from SVN from the URLs that have the #egg=... thing. http://cheeseshop.python.org/pypi/grok http://cheeseshop.python.org/pypi/grokproject I have a zc.buildout recipie that specifies a number of eggs that should always be fetched from svn. I wonder what that should mean. I suppose he wants zc.buildout to take over for what we are currently using svn:externals. These are not (yet) in the cheeseshop. Is there some way of specifying such eggs, e.g. [buildout] parts = ... eggs = http://svn.plone.org/svn/collective/ZopeSkel/trunk#egg=ZopeSkel-dev Of course, that doesn't work :) I suppose this is somewhat similar to develop-eggs, but (as far as I know) these have to be in the src/ directory, and can't be fetched from svn and kept up to date automatically. We currently do this with svn externals to fetch them into src/ but I'd like to be able to distribute a standalone buildout.cfg that could get these eggs. I agree that something like this would be useful. I would like to see the semantics spelled out. For example, I agree that this should lead to a develop egg. What version should it have? Should that be determined by the remote setup.py file? Is the project you point to required to have a setup.py file? If so, then why specify a project name after the #. You guys are confusing the dev version with the concept of a development egg. Installing the dev version of an egg will not necessarily lead to a development egg. It just simply means it'll get the latest development version, presumably from svn, and install that. As far as I understand, a development egg can only be created using python setup.py develop, meaning, you should get the source code yourself. -- http://worldcookery.com -- Professional Zope documentation and training Next Zope 3 training at Camp5: http://trizpug.org/boot-camp/camp5 ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Pluggable authentication, a newbie's question
I'll try. Your authenticator is registered as a Plugin in a PAU in your current site? I'm not sure the cause without more details, but when I see this happen I've usually neglected one of the following: 1. The credentials plugin is not selected and added. 2. The authenticator plugin is not selected and added. 3. No permissions have been granted to the user, so even though the user is valid, they don't have permissions to do anything and so another authentication is being called as a backup. This is easy enough to debug by putting print statements at strategic points in your plugin and see if and when they show up in the Zope log. The PAU stuff has changed a lot over the history of Zope 3, so I've also found it to happen when using outdated methods such as the ones in Phillips first edition (which have since been updated to reflect the latest methods - thanks Phillip). -- David On Jan 28, 2007, at 5:44 PM, Alexei Ustyuzhaninov wrote: Hello, I try to create a plugin, which could authenticate users against an external database. Here is the code: from zope.component import provideUtility from zope.app.authentication import PluggableAuthentication from zope.app.authentication.interfaces import\ ICredentialsPlugin, IAuthenticatorPlugin from zope.app.authentication.session import SessionCredentialsPlugin from zope.app.security.interfaces import IAuthentication from mypackage.Authentication import MyAuthenticatorPlugin provideUtility(SessionCredentialsPlugin(), ICredentialsPlugin,\ 'My Credentials Plugin') provideUtility(MyAuthenticatorPlugin(), IAuthenticatorPlugin, 'My Authenticator Plugin') pau=PluggableAuthentication('my_') pau.credentialsPlugins=('Cascade Credentials Plugin', ) pau.authenticatorPlugins=('Cascade Authenticator Plugin', ) provideUtility(pau, IAuthentication, 'My Pluggable-Authentication Utility' This code is contained in the file mypackage/__init__.py, mypackage in turn is loaded via ZCML. Both plugins and PAU are registered successfully and I can access them with queryUtility. But the authentication is carried through the standard mechanism and MyAuthenticatorPlugin isn't even called. Could any good soul help me with this case? -- Thanks, Alexei ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Pluggable authentication, a newbie's question
Hi, David! Thank you for the help. David Johnson пишет: I'll try. Your authenticator is registered as a Plugin in a PAU in your current site? I'm not sure the cause without more details, but when I see this happen I've usually neglected one of the following: What do you mean by Your authenticator is registered as a Plugin in a PAU in your current site? I registered the authenticator as a utility and assigned the utility name to the authenticatorPlugins attribute of the PAU. Is it enough? 1. The credentials plugin is not selected and added. 2. The authenticator plugin is not selected and added. I think the plugins were selected and added as well as the PAU. I could access them with the queryUtility method later. 3. No permissions have been granted to the user, so even though the user is valid, they don't have permissions to do anything and so another authentication is being called as a backup. This is easy enough to debug by putting print statements at strategic points in your plugin and see if and when they show up in the Zope log. Yes, I do debugging the same way. And the print statement at the first line of the authenticator printed nothing. So I think the authenticator wasn't called at all. The PAU stuff has changed a lot over the history of Zope 3, so I've also found it to happen when using outdated methods such as the ones in Phillips first edition (which have since been updated to reflect the latest methods - thanks Phillip). -- David On Jan 28, 2007, at 5:44 PM, Alexei Ustyuzhaninov wrote: Hello, I try to create a plugin, which could authenticate users against an external database. Here is the code: from zope.component import provideUtility from zope.app.authentication import PluggableAuthentication from zope.app.authentication.interfaces import\ ICredentialsPlugin, IAuthenticatorPlugin from zope.app.authentication.session import SessionCredentialsPlugin from zope.app.security.interfaces import IAuthentication from mypackage.Authentication import MyAuthenticatorPlugin provideUtility(SessionCredentialsPlugin(), ICredentialsPlugin,\ 'My Credentials Plugin') provideUtility(MyAuthenticatorPlugin(), IAuthenticatorPlugin, 'My Authenticator Plugin') pau=PluggableAuthentication('my_') pau.credentialsPlugins=('Cascade Credentials Plugin', ) pau.authenticatorPlugins=('Cascade Authenticator Plugin', ) provideUtility(pau, IAuthentication, 'My Pluggable-Authentication Utility' This code is contained in the file mypackage/__init__.py, mypackage in turn is loaded via ZCML. Both plugins and PAU are registered successfully and I can access them with queryUtility. But the authentication is carried through the standard mechanism and MyAuthenticatorPlugin isn't even called. Could any good soul help me with this case? --Thanks, Alexei ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] zc.buildout and unreleased eggs in svn
Philipp von Weitershausen wrote: Does this example actually work? No, it doesn't. The format is #egg=EGG-VERSION. We use it currently on the CheeseShop page for grok and grokproject. You can easy_install these two even though there's no release. Setuptools will simply get them from SVN from the URLs that have the #egg=... thing. http://cheeseshop.python.org/pypi/grok http://cheeseshop.python.org/pypi/grokproject Sio are you doing this in grok's buildout? What does the syntax actually look like? Martin -- View this message in context: http://www.nabble.com/zc.buildout-and-unreleased-eggs-in-svn-tf3130333.html#a8688282 Sent from the Zope3 - users mailing list archive at Nabble.com. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Re: Simple buildout tutorial
Alec Munro wrote: Hi list, I haven't really been keeping up with eggs or buildout, and I find myself needing to install an egg in my Zope instance. Does buildout facilitate this? If so, can someone point me at a tutorial/howto? I think a more in-depth tutorial is still missing (I may write one, philipp said he may as well), but there's the pypi page (http://cheeseshop.python.org/pypi/zc.buildout) and internal documentation. I found it quite useful to observe an existing buildout. For the Zope2/Plone buildout we have been working on, I wrote a README that may be instructive, see http://svn.plone.org/svn/plone/ploneout/trunk. Martin ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Pluggable authentication, a newbie's question
On Jan 29, 2007, at 5:30 PM, Alexei Ustyuzhaninov wrote: David Johnson пишет: What do you mean by Your authenticator is registered as a Plugin in a PAU in your current site? I registered the authenticator as a utility and assigned the utility name to the authenticatorPlugins attribute of the PAU. Is it enough? I'm not sure I follow you here. Normally when you create a custom authenticator you first go into Manage Site add a Pluggable Auth Utility (PAU). Then from within the PAU there are plugins. You can add your custom plugin here. Then you select a credentials plugin and your authenticator plugin. I'm not an expert by any means on PAU, but it seems this is the preferred approach. The authenticators I've written implemented the following: implements (AuthenticatorPlugin,IQueriableAuthenticator,IQuerySchemaSearch) Aha, seems that I see where is my problem. I didn't manage site through ZMI. Is it possible to do this manipulation programmatically? That I don't know. Probably. Why you would want to is another question. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Wierd Error
I am receiving this error and I am not sure why. return self._dump(meta, obj.__getstate__()) File /Users/djohnson/sandbox/Zope-3.3.0/build/lib.macosx-10.3- fat-2.4/ZODB/serialize.py, line 416, in _dump self._p.dump(state) File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/copy_reg.py, line 70, in _reduce_ex state = base(self) TypeError: connect() argument 1 must be string, not Connection Anyone have ideas? -- David ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users