it looks like someone broke http:// in dev

Marius Kruger amanic at gmail.com
Sat Feb 7 19:13:11 GMT 2009


2009/2/7 John Arbash Meinel <john at arbash-meinel.com>

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Marius Kruger wrote:
> > I'm posting it here for in case somebody else can figure out and fix
> > this before I get around to it.
> > (bialix is very demanding today :)
> >
> > this works:
> >
> > $ bzr info lp:bzr
> > Repository branch (format: unnamed)
> > Location:
> >   shared repository: bzr+ssh://bazaar.launchpad.net/%7Ebzr/bzr/trunk/
> > <http://bazaar.launchpad.net/%7Ebzr/bzr/trunk/>
> >   repository branch: bzr+ssh://bazaar.launchpad.net/%7Ebzr/bzr/trunk/
> > <http://bazaar.launchpad.net/%7Ebzr/bzr/trunk/>
> >
> > Related branches:
> >   parent branch: http://bazaar-ng.org/bzr/bzr.dev/
> >
> >
> >
> > but this doesn't:
> >
> > $ bzr info
> > https://code.launchpad.net/~bzr/bzr/trunk<https://code.launchpad.net/%7Ebzr/bzr/trunk>
> >
> > bzr: ERROR: exceptions.TypeError: readline() takes exactly 1 argument (2
> > given)
> ...
>
> >   File "/usr/lib/python2.5/httplib.py", line 343, in
> > _read_status
> >     line =
> > self.fp.readline()
> >
> >   File
> >
> "/stuph/projects/bzr/bzr.repo/bzr.dev/bzrlib/transport/http/_urllib2_wrappers.py",
> > line 83, in readline
> >     s =
> > self.filesock.readline(size)
> >
> > TypeError: readline() takes exactly 1 argument (2
> > given)
> >
>
> Given the location, I would guess Vincent's recent patch to change how
> we track bytes read/written to sockets broke this. I also wonder if it
> has to do with http versus https. If only because I've been using
> bzr.dev with http quite a bit, though not with 'bzr info'.


this actually affects branch, checkout too and probably more.
info was a nice clean case with less other factors coming to play.


> Certainly it is Vincent's new code that is the problem. I wonder if
> 'readline' is ever supposed to take a 'size' argument.


maybe a different python version?


> I can say that SSLFile.readline() doesn't take a size argument, which is
> probably where this is coming from.
>
> The easy fix is:
>
> === modified file 'bzrlib/transport/http/_urllib2_wrappers.py'
> - --- bzrlib/transport/http/_urllib2_wrappers.py  2009-01-29 14:27:28 +0000
> +++ bzrlib/transport/http/_urllib2_wrappers.py  2009-02-07 18:08:47 +0000
> @@ -79,8 +79,8 @@
>         self._report_activity(len(s), 'read')
>         return s
>
> - -    def readline(self, size=-1):
> - -        s = self.filesock.readline(size)
> +    def readline(self):
> +        s = self.filesock.readline()
>         self._report_activity(len(s), 'read')
>         return s


I also guessed at that, but thought stuff might actually use the size param.

thanks for looking at this.
regards
marius
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/bazaar/attachments/20090207/9281fb48/attachment.htm 


More information about the bazaar mailing list