[rfc] [patch] pycurl transport
Martin Pool
mbp at sourcefrog.net
Fri Jan 13 10:00:17 GMT 2006
On 12 Jan 2006, Robert Collins <robertc at robertcollins.net> wrote:
> PEP8 - separate std lib, third party and internal imports, and put in
> alhpabetical order, and two lines of gap at the top level:
>
> ===
> from StringIO import StringIO
>
> import pycurl
>
> from bzrlib.errors import TransportError, NoSuchFile
> from bzrlib.trace import mutter
> from bzrlib.transport import Transport
> from bzrlib.transport.http import HttpTransportBase
Thanks.
> this looks good +1 with the above tweaks ...
>
> some small extra thoughts:
> perhaps it would be cleaner to do:
> mkdir bzrlib/transport/http
> bzr add bzrlib/transport/http
> bzr mv bzrlib/transport/http.py bzrlib/transport/http/__init__.py
>
> Then, have _pycurl.py and _urllib.py containing the respective pycurl
> and urllib implementations, with the common code in __init__.py
Done.
> As for which implementation is default, if we change the protocol
> handler to allow a *list* of handlers for a prefix, then we can just
> probe until one allows itself to be constructed, and if none do, then
> complain/provide the last error.
Not done yet but sounds like a good idea.
I was also contemplating a test that temporarily overrides the import
hook so that it can test a module does the right thing when a dependency
like pycurl is not present. It should work but arranging for the import
to take effect at the right time may be too complex.
--
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060113/a7af546a/attachment.pgp
More information about the bazaar
mailing list