This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Get rid of os.error. Use OSError instead
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: asvetlov Nosy List: asvetlov, hynek, python-dev
Priority: normal Keywords:

Created on 2012-12-17 20:51 by asvetlov, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (5)
msg177677 - (view) Author: Hynek Schlawack (hynek) * (Python committer) Date: 2012-12-18 07:24
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.
msg177684 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2012-12-18 11:10
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 (#16705).
msg177685 - (view) Author: Hynek Schlawack (hynek) * (Python committer) Date: 2012-12-18 12:14
> 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 (#16705).

Awesome.
msg177703 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-12-18 20:02
New changeset 47f98a550d42 by Andrew Svetlov in branch 'default':
Issue #16706: get rid of os.error
http://hg.python.org/cpython/rev/47f98a550d42
msg177705 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2012-12-18 20:08
Fixed. 
About deprecation: I've created #16716 for that.
History
Date User Action Args
2022-04-11 14:57:39adminsetgithub: 60910
2012-12-18 20:09:33asvetlovsetstatus: open -> closed
resolution: fixed
stage: resolved
2012-12-18 20:08:57asvetlovsetmessages: + msg177705
2012-12-18 20:02:52python-devsetnosy: + python-dev
messages: + msg177703
2012-12-18 19:37:23asvetlovlinkissue16705 dependencies
2012-12-18 12:14:07hyneksetmessages: + msg177685
2012-12-18 11:10:32asvetlovsetmessages: + msg177684
2012-12-18 07:24:35hyneksetnosy: + hynek
messages: + msg177677
2012-12-17 20:51:36asvetlovcreate