Hi Daniel,

> > +  # ctx.config.config (ctx.config is opaque).
> 
> What do you mean by that?
> 
> % PYTHONPATH=$prefix/svn-t1/lib/svn-python/ \
>   python -c 'import svn, svn.core, svn.client; 
>              print svn.core.svn_config_get_config(None, None)["config"]'
> <libsvn.core.svn_config_t; proxy of <Swig Object of type 'svn_config_t *' at 
> 0xb734d998> >
I meant this:

matthijs@grubby:~/docs/src/upstream/subversion-trunk$  python -c 'import svn, 
svn.core, svn.client;print svn.core.svn_config_get_config(None, None)["config"]'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/pymodules/python2.7/libsvn/core.py", line 5494, in __getattr__
    value = _swig_getattr(self, self.__class__, name)
  File "/usr/lib/pymodules/python2.7/libsvn/core.py", line 51, in _swig_getattr
    raise AttributeError(name)
AttributeError: __getitem__

On trunk, your code seems to work (but there, ctx.config still seems to be 
None, though).

Would using svn.core.svn_config_get_config(None, None)["config"] here be the
recommended practice?

> > +++ subversion-trunk/subversion/bindings/swig/python/tests/client.py        
> > 2012-02-07 16:20:36.914353499 +0100
> > @@ -374,6 +374,11 @@
> >  
> >      self.assertEqual(readme_text, 'This is a test.\n')
> >  
> > +  def test_platform_providers(self):
> > +    providers = core.svn_auth_get_platform_specific_client_providers(None, 
> > None)
> > +    # Not much more we can test in this minimal environment.
> > +    self.assert_(isinstance(providers, list))
> > +
> 
> You could assert
> 
>     all(map(lambda x: isinstance(x, 'svn_auth_provider_object_t *'),
>             list))
> 
> like the Perl revision you refer to does. 
I couldn't figure out how to do that in the face of swig types. Your suggestion
doesn't work either:

TypeError: isinstance() arg 2 must be a class, type, or tuple of classes and 
types

> I've committed this patch.  (I had to rewrite the log message to conform
> to our style of mentioning every symbol[1].)  Please send followups as
> patches against the new HEAD.
Thanks! I thought I had a policy-compliant log message already, but it seems
you've been even more thorough. I'll keep that in mind for further patches.

Gr.

Matthijs

Attachment: signature.asc
Description: Digital signature

Reply via email to