[issue15501] Document exception classes in subprocess module
New submission from Anton Barkovsky:
Exception classes from subprocess module are mentioned in the doc but do
not have their own entries.
I'm attaching patches for 3.3, 3.2 and 2.7
This issue supersedes #14966.
----------
assignee: docs@python
components: Documentation
files: subprocess_doc_3.3.patch
keywords: patch
messages: 166895
nosy: anton.barkovsky, docs@python
priority: normal
severity: normal
status: open
title: Document exception classes in subprocess module
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file26598/subprocess_doc_3.3.patch
_______________________________________
Python tracker
Changes by Anton Barkovsky
Changes by Anton Barkovsky
Changes by Tshepang Lekhonkhobe
Changes by Andrew Svetlov
Andrew Svetlov added the comment:
Please update your patches:
1. use attribute::
2. point base class for exception if it is not Exception
3. enumerate all attributes (`cmd` for CalledProcessError)
Example:
.. exception:: HTTPError
Though being an exception (a subclass of :exc:`URLError`), an :exc:`HTTPError`
can also function as a non-exceptional file-like return value (the same thing
that :func:`urlopen` returns). This is useful when handling exotic HTTP
errors, such as requests for authentication.
.. attribute:: code
An HTTP status code as defined in `RFC 2616 http://www.faqs.org/rfcs/rfc2616.html`_.
This numeric value corresponds to a value found in the dictionary of
codes as found in :attr:`BaseHTTPServer.BaseHTTPRequestHandler.responses`.
Also please fill Contributor Agreement: http://www.python.org/psf/contrib/
----------
nosy: +asvetlov
_______________________________________
Python tracker
Changes by Anton Barkovsky
Changes by Anton Barkovsky
Changes by Anton Barkovsky
Anton Barkovsky added the comment:
Updated.
----------
_______________________________________
Python tracker
Roundup Robot added the comment:
New changeset b863e231ad9f by Andrew Svetlov in branch 'default':
Issue #15501: Document exception classes in subprocess module.
http://hg.python.org/cpython/rev/b863e231ad9f
New changeset 1e8f6d8e5c0e by Andrew Svetlov in branch '3.2':
Issue #15501: Document exception classes in subprocess module.
http://hg.python.org/cpython/rev/1e8f6d8e5c0e
New changeset 9c99f31a9c2a by Andrew Svetlov in branch '2.7':
Issue #15501: Document exception classes in subprocess module.
http://hg.python.org/cpython/rev/9c99f31a9c2a
----------
nosy: +python-dev
_______________________________________
Python tracker
Andrew Svetlov added the comment:
Fixed. Thank you, Anton.
----------
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
superseder: -> Fully document subprocess.CalledProcessError
_______________________________________
Python tracker
participants (4)
-
Andrew Svetlov
-
Anton Barkovsky
-
Roundup Robot
-
Tshepang Lekhonkhobe