[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 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 -> re

[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 d

[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 ___ ___ Python-bugs-list mailing

[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 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-11 Thread Martin Panter
Martin Panter added the comment: Good point Serhiy about returning subclasses. I’ll see about making that more explicit if I can’t find it already documented somewhere. Regarding the number of arguments, I resisted documenting what happens to extra arguments since the behaviour has changed ove

[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 : -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[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 -- file

[issue23391] Documentation of EnvironmentError (OSError) arguments disappeared

2015-02-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +needs review nosy: +pitrou stage: -> patch review versions: +Python 3.5 -Python 3.3 ___ Python tracker ___ __

[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 m

[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