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

Get rid of os.error. Use OSError instead #60910

Closed
asvetlov opened this issue Dec 17, 2012 · 5 comments
Closed

Get rid of os.error. Use OSError instead #60910

asvetlov opened this issue Dec 17, 2012 · 5 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@asvetlov
Copy link
Contributor

BPO 16706
Nosy @asvetlov, @hynek

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/asvetlov'
closed_at = <Date 2012-12-18.20:09:33.904>
created_at = <Date 2012-12-17.20:51:36.893>
labels = ['type-bug', 'library']
title = 'Get rid of os.error. Use OSError instead'
updated_at = <Date 2012-12-18.20:09:33.903>
user = 'https://github.com/asvetlov'

bugs.python.org fields:

activity = <Date 2012-12-18.20:09:33.903>
actor = 'asvetlov'
assignee = 'asvetlov'
closed = True
closed_date = <Date 2012-12-18.20:09:33.904>
closer = 'asvetlov'
components = ['Library (Lib)']
creation = <Date 2012-12-17.20:51:36.893>
creator = 'asvetlov'
dependencies = []
files = []
hgrepos = []
issue_num = 16706
keywords = []
message_count = 5.0
messages = ['177677', '177684', '177685', '177703', '177705']
nosy_count = 3.0
nosy_names = ['asvetlov', 'python-dev', 'hynek']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue16706'
versions = ['Python 3.4']

@asvetlov asvetlov self-assigned this Dec 17, 2012
@asvetlov asvetlov added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Dec 17, 2012
@hynek
Copy link
Member

hynek commented Dec 18, 2012

Ah yeah I support this endeavor, I fixed a few instances in rmtree while working on it. It’s just confusing.

JFTR, is there any rationale/reason to do it? Last time I checked it wasn’t deprecated.

@asvetlov
Copy link
Contributor Author

I think deprecation makes not big value.
We should continue aliases support and there are no place to raise warning.
What we can do — mention deprecation in the doc.

The reason to get rid of other OSError aliases to make cleaner code (especially considering situations like `except (os.error, IOError):` and use best practices in stdlib.

I think the later is very important because stdlib is first class example of coding style for many users.

After stdlib we can cleanup C code to that unification and use concrete exception classes instead of errno checking (bpo-16705).

@hynek
Copy link
Member

hynek commented Dec 18, 2012

I think deprecation makes not big value.
We should continue aliases support and there are no place to raise warning.
What we can do — mention deprecation in the doc.

That’s what I meant. I saw it in shutil code, were confused, looked it up, wondered why it exists. I would like to get rid of it.

Do you have any concrete plans or should I just wade through shutil and make it pretty for 3.4?

The reason to get rid of other OSError aliases to make cleaner code (especially considering situations like `except (os.error, IOError):` and use best practices in stdlib.

Sure.

I think the later is very important because stdlib is first class example of coding style for many users.

I hope not. :-/

After stdlib we can cleanup C code to that unification and use concrete exception classes instead of errno checking (bpo-16705).

Awesome.

@python-dev
Copy link
Mannequin

python-dev mannequin commented Dec 18, 2012

New changeset 47f98a550d42 by Andrew Svetlov in branch 'default':
Issue bpo-16706: get rid of os.error
http://hg.python.org/cpython/rev/47f98a550d42

@asvetlov
Copy link
Contributor Author

Fixed.
About deprecation: I've created bpo-16716 for that.

@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 type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants