[issue23391] Documentation of EnvironmentError (OSError) arguments disappeared

2015-10-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is an outdated comment in Objects/exceptions.c that explains args hacking. It refers to no longer supported syntax: except OSError, (errno, strerror): -- ___ Python tracker

[issue23391] Documentation of EnvironmentError (OSError) arguments disappeared

2015-10-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset cb554248ce54 by Martin Panter in branch '3.4': Issue #23391: Restore OSError constructor argument documentation https://hg.python.org/cpython/rev/cb554248ce54 New changeset 7b1a9a12eb77 by Martin Panter in branch '3.5': Issue #23391: Merge OSError

[issue23391] Documentation of EnvironmentError (OSError) arguments disappeared

2015-10-26 Thread Martin Panter
Martin Panter added the comment: I will leave opening a bug for the args issue for someone else. But if you come up with a sensible solution or find out all the details, I am happy to help write up or review the documentation changes. -- resolution: -> fixed stage: commit review ->

[issue23391] Documentation of EnvironmentError (OSError) arguments disappeared

2015-10-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: docs@python -> martin.panter stage: patch review -> commit review ___ Python tracker ___

[issue23391] Documentation of EnvironmentError (OSError) arguments disappeared

2015-10-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch LGTM. We should handle the problem with extra arguments in separate issue. -- ___ Python tracker ___

[issue23391] Documentation of EnvironmentError (OSError) arguments disappeared

2015-10-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- Removed message: http://bugs.python.org/msg253170 ___ Python tracker ___

[issue23391] Documentation of EnvironmentError (OSError) arguments disappeared

2015-10-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Perhaps you missed my comments to previous patch on Rietveld. Besides this the patch LGTM. May be we should change weird behavior for 6+ arguments. But this is different issue. -- ___ Python tracker

[issue23391] Documentation of EnvironmentError (OSError) arguments disappeared

2015-06-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It should be documented (if still not) that OSError() constructor can return an instance of OSError subclass, depending on errno value. OSError(errno.ENOENT, 'no such file') FileNotFoundError(2, 'no such file') --

[issue23391] Documentation of EnvironmentError (OSError) arguments disappeared

2015-06-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23391 ___ ___

[issue23391] Documentation of EnvironmentError (OSError) arguments disappeared

2015-06-11 Thread Martin Panter
Martin Panter added the comment: New patch, clarifying that the constructor can raise a subclass. If you still think I need to add something about extra arguments, or how the “args” attribute is set, let me know. -- Added file: http://bugs.python.org/file39690/os-error-args.v3.patch

[issue23391] Documentation of EnvironmentError (OSError) arguments disappeared

2015-06-10 Thread Martin Panter
Martin Panter added the comment: New patch with the following changes. Let me know what you think. * Added extra markup for OSError attributes and constructor signature * Explained how “winerror” works with and without Windows * Added “filename2” argument * Update tests for filename2 defaulting

[issue23391] Documentation of EnvironmentError (OSError) arguments disappeared

2015-03-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Current behavior is more complicated. OSError(1, 2, 3, 4).args (1, 2) OSError(1, 2, 3, 4, 5).args (1, 2) OSError(1, 2, 3, 4, 5, 6).args (1, 2, 3, 4, 5, 6) If I remember correctly: 1 -- errno 2 -- strerror 3 -- filename 4 -- winerror (?) 5 -- filename2

[issue23391] Documentation of EnvironmentError (OSError) arguments disappeared

2015-02-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- keywords: +needs review nosy: +pitrou stage: - patch review versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23391

[issue23391] Documentation of EnvironmentError (OSError) arguments disappeared

2015-02-07 Thread Martin Panter
Martin Panter added the comment: Here is a patch to redocument the constructor arguments. I am assuming that they were only removed by accident. The constructor arguments are already tested in ExceptionTests.testAttributes() at Lib/test/test_exceptions.py:248. I did not restore the bit about

[issue23391] Documentation of EnvironmentError (OSError) arguments disappeared

2015-02-03 Thread Martin Panter
New submission from Martin Panter: Seems to have been removed in revision 097f4fda61a4, for PEP 3151. The older EnvironmentError documentation talks about creating the exception with two and three constructor arguments, however I don’t see this in the new documentation. Is this usage meant to