Title: Restore errno in tempfile exceptions
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.3, Python 3.4
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: flox, georg.brandl, ncoghlan, orsenthil, python-dev, serhiy.storchaka
Priority: normal Keywords: 3.3regression, patch

Created on 2013-02-09 14:45 by serhiy.storchaka, last changed 2013-02-09 20:43 by serhiy.storchaka. This issue is now closed.

File name Uploaded Description Edit
tempfile_errno.patch serhiy.storchaka, 2013-02-09 14:45 review
Messages (3)
msg181739 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-02-09 14:45
Before 3.3 if not able to create the name of the temporary file then an OSError with meaninful errno (ENOENT or EEXIST) was raised. Now subclass of OSError raised with errno=None. This is an incompatible change because old user code can catch OSError exception and then test its errno.

Here is a patch which restores errno attribute in these exceptions.
msg181746 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2013-02-09 17:33
The patch looks good and it is correct thing to do IMO. thanks.
msg181756 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-02-09 20:28
New changeset 11eaa61124c2 by Serhiy Storchaka in branch '3.3':
Issue #17169: Restore errno in tempfile exceptions.

New changeset fd3e3059381a by Serhiy Storchaka in branch 'default':
Issue #17169: Restore errno in tempfile exceptions.
Date User Action Args
2013-02-09 20:43:00serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2013-02-09 20:28:19python-devsetnosy: + python-dev
messages: + msg181756
2013-02-09 17:33:02orsenthilsetnosy: + orsenthil
messages: + msg181746
2013-02-09 14:45:19serhiy.storchakacreate