[issue8602] documentation of bz2 module mildly erroneous

2010-05-07 Thread Matt Wartell

Matt Wartell matt.wartell...@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 rep...@bugs.python.org
http://bugs.python.org/issue8602
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8601] bz2.BZ2File should support with protocol per PEP 343

2010-05-03 Thread Matt Wartell

New submission from Matt Wartell matt.wartell...@gmail.com:

As the bz2.BZ2File object claims to be a file-like object it should conform to 
PEP 343 The 'with' statement by implementation of the __enter__ and __exit__ 
methods.


boring, substantiating detail follows:
$ uname -a
Linux tallguy 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 
i686 GNU/Linux
$ python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) 
[GCC 4.4.3] on linux2
 with bz2.BZ2File('test.bz2') as infile:
... pass
... 
AttributeError: 'bz2.BZ2File' object has no attribute '__exit__'

 getattr(bz2.BZ2File, '__enter__')
AttributeError: type object 'bz2.BZ2File' has no attribute '__enter__'
 getattr(bz2.BZ2File, '__exit__')
AttributeError: type object 'bz2.BZ2File' has no attribute '__exit__'


$ dpkg -l python2.6
ii  python2.62.6.5-1ubuntu6 An interactive hig...
$ dpkg -L python2.6 | grep bz2.so
/usr/lib/python2.6/lib-dynload/bz2.so

--
components: Extension Modules
messages: 104817
nosy: Matt.Wartell
priority: normal
severity: normal
status: open
title: bz2.BZ2File should support with protocol per PEP 343
type: behavior
versions: Python 2.6

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



[issue8602] documentation of bz2 module mildly erroneous

2010-05-03 Thread Matt Wartell

New submission from Matt Wartell matt.wartell...@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: d...@python
components: Documentation
messages: 104818
nosy: Matt.Wartell, d...@python
priority: normal
severity: normal
status: open
title: documentation of bz2 module mildly erroneous
type: behavior
versions: Python 2.6

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



[issue8601] bz2.BZ2File should support with protocol per PEP 343

2010-05-03 Thread Matt Wartell

Matt Wartell matt.wartell...@gmail.com added the comment:

cross referenced with documentation issue http://bugs.python.org/issue8602 
documentation of bz2 module mildly erroneous

--

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



[issue8601] bz2.BZ2File should support with protocol per PEP 343

2010-05-03 Thread Matt Wartell

Matt Wartell matt.wartell...@gmail.com added the comment:

Sorry for the dup, and thanks for the patch. 

My patch for Module/bz2module.c was almost done - I learned a lot in the 
process, but foremost to check better for dups, first ;)

--

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



[issue8562] hasattr(open, 'newlines') example gives incorrect results from PEP0278

2010-04-28 Thread Matt Wartell

Changes by Matt Wartell matt.wartell...@gmail.com:


--
nosy: +Matt.Wartell

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