An improper change in httplib.py

Guohua Ouyang ouyanggh0815 at gmail.com
Thu Jan 22 17:35:52 EST 2015


Have reported an issue http://bugs.python.org/issue23300.

"That leading underscore in the method name means it is not a public
API and thus changes are allowed without any backwards-compatibility
guarantees. Mercurial will need to update their code to handle this if
they want to continue to use the method."

I checked the official mercurial repo, it does not use the method
anymore, so I filed a bug to fedora. [1]

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1185105

On Thu, Jan 22, 2015 at 8:04 PM, Mark Lawrence <breamoreboy at yahoo.co.uk> wrote:
> No problem, but out of courtesy could you please reply to the list and not
> just me.
>
> Kindest regards.
>
> Mark Lawrence.
>
>
> On Thursday, 22 January 2015, 11:51, Guohua Ouyang <ouyanggh0815 at gmail.com>
> wrote:
>
>
>
> thanks, file the issue 23300
>
> On Thu, Jan 22, 2015 at 5:06 PM, Mark Lawrence <breamoreboy at yahoo.co.uk>
> wrote:
>> On 22/01/2015 03:38, Guohua Ouyang wrote:
>>>
>>> This is my first post to the list, I apologies firstly if I made any
>>> mistake.
>>>
>>> I was trying to get a package in golang behind the http or https
>>> proxy, and it reports  an error "AttributeError: httpsconnection
>>> instance has no attribute '_set_hostport'", details in the bottom.
>>> After some trace work, I found it caused by the changes in the issue
>>> issue7776.
>>>
>>> @@ -718,7 +734,7 @@
>>>          else:
>>>              self._tunnel_headers.clear()
>>>
>>> -    def _set_hostport(self, host, port):
>>> +    def _get_hostport(self, host, port):
>>>
>>> First, it changes the method's name, doesn't it break the
>>> compatibility for other packages, on my system,
>>> mercurial-3.0-2.fc21.x86_64 still use "_set_hostport" as the error
>>> shows.
>>>
>>> Second, I found that line 1132 of [2] still use "
>>> self._conn._set_hostport(host, port)", which should be
>>> "_get_hostport", right?
>>>
>>> [1] http://bugs.python.org/issue7776
>>> [2] https://github.com/python/cpython/blob/2.7/Lib/httplib.py
>>
>>
>> You've found a bug so please raise it on bugs.python.org :)
>>
>> --
>> My fellow Pythonistas, ask not what our language can do for you, ask
>> what you can do for our language.
>>
>> Mark Lawrence
>>
>> --
>> https://mail.python.org/mailman/listinfo/python-list
>
>



More information about the Python-list mailing list