[issue15784] OSError.__str__() should distinguish between errno and winerror
Roundup Robot added the comment: New changeset 4e941113e4fa by Richard Oudkerk in branch 'default': Issue #15784: Modify OSError.__str__() to better distinguish between http://hg.python.org/cpython/rev/4e941113e4fa -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15784 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15784] OSError.__str__() should distinguish between errno and winerror
Georg Brandl added the comment: Done in 4e941113e4fa. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15784 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15784] OSError.__str__() should distinguish between errno and winerror
Richard Oudkerk added the comment: The changeset is 2e587b9bae35. Georg, could you copy it to your release branch please. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15784 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15784] OSError.__str__() should distinguish between errno and winerror
Roundup Robot added the comment: New changeset 2e587b9bae35 by Richard Oudkerk in branch 'default': Issue #15784: Modify OSError.__str__() to better distinguish between http://hg.python.org/cpython/rev/2e587b9bae35 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15784 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15784] OSError.__str__() should distinguish between errno and winerror
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15784 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15784] OSError.__str__() should distinguish between errno and winerror
Antoine Pitrou added the comment: I originally kept it that way to minimize disruption with 3.2, but I agree it's a welcome change. As for acceptance in 3.3, Georg will have to decide. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15784 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15784] OSError.__str__() should distinguish between errno and winerror
Georg Brandl added the comment: Uh, currently it's Errno or Error, so there is a way to tell which. I'll leave to Antoine to decide what to do here; it's not like changing it a big deal. WinError looks kind of ugly to me though. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15784 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15784] OSError.__str__() should distinguish between errno and winerror
Antoine Pitrou added the comment: Well, Error and Errno are rather hard to distinguish, and the difference isn't obvious either, so Richard's patch is a good improvement IMHO. -- assignee: - sbt components: +Interpreter Core versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15784 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15784] OSError.__str__() should distinguish between errno and winerror
Richard Oudkerk added the comment: Well, Error and Errno are rather hard to distinguish Embarrassingly, I did not even notice the was a difference. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15784 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15784] OSError.__str__() should distinguish between errno and winerror
New submission from Richard Oudkerk: Since WindowsError became an alias of OSError, the error number shown in the stringification of an OSError err can either be a windows error code (err.winerror) or a posix style error number (err.errno), with no way to tell which. For instance in os.read(999, 0) Traceback (most recent call last): File stdin, line 1, in module OSError: [Errno 9] Bad file descriptor err.errno == EBADF == 9 and err.winerror == None, but in _winapi.ReadFile(999, 0) Traceback (most recent call last): File stdin, line 1, in module OSError: [Error 6] The handle is invalid err.errno == EBADF == 9 and err.winerror == ERROR_INVALID_HANDLE == 6. (winerror gets priority over errno if it exists.) With the attached patch the second will be shown as _winapi.ReadFile(999, 0) Traceback (most recent call last): File stdin, line 1, in module OSError: [WinError 6] The handle is invalid ^^^ Since this issue only applies to 3.3 and the patch is trivial, it would be nice to get this in before 3.3 is released. -- files: winerror.patch keywords: patch messages: 169153 nosy: pitrou, sbt priority: normal severity: normal status: open title: OSError.__str__() should distinguish between errno and winerror Added file: http://bugs.python.org/file27001/winerror.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15784 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15784] OSError.__str__() should distinguish between errno and winerror
Changes by Richard Oudkerk shibt...@gmail.com: Added file: http://bugs.python.org/file27002/winerror.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15784 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15784] OSError.__str__() should distinguish between errno and winerror
Changes by Richard Oudkerk shibt...@gmail.com: Removed file: http://bugs.python.org/file27001/winerror.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15784 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com