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: Use the errno attribute of OSError instead of args[0]
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.10
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: corona10, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2020-11-21 17:27 by serhiy.storchaka, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 23449 merged serhiy.storchaka, 2020-11-21 17:29
Messages (2)
msg381570 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-11-21 17:27
Some code in the stdlib still uses e.args[0] to access errno of OSError instead of e.errno. The latter is more readable, and also it always success (although can return None), but args can be an empty tuple.
msg381603 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-11-22 08:29
New changeset c4d45ee670c09d4f6da709df072ec80cb7dfad22 by Serhiy Storchaka in branch 'master':
bpo-42427: Use the errno attribute of OSError instead of args[0] (GH-23449)
https://github.com/python/cpython/commit/c4d45ee670c09d4f6da709df072ec80cb7dfad22
History
Date User Action Args
2022-04-11 14:59:38adminsetgithub: 86593
2020-11-22 08:29:33serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-11-22 08:29:01serhiy.storchakasetmessages: + msg381603
2020-11-22 06:49:45corona10setnosy: + corona10
2020-11-21 17:29:09serhiy.storchakasetkeywords: + patch
stage: patch review
pull_requests: + pull_request22341
2020-11-21 17:27:58serhiy.storchakacreate