[PATCH 0 of 3] hgkeyring extension

Augie Fackler raf at durin42.com
Sat Aug 25 14:18:31 CDT 2012


On Aug 24, 2012, at 6:42 AM, Mads Kiilerich wrote:

>> The extension uses now new hooks in the http modules. The hooks can also be used by similar extensions like factotum which still use monkeypatching.
> 
> Messing with internals in other modules is still monkeypatching. Introducing pwmgrclass seems to add complexity without any real benefit.
> 
> 
> But the Python http authentication API is really not suitable for Mercurial's needs. The implementations of the API in the supported Python versions is also problematic because of the changes done over time - they make it hard to extend in a maintainable way. Adding "setrequest" to the API helps a bit - something like that could also be used for the retry counter.
> 
> It seems like a big part of keyring extension is a reimplementation of generic password handling, replacing the standard python implementation. It could perhaps make sense to implement our own password handler in core Mercurial and stop using the one from Python. That could perhaps make the keyring extension simpler and more obviously correct ... and make it possible to fix other http authentication issues.
> 
> Changes in this area could perhaps be coordinated a full switch to using Augie's httpclient ... but it seems like he prefer to stay compatible with the Python API's.

The more I've thought about it, the more it feels (to me) that we should be tilting at the windmill of ripping out some/all of our use of urllib2 so that we can control the way authentication information is handled. That might be the easiest route for this too, and doesn't need to depend on my http work (I've not started it as I'm trying to do one windmill at a time).

> 
> On a related note: It would probably be relevant to (re)test the extension with 2.4, 2.5, 2.5.latest, 2.6, 2.6.1, 2.6.2, 2.6.latest and 2.7.latest before 'upgrading' the extension to 'official'.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20120825/1b42f694/attachment.html>


More information about the Mercurial-devel mailing list