Issue92

Title plugin vars collide with 'name' or 'iface' from WhoConfig._makePlugin prototype
Priority bug Status resolved
Superseder Nosy List vaab
Assigned To Topics repoze.who

Created on 2009-07-31.03:24:21 by vaab, last changed 2009-08-04.06:38:35 by chrism.

Files
File name Uploaded Type Edit Remove
argument-collision.patch vaab, 2009-07-31.03:24:20 text/x-diff
Messages
msg247 (view) Author: chrism Date: 2009-08-04.06:38:34
I committed a patch which fixes this.  It will be in 1.10.16.  Thanks for the
report!
msg246 (view) Author: vaab Date: 2009-07-31.03:24:20
Plugins with variable 'name' of 'iface' as this sample:

[plugin:foo]
name = bar
use = repoze.who.tests.test_config:DummyPlugin


... will trigger a 

TypeError: _makePlugin() got multiple values for keyword argument 'name'

... at line 78 in config.py, which is:

 obj = self._makePlugin(name, IPlugin, **options)

'options' contains the dict associating the variable name to it parsed value, so
when containing a 'name' or 'iface' keyword it collides with the _makePlugin
prototype which is:

def _makePlugin(self, name, iface, **kw):

This is a nasty bug since sql authenticator needs a 'name' option !

So I provided a simple fixe along with it's test. I hope I missed nothing.
History
Date User Action Args
2009-08-04 06:38:35 chrism set status: unread -> resolved
messages: + msg247
2009-07-31 10:07:25 vaab set topic: + repoze.who
2009-07-31 03:24:21 vaab create