PyCurlTransport doesn't define the _remote_is_at_least_1_2 property

Bug #220806 reported by Mark Lee
14
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
High
Andrew Bennetts

Bug Description

I'm trying to branch from a smart HTTP server, where the client uses pycurl as the http transport client. The following error occurs while branching:

bzr: ERROR: exceptions.AttributeError: 'PyCurlTransport' object has no attribute '_remote_is_at_least_1_2'

Is there a particular reason why that attribute is not defined in PyCurlTransport? If not, I have a simple patch which allows the pycurl transport to retrieve HTTP smart server branches.

A log of the console output and the relevant part of ~/.bzr.log is attached.

Related branches

Revision history for this message
Mark Lee (malept) wrote :
Revision history for this message
Mark Lee (malept) wrote :
Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 220806] [NEW] PyCurlTransport doesn't define the _remote_is_at_least_1_2 property
  • unnamed Edit (189 bytes, application/pgp-signature; name=signature.asc)

On Tue, 2008-04-22 at 21:59 +0000, Mark Lee wrote:
> Public bug reported:
>
> I'm trying to branch from a smart HTTP server, where the client uses
> pycurl as the http transport client. The following error occurs while
> branching:
>
> bzr: ERROR: exceptions.AttributeError: 'PyCurlTransport' object has no
> attribute '_remote_is_at_least_1_2'
>
> Is there a particular reason why that attribute is not defined in
> PyCurlTransport? If not, I have a simple patch which allows the pycurl
> transport to retrieve HTTP smart server branches.
>
> A log of the console output and the relevant part of ~/.bzr.log is
> attached.

This smells familiar; didn't we fix this 3-4 weeks ago?

-Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 220806] [NEW] PyCurlTransport doesn't define the _remote_is_at_least_1_2 property

It seems odd to me that this is on the http transport not the Remote object...

Revision history for this message
John A Meinel (jameinel) wrote :

class HTTPTransport
 ...
  def get_smart_medium():
    return self

The problem is that both urllib and pycurl inherit from HTTPTransport, which claims itself as the smart medium. And it is the *medium* where this is defined.

Back a few weeks ago, I mentioned that the smart medium tests were incomplete, if we were adding a *required* member to mediums, but not testing that they were actually there. This is just another one we overlooked.

Revision history for this message
czp (christian-zipfel) wrote :

I am running into the problem too.

I have
czp@wichtel:~$ bzr version
Bazaar (bzr) 1.4rc2
  Python interpreter: /usr/bin/python 2.4.4
  Python standard library: /usr/lib/python2.4
  bzrlib: /usr/lib/python2.4/site-packages/bzr-1.4rc2-py2.4-linux-x86_64.egg/bzrlib
  Bazaar configuration: /home/czp/.bazaar
  Bazaar log file: /home/czp/.bzr.log

on the smart server with bzr+http.

A newley updated Win32 client:
Bazaar (bzr) 1.3.1
   Python interpreter: C:\Python25\python.exe 2.5.1.final.0

which ran a bzr checkout, bzr add and bzr commit fine. (The Win32 version 1.3 encountered the AttribError).

And a MacOSX client:

nineteen:MatheZirkel czp$ bzr version
Bazaar (bzr) 1.3.1
  Python interpreter: /opt/local/bin/python2.5 2.5.2.final.0

where a
nineteen:MatheZirkel czp$ bzr update
bzr: ERROR: exceptions.AttributeError: 'PyCurlTransport' object has no attribute '_remote_is_at_least_1_2'

crashes.

Martin Pool (mbp)
Changed in bzr:
importance: Undecided → High
status: New → Confirmed
Andrew Bennetts (spiv)
Changed in bzr:
assignee: nobody → spiv
status: Confirmed → Fix Committed
milestone: none → 1.6
Revision history for this message
Andrew Bennetts (spiv) wrote :

This has been fixed in bzr.dev. The fix will be in the bzr 1.6 release.

Changed in bzr:
status: Fix Committed → Fix Released
Revision history for this message
pva (pva) wrote :

Guys, speaking about currently stable 1.5 branch what it's better to do? Should we apply patch Mark posted here or it's better to wait for 1.6 release? Thank you.

Revision history for this message
Mark Lee (malept) wrote :

Well, 1.6 is scheduled to be released on Monday <https://lists.ubuntu.com/archives/bazaar-announce/2008-August/000178.html>, and my fix wasn't really optimal. If you want a patch in the meantime, I would probably use the revision committed by Andrew Bennetts:

http://bazaar.launchpad.net/~bzr/bzr/bzr.1.6/revision/3442

Revision history for this message
pva (pva) wrote :

Thank you very much Mark. I'll wait till monday and if release will be delayed for some reasons I'll take this patch as we want to use your overlay. )

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.