[py-dev] Some ideas
holger krekel
holger at merlinux.de
Tue Feb 12 12:09:15 CET 2008
Hi Guido!
On Tue, Feb 12, 2008 at 10:19 +0100, Guido Wesdorp wrote:
> I thought a bit about the authentication feature for py.path.svn*, and
> wrote my ideas in a small doc. The doc is attached - please discuss if
> you're interested...
nice way of doing this, thanks!
> SVN authentication support
> ==========================
>
> This document describes authentication support to both py.path.svnwc and
> py.path.svnurl (yet to be implemented). This should allow using the library in
> a completely automated situation, without having to provide the credentials
> interactively.
>
> Current ideas for implementation
> --------------------------------
>
> The credentials are passed to the constructor of the path objects, and are used
> (transparently) for every action that accesses the server. Also, when provided,
> they are passed recursively to all child objects created by methods such as
> join(), ensure(), etc.
Transparently inheriting AUTH info might sometimes not be desired
or be tricky, not sure. I'd try this after all else is done (see below).
> * Many new arguments required
>
> I think it's not very nice to have so many new arguments to the constructors,
> and especially dislike having an argument that's only useful when other args
> are provided (auth_cache). Not sure how to improve that, though...
What about a py.path.SvnAuth class ...
* that groks all these options
* can create the proper commandline switches (and unit-testing
particularly this)
* then add an explicit 'svnauth' parameter to wc.checkout and wc.commit
(which other svnwc methods need it?)
* add an explicit 'svnauth' param to svnurl methods
* --
* add an explicit 'svnauth' param to the svnurl constructor
and experiment with inheriting it around
I think that an "SvnAuth" instance should also be
able to signal "just use defaults/whatever is stored on the FS".
Eventually we might want to generalize SvnAuth slightly
into some Identity or Auth class that can also be
used e.g. for py.execnet.SshGateway.
HTH,
holger
--
Holger Krekel - freelance manager and programmer
merlinux GmbH: http://merlinux.de
py.test: http://pytest.org
py lib: http://pylib.org
PyPy: http://codespeak.net/pypy
More information about the py-dev
mailing list