[issue10589] I/O ABC docs should specify which methods have implementations

2012-12-06 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Fixed in a58204570a7c, 3cb85250a0a3, 93742b046519.

--
assignee: stutzbach - asvetlov
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

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



[issue10589] I/O ABC docs should specify which methods have implementations

2012-11-30 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Updated the patch. Is it ok now?

--
nosy: +asvetlov
Added file: http://bugs.python.org/file28166/issue10589.diff

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



[issue10589] I/O ABC docs should specify which methods have implementations

2012-11-08 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
stage: needs patch - patch review
versions: +Python 3.3, Python 3.4

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



[issue10589] I/O ABC docs should specify which methods have implementations

2010-12-01 Thread Daniel Urban

Changes by Daniel Urban urban.dani...@gmail.com:


--
nosy: +durban

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



[issue10589] I/O ABC docs should specify which methods have implementations

2010-11-30 Thread Daniel Stutzbach

New submission from Daniel Stutzbach stutzb...@google.com:

The I/O ABC documentation has a blanket disclaimer at the top:

The abstract base classes also provide default implementations of some 
methods in order to help implementation of concrete stream classes. For 
example, BufferedIOBase provides unoptimized implementations of readinto() and 
readline().

Which effectively means that to subclass one of them requires digging into 
Lib/_pyio.py to figure out which methods provide useful implementations.

It would be handy to have a table, similar to the one for the collections ABCs 
[1], that spells out which methods are provided.

[1]: 
http://docs.python.org/py3k/library/collections.html#abcs-abstract-base-classes

I hope to have a patch ready sometime within the next week.

--
assignee: stutzbach
components: Documentation
messages: 122930
nosy: stutzbach
priority: normal
severity: normal
stage: needs patch
status: open
title: I/O ABC docs should specify which methods have implementations
type: feature request
versions: Python 3.2

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



[issue10589] I/O ABC docs should specify which methods have implementations

2010-11-30 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +pitrou

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



[issue10589] I/O ABC docs should specify which methods have implementations

2010-11-30 Thread Daniel Stutzbach

Daniel Stutzbach stutzb...@google.com added the comment:

+io and doc people

Attached is a simple patch to add a table to the documentation summarizing the 
I/O ABCs.

--
keywords: +patch
nosy: +benjamin.peterson, ezio.melotti, georg.brandl
Added file: http://bugs.python.org/file19885/io-abc.diff

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



[issue10589] I/O ABC docs should specify which methods have implementations

2010-11-30 Thread Fred L. Drake, Jr.

Changes by Fred L. Drake, Jr. fdr...@acm.org:


--
nosy: +d...@python, fdrake

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



[issue10589] I/O ABC docs should specify which methods have implementations

2010-11-30 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

What does unsupported mean? Abstract would look more exact.

--

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



[issue10589] I/O ABC docs should specify which methods have implementations

2010-11-30 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Not sure what unsupported methods means.  E.g. readinto is listed as 
provided by RawIOBase in the doc text.

--

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



[issue10589] I/O ABC docs should specify which methods have implementations

2010-11-30 Thread Daniel Stutzbach

Daniel Stutzbach stutzb...@google.com added the comment:

 What does unsupported mean? Abstract would look more exact.

It means they raise io.UnsupportedOperation when called (unless the subclass 
overrides them to do something else).  

They are not marked with @abstractmethod, so Abstract would be wrong.

It should be a bit more clear in context.  Here's a link to the point in the 
documentation where the table would fit:
http://docs.python.org/dev/py3k/library/io.html#class-hierarchy

The most relevant bit is: implementations are allowed to raise 
UnsupportedOperation if they do not support a given operation.

 E.g. readinto is listed as provided by RawIOBase in the doc text.

The doc text describes the API.  That is, it describes what the readinto method 
should do if a subclass of RawIOBase decides to implement it.  The existing 
text doesn't contain any clues as to which methods contain useful 
implementations versus which will raise io.UnsupportedOperation if not 
overridden.  Hence the need for the table.

--

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



[issue10589] I/O ABC docs should specify which methods have implementations

2010-11-30 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

  What does unsupported mean? Abstract would look more exact.
 
 It means they raise io.UnsupportedOperation when called (unless the
 subclass overrides them to do something else).  
 
 They are not marked with @abstractmethod, so Abstract would be
 wrong.

Except that unsupported is even more wrong, because it makes it look
like that these methods are not supported by the respective ABCs.
Actually, what happens is that the default implementations are stubs. If
those methods weren't supported at all they wouldn't be defined in the
first place.

--

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



[issue10589] I/O ABC docs should specify which methods have implementations

2010-11-30 Thread Daniel Stutzbach

Daniel Stutzbach stutzb...@google.com added the comment:

Other suggestions for a better name for that column are certainly welcome. :-)

Stub Methods?

--

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



[issue10589] I/O ABC docs should specify which methods have implementations

2010-11-30 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 Other suggestions for a better name for that column are certainly welcome. :-)
 
 Stub Methods?

Fine with me.

--

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