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

Mads Kiilerich mads at kiilerich.com
Fri May 23 10:51:48 CDT 2014


On 05/23/2014 04:57 PM, Yuya Nishihara wrote:
> 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.

It is probably not possible. The Python http implementation has changed 
a lot over time. Proxys did probably not really work correctly for our 
use before 2.6.3 or something like that.

It seems like the change is fine, then. Assuming Python really want to 
change the implementation in such a way that it breaks other tools. 
(They could argue that we are messing with private methods. But. But. 
But that was necessary ... :-( )

/Mads


More information about the Mercurial-devel mailing list