[issue8602] documentation of bz2 module mildly erroneous
New submission from Matt Wartell <matt.wartell+pt@gmail.com>: This is related to http://bugs.python.org/issue8601 "bz2.BZ2File should support "with" protocol per PEP 343" The documentation at http://docs.python.org/library/bz2.html states: "This module provides a comprehensive interface for the bz2 compression library. It implements a complete file interface,..." although bz2.BZ2File does not support the __enter__ and __exit__ methods so arguably doesn't implement the "complete file interface". If issue8601 is declined then the documentation should probably note this exception. ---------- assignee: docs@python components: Documentation messages: 104818 nosy: Matt.Wartell, docs@python priority: normal severity: normal status: open title: documentation of bz2 module mildly erroneous type: behavior versions: Python 2.6 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8602> _______________________________________
Éric Araujo <merwok@netwok.org> added the comment: Now that #8601 is closed, would you mind providing a doc patch explaining the lack of context manager protocol support and its reason? ---------- nosy: +merwok _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8602> _______________________________________
Matt Wartell <matt.wartell+pt@gmail.com> added the comment: Per request, I have attached a context diff for both bz2.txt and 3.0.txt suitable for http://docs.python.org/library/bz2.html and http://docs.python.org/release/3.0.1/whatsnew/3.0.html respectively. The modification in bz2.txt may border on redundant and overly verbose and should be reviewed for style consistency. I have sanity-checked the modified files with sphinx-build html which generates clean, consistent markup. ---------- keywords: +patch status: open -> pending Added file: http://bugs.python.org/file17253/issue-8602.diff _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8602> _______________________________________
Éric Araujo <merwok@netwok.org> added the comment: I’d remove the lines “Specifically it does not define the :meth:`__enter__` and :meth:`__exit__` methods required by the :keyword:`with` statement”, since they add unnecessary length to a simple note. Please provide one patch per branch, and diff from the top level of the checkout (see http://www.python.org/dev/patches/). Thanks! ---------- status: pending -> open _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8602> _______________________________________
Éric Araujo <merwok@netwok.org> added the comment: Also, don’t bother with 3.0: It is not supported by python-dev anymore. Make documentation patches for py3k and trunk, and they’ll be backported to the stable branches 3.1 and 2.6. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8602> _______________________________________
Georg Brandl <georg@python.org> added the comment: Now present in all maintained branches. ---------- nosy: +georg.brandl resolution: -> out of date status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8602> _______________________________________
participants (3)
-
Georg Brandl
-
Matt Wartell
-
Éric Araujo