[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 doc from 3.4 into 3.5
https://hg.python.org/cpython/rev/7b1a9a12eb77

New changeset e5df201c0846 by Martin Panter in branch 'default':
Issue #23391: Merge OSError doc from 3.5
https://hg.python.org/cpython/rev/e5df201c0846

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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')

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23391
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23391
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 to None

For reference, the argument handling seems to be in oserror_parse_args(), at 
Objects/exceptions.c:724, and related functions.

--
versions: +Python 3.6
Added file: http://bugs.python.org/file39678/os-error-args.v2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23391
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

Isn't it documented anywhere?

--
nosy: +serhiy.storchaka

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23391
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 more than three arguments being reflected in 
the “args” attribute, since this is not the current behaviour, and does not 
seem very important:

 OSError(1, 2, 3, 4).args
(1, 2)

--
keywords: +patch
Added file: http://bugs.python.org/file38037/os-error-args.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23391
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 be deprecated, or still allowed? Either way, I think the 
documentation should mention it.

--
assignee: docs@python
components: Documentation
messages: 235372
nosy: docs@python, vadmium
priority: normal
severity: normal
status: open
title: Documentation of EnvironmentError (OSError) arguments disappeared
versions: Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23391
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com