classification
Title: Report failing url in URLError?
Type: behavior Stage: needs patch
Components: Library (Lib) Versions: Python 3.3, Python 3.4
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: ezio.melotti, ncoghlan, orsenthil
Priority: normal Keywords:

Created on 2012-10-16 12:31 by ncoghlan, last changed 2012-10-22 00:57 by orsenthil.

Messages (3)
msg173035 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2012-10-16 12:31
Trying to streamline the URL retrieval example in the concurrent.futures docs were severely hampered by the fact the URLError thrown by urlopen doesn't tell you *what URL* it was trying to retrieve when it failed.

This is OK in synchronous code (where you probably still have the URL around), but quite a pain in asynchronous code (such as that using concurrent.futures) where the original context may have been lost by the time the future is signalled.
msg173036 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2012-10-16 12:33
See also #10836 and msg172988.
msg173494 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2012-10-22 00:57
The URLError changes gone in as part of fix for issue10836 should give e.filename and e.reason.
History
Date User Action Args
2012-10-22 00:57:25orsenthilsetnosy: + orsenthil
messages: + msg173494
2012-10-16 12:33:19ezio.melottisettype: behavior
components: + Library (Lib)
versions: + Python 3.3, Python 3.4
nosy: + ezio.melotti

messages: + msg173036
stage: needs patch
2012-10-16 12:31:20ncoghlancreate