[New-bugs-announce] [issue29379] Custom handlers not used when passing "context" argument to urllib2.urlopen()

Piotr Dobrogost report at bugs.python.org
Thu Jan 26 12:09:47 EST 2017


New submission from Piotr Dobrogost:

When urllib2.urlopen() is passed "context" argument the new opener is being built (https://hg.python.org/cpython/file/a06454b1afa1/Lib/urllib2.py#l147) and used instead custom opener which might had been already installed with urllib2.install_opener(). This might lead to problems with proxies if custom ProxyHandler was used in custom opener – see http://stackoverflow.com/q/36089694/95735 as an example.

----------
components: Library (Lib)
messages: 286325
nosy: piotr.dobrogost
priority: normal
severity: normal
status: open
title: Custom handlers not used when passing "context" argument to urllib2.urlopen()
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29379>
_______________________________________


More information about the New-bugs-announce mailing list