[MERGE] Register netloc protocols at 'register_transport_proto' time
John Arbash Meinel
john at arbash-meinel.com
Mon Oct 22 20:12:18 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Vincent Ladeuil wrote:
...
>
> >>
> john> I went ahead and defaulted the parameter to False,
> john> because there were more protocols that should not be
> john> registered. (All of the decorators, and memory, etc.)
> >>
> >> Can you elaborate on why you did that ?
> >> register_urlparse_netloc_protocol ensures that the urls will be
> >> parsed correctly (most of the time :-/). I'm afraid we are still
> >> exposed to the underlying problem then.
>
> john> Well, it doesn't make much sense to register
> john> "readonly+" or "log+" or "trace+". And 'memory:///' or
> john> 'file:///' doesn't take a host, but probably would
> john> still be netloc safe.
>
> john> 'lp:' is the only really weird one, since we don't
> john> require the '///' (though we will accept it if they do,
> john> and we don't accept 'lp:/' or 'lp://' at the moment.)
>
> I understand, but this applies to the "bug" we just identified
> (optimistically), what if another one occurs ?
>
> I think you pin-point rightly that it's unsafe to delay the
> registration (until the module is loaded and moreover as a
> side-effect).
>
> Andrew was surprised to *have* to do that for bzr protocols.
>
> Overall, it seems weird to even *have* to think about that.
>
> So, making the registration mandatory, automatic even, seems safer.
>
Does anyone else have a comment on this? It seems that Vila and I agree on
merging this as is, and then copying in a custom implementation of urlparse.
I'd like to get a bit of consensus before this is merged.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHHPYRJdeBCYSNAAMRAuQGAJ0Qxo11mpCWoPZkEYIhTCxuySV/gQCfQhbh
B11gRRCVsifll7XbuoFwNxg=
=ZsNQ
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list