Stefano Mazzucco added the comment:
FWIW, I have just been experiencing this on CentOS 6.5 with Python 2.7.5
(sorry).
I could make the Python code happy by running chcon[1] with the correct context
type, otherwise os.path.exists would happily return False for a file that
actually existed
New submission from Stefano Mazzucco:
Hello,
at work, I am behind a proxy (squid) that is only available over http. So, I
have to configure both the http_proxy and https_proxy environment variables to
be something like "http://proxy.corp.com:8181";
Now, when I try and use urllib
Stefano Mazzucco added the comment:
I have run the minimal example provided on both Python2 and Python3 with the
same results. Sorry if that was not clear.
I did look at issue 1424152 but it seemed to me that I was experiencing a
different problem.
When I try and open the page, I get a squid
Stefano Mazzucco added the comment:
Martin, thanks for elaborating my thoughts!
I have dug I bit deeper in Python2's urllib code with pdb, and I think I have
narrowed the issue down to what open_http does.
In my example code, replacing opener.open(url) with opener.open_http(url) gives
Stefano Mazzucco added the comment:
Martin,
I have applied the patch <https://bugs.python.org/file31201> to my Python2.7.10
installation and seem to work OK.
--
___
Python tracker
<http://bugs.python.org/i
Stefano Mazzucco added the comment:
Any thoughts from the core Python developers?
It seems to me that this is a confirmed bug with a working fix (that may need
further review, but indeed works). So, hopefully, this issue could be resolved
fairly quickly
Stefano Mazzucco added the comment:
Closing as this bug refers to versions of Python that have been EOL'd.
--
resolution: -> wont fix
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.pyth