Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

urllib doesn't raise IOError correctly with new IOError #44045

Closed
gissehel mannequin opened this issue Sep 28, 2006 · 2 comments
Closed

urllib doesn't raise IOError correctly with new IOError #44045

gissehel mannequin opened this issue Sep 28, 2006 · 2 comments
Labels
stdlib Python modules in the Lib dir

Comments

@gissehel
Copy link
Mannequin

gissehel mannequin commented Sep 28, 2006

BPO 1566800
Nosy @birkenfeld

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 = None
closed_at = <Date 2006-09-30.09:04:08.000>
created_at = <Date 2006-09-28.05:47:23.000>
labels = ['library']
title = "urllib doesn't raise IOError correctly with new IOError"
updated_at = <Date 2006-09-30.09:04:08.000>
user = 'https://bugs.python.org/gissehel'

bugs.python.org fields:

activity = <Date 2006-09-30.09:04:08.000>
actor = 'georg.brandl'
assignee = 'none'
closed = True
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2006-09-28.05:47:23.000>
creator = 'gissehel'
dependencies = []
files = []
hgrepos = []
issue_num = 1566800
keywords = []
message_count = 2.0
messages = ['30046', '30047']
nosy_count = 2.0
nosy_names = ['georg.brandl', 'gissehel']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue1566800'
versions = ['Python 2.5']

@gissehel
Copy link
Mannequin Author

gissehel mannequin commented Sep 28, 2006

The version I used is :

>>> sys.version
'2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 
bit (Intel)]'

On Windows XP SP2.

While I think every python 2.5 releases are concerned.

On line 357 of urllib.py from 2.5 release, there is a
raise of an IOError with 4 arguments. It look like it
was fine with python 2.4 but it hang up with a
"TypeError: EnvironmentError expected at most 3
arguments, got 4"

Concretly, when you hit a page with a "redirect" using
error 302 for exemple, instead of raising an IOError,
it raise a TypeError, so it break code which expect an
IOError here (as a "normal" behavior for 302 codes)

It look like IOError is totally different between
Python 2.4 and Python 2.5 (it was a class, it's now a
type)

@gissehel gissehel mannequin closed this as completed Sep 28, 2006
@gissehel gissehel mannequin added the stdlib Python modules in the Lib dir label Sep 28, 2006
@gissehel gissehel mannequin closed this as completed Sep 28, 2006
@gissehel gissehel mannequin added the stdlib Python modules in the Lib dir label Sep 28, 2006
@birkenfeld
Copy link
Member

Logged In: YES
user_id=849994

Thanks for the report, IOError can now again take any number
of arguments. rev. 52061, 52062 (2.5).

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir
Projects
None yet
Development

No branches or pull requests

1 participant