[rfc] [patch] pycurl transport

Martin Pool mbp at sourcefrog.net
Thu Jan 12 02:26:13 GMT 2006


On 11 Jan 2006, John Arbash Meinel <john at arbash-meinel.com> wrote:

> Decode used to be in the transport api. But hasn't been for a long time.
> The parameter isn't even used in HttpTransport, and should be removed.

OK I'll kill it.

> > I had avoided those names because of concern they would clash with the
> > possible C impl of pycurl, but I guess that will be imported from a
> > different module and so not really clash.
> > 
> 
> As long as you don't do 'import _pycurl' but do 'import
> bzrlib.transport.http._pycurl'.
> But honestly, if they are in the bzrlib.transport.http interface, why do
> we need the underscore?

The practical reason is that the last component of the module cannot be
'pycurl' or it won't be able to do 'import pycurl' itself.  So it can be
'_pycurl', 'pycurltransport', 'pycurlhttp', whatever.

> It also is pretty trivial to do the same thing that we do in the test suite.
> 
> if has_pycurl:
>   register_transport...

It would be a bit tidier to avoid checking for pycurl unless we actually
need it, as far as avoiding startup cost etc.

-- 
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/20060112/2db6375a/attachment.pgp 


More information about the bazaar mailing list