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

2017-01-26 Thread Martin Panter
Martin Panter added the comment: I presume this is the same as in Issue 18543 (and a few other duplicates). Let me know if I got it wrong. IMO there is no easy fix. The best solution may be to just document the behaviour as a limitation of the API, and design a new/improved API for the

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

2017-01-26 Thread Piotr Dobrogost
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().