[PATCH STABLE] proxy: remove unneeded _set_hostport for compatibility with Python 2.7.7rc1

Yuya Nishihara yuya at tcha.org
Fri May 23 09:57:32 CDT 2014


On Thu, 22 May 2014 17:16:42 +0200, Mads Kiilerich wrote:
> On 05/22/2014 04:34 PM, Yuya Nishihara wrote:
> > On Thu, 22 May 2014 16:03:27 +0200, Mads Kiilerich wrote:
> >> On 05/22/2014 03:55 PM, Yuya Nishihara wrote:
> >>> # HG changeset patch
> >>> # User Yuya Nishihara <yuya at tcha.org>
> >>> # Date 1400763926 -32400
> >>> #      Thu May 22 22:05:26 2014 +0900
> >>> # Branch stable
> >>> # Node ID b8bca4e9640673f43e9027c199c25ff828531fe9
> >>> # Parent  54d7657d7d1e6a62315eea53f4498657e766bb60
> >>> proxy: remove unneeded _set_hostport for compatibility with Python 2.7.7rc1
> >> Which Python versions has this been tested / reviewed with?
> > Tested with
> >
> >    - Python 2.7.6 (Debian python2.7 2.7.6-8)
> >    - Python 2.7.7rc1 (Debian python2.7 2.7.7~rc1-1)
> >
> > and checked _set_hostport implementation at v2.4, v2.5 and v2.6.
> 
> FWIW, it is relatively simple and fast to test different Python versions 
> using contrib/Makefile.python .

Thanks.

"hg clone" through tinyproxy.py worked on Python 2.4.6.  But I couldn't
figure out a good way to write test of HTTP CONNECT tunnel for Python 2.4 or
2.5, without ssl module.

> >> Do the test suite have test coverage for this?
> > test-https.t should fail with Python 2.7.7rc1.
> 
> Will it also verify that the effect of _set_hostport still is achieved?

It isn't easy to answer.  AFAIK, "_set_hostport(self.host, self.port)" is
"self.host, self.port = self.host, self.port", and it seems the result of
_set_hostport isn't used because the connection is already established,
but it might be wrong in a certain case.

Regards,


More information about the Mercurial-devel mailing list