This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author nikratio
Recipients Cybjit, benjamin.peterson, cameron, ethan.furman, martin.panter, nikratio, orsenthil, python-dev
Date 2014-05-11.19:02:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <87tx8wjfzs.fsf@kosh.rath.org>
In-reply-to <1399707943.51.0.955940492265.issue7776@psf.upfronthosting.co.za> (Cybjit's message of "Sat, 10 May 2014 07:45:43 +0000")
Content
Cybjit <report@bugs.python.org> writes:
> Cybjit added the comment:
>
> On 2014-05-10 00:23, nikratio wrote:
>> Is pip maybe doing its own certificate check, and relying on
>> HTTPSConnection.host to contain the final hostname rather than the proxy?
>
> I think the culprit might be here
> https://github.com/pypa/pip/blob/1.5.4/pip/_vendor/requests/packages/urllib3/connection.py#L172

Yes, that's the problem. I guess that nicely demonstrates why using
inheritance as an API is not a good idea.

I guess we nevertheless need to repair/work around this in Python 3.4?
Unfortunately pip explicitly relies on _set_tunnel() to set self.host =
self._tunnel_host. So we would need to change _set_tunnel() to save the
original attribute somewhere, change the other methods to use the saved
attribute in favor of the real one, and have connect() restore it (so
that we can reconnect). This still would not allow pip to reconnect
(because it overwrites the connect method), but then reconnecting a
tunneled connection with pip did not work before either. Still, rather
ugly.

Alternatively, maybe we could also do nothing, because if pip is
depending on undocumented semantics of a private method (_set_tunnel),
they have to live with the consequences?

Thinking about this, I think we should just revert the entire patch for
3.4, but keep it in for 3.5. That gives the pip folks enough time to fix
their code. Fixing the issue in 3.4 is probably not that crucial (after
all, it existed since about 2.6.3).

Best,
Nikolaus

-- 
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

             »Time flies like an arrow, fruit flies like a Banana.«
History
Date User Action Args
2014-05-11 19:02:35nikratiosetrecipients: + nikratio, orsenthil, benjamin.peterson, cameron, ethan.furman, python-dev, martin.panter, Cybjit
2014-05-11 19:02:35nikratiolinkissue7776 messages
2014-05-11 19:02:33nikratiocreate