urllib.urlopen throws OSError
| BPO | 541980 |
|---|---|
| Nosy | @gvanrossum |
| Files |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = 'https://github.com/gvanrossum'
closed_at = <Date 2002-04-15.00:25:20.000>
created_at = <Date 2002-04-10.13:44:26.000>
labels = ['library']
title = 'urllib.urlopen throws OSError'
updated_at = <Date 2002-04-15.00:25:20.000>
user = 'https://bugs.python.org/nectar'
bugs.python.org fields:
activity = <Date 2002-04-15.00:25:20.000>
actor = 'gvanrossum'
assignee = 'gvanrossum'
closed = True
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2002-04-10.13:44:26.000>
creator = 'nectar'
dependencies = []
files = ['416']
hgrepos = []
issue_num = 541980
keywords = []
message_count = 2.0
messages = ['10243', '10244']
nosy_count = 2.0
nosy_names = ['gvanrossum', 'nectar']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue541980'
versions = []
urllib.urlopen throws OSError when processing file:// (local file) URLs and an error is encountered. It should instead throw IOError in these cases to be consistent with the built-in open function and with the urllib documentation. A patch is attached.
See bug report 482171 for an example of the consequences of this bug (which was hacked around for Python 2.2 it appears). The bug also impacts 4Suite's XSLT processor (using include paths causes an unhandled exception).
Logged In: YES user_id=6380
Thanks; your fix is applied as urllib.py 1.143.