This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Documentation lacking for the sqlite3 module.
Type: Stage:
Components: Extension Modules Versions: Python 3.0, Python 2.6, Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, christian.heimes, georg.brandl, jarpa, pmawhorter
Priority: normal Keywords: easy

Created on 2007-11-28 02:10 by pmawhorter, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
sqlite3_docs_26.diff jarpa, 2008-01-19 19:13 Documentation on sqlite3 Cursor.fetchXXX() methods
sqlite3_docstrings_26.diff jarpa, 2008-01-19 19:14 Fixed sqlite3 Cursor.fetchXXX() methods docstrings for Python 2.6
sqlite3_docstrings_25.diff jarpa, 2008-01-19 19:40 Fixed sqlite3 Cursor.fetchXXX() methods docstrings for Python 2.5
sqlite3_docs_25.diff jarpa, 2008-01-19 21:59 Documentation on sqlite3 Cursor.fetchXXX() methods - Python 2.5
Messages (11)
msg57900 - (view) Author: Peter Mawhorter (pmawhorter) Date: 2007-11-28 02:10
The current documentation for the sqlite3 module on the web fails to 
make any mention of the fetch* functions posessed by the Cursor class 
of that module. It in fact gives no indication of how one should 
extract results from sql queries. The docstrings in the module (viewed 
using the help() function) are woefully incomplete, and are 
inconsistent with the function names:

 |  fetchall(...)
 |      Fetches one row from the resultset.
 |  
 |  fetchmany(...)
 |      Fetches all rows from the resultset.
 |  
 |  fetchone(...)
 |      Fetches several rows from the resultset.
 |  

Both of these things need to be fixed in order for this module to be 
useful for someone who doesn't already know how to use it.
msg57907 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-11-28 09:48
Are you able to provide a patch? Please use a snapshot or svn checkout
of 2.5 for the patch. We have a new documentation system.
msg57909 - (view) Author: Peter Mawhorter (pmawhorter) Date: 2007-11-28 10:30
I could try, but I honestly don't know exactly how the fetch*
functions work. It would probably take me a good couple of hours of
reading before I could write decent documentation, and as much as that
would be great, I'm not about to squeeze that into my college
schedule. I don't actually have a 2.5 checkout, but I thought that at
one point those methods were documented. Is there a way to check the
history of the online documentation and revert those pages?

-Peter Mawhorter

On 11/28/07, Christian Heimes <report@bugs.python.org> wrote:
>
> Christian Heimes added the comment:
>
> Are you able to provide a patch? Please use a snapshot or svn checkout
> of 2.5 for the patch. We have a new documentation system.
>
> ----------
> nosy: +tiran
>
> __________________________________
> Tracker <report@bugs.python.org>
> <http://bugs.python.org/issue1509>
> __________________________________
>
msg57910 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2007-11-28 10:37
> I thought that at one point those methods were documented

sqlite3 implements the DB-API:
http://www.python.org/dev/peps/pep-0249/
is it the documentation you had in mind?
msg57911 - (view) Author: Peter Mawhorter (pmawhorter) Date: 2007-11-28 12:17
Yes actually... the fetch documentation there is a sufficient
explanation of the functions provided. If it could be added to
docs.python.org, that would be great.

There still remains the fact that the docstrings in the sqlite3 module
don't agree with their function names, but that's a very minor issue,
and wouldn't normally impact usability of the module.

-Peter Mawhorter

On 11/28/07, Amaury Forgeot d'Arc <report@bugs.python.org> wrote:
>
> Amaury Forgeot d'Arc added the comment:
>
> > I thought that at one point those methods were documented
>
> sqlite3 implements the DB-API:
> http://www.python.org/dev/peps/pep-0249/
> is it the documentation you had in mind?
>
> ----------
> nosy: +amaury.forgeotdarc
>
> __________________________________
> Tracker <report@bugs.python.org>
> <http://bugs.python.org/issue1509>
> __________________________________
>
msg60216 - (view) Author: Jaroslav Pachola (jarpa) Date: 2008-01-19 19:13
Attaching a patch that adds fetchXXX() description to the documentation
for Python 2.6.
msg60217 - (view) Author: Jaroslav Pachola (jarpa) Date: 2008-01-19 19:14
Attaching a patch that fixes the docstrings for Python 2.6.
msg60220 - (view) Author: Jaroslav Pachola (jarpa) Date: 2008-01-19 19:40
Attaching a patch that fixes the docstrings for Python 2.5.
msg60232 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-01-19 20:53
Fixed in r60103.
msg60235 - (view) Author: Jaroslav Pachola (jarpa) Date: 2008-01-19 21:59
Attaching a patch that adds fetchXXX() description to the documentation
for Python 2.5.
msg60237 - (view) Author: Jaroslav Pachola (jarpa) Date: 2008-01-19 22:00
BTW, the first 2 patches (for Python 2.6) work also on version 3.0a2 for me.
History
Date User Action Args
2022-04-11 14:56:28adminsetgithub: 45850
2008-01-19 22:00:31jarpasetmessages: + msg60237
versions: + Python 3.0
2008-01-19 21:59:15jarpasetfiles: + sqlite3_docs_25.diff
messages: + msg60235
2008-01-19 20:53:18georg.brandlsetstatus: open -> closed
resolution: fixed
messages: + msg60232
nosy: + georg.brandl
2008-01-19 19:40:27jarpasetfiles: + sqlite3_docstrings_25.diff
messages: + msg60220
2008-01-19 19:14:54jarpasetfiles: + sqlite3_docstrings_26.diff
messages: + msg60217
2008-01-19 19:13:24jarpasetfiles: + sqlite3_docs_26.diff
nosy: + jarpa
messages: + msg60216
versions: + Python 2.6
2008-01-12 01:12:18akuchlingsetkeywords: + easy
2007-11-28 12:17:10pmawhortersetmessages: + msg57911
2007-11-28 10:37:28amaury.forgeotdarcsetnosy: + amaury.forgeotdarc
messages: + msg57910
2007-11-28 10:30:41pmawhortersetmessages: + msg57909
2007-11-28 09:48:39christian.heimessetnosy: + christian.heimes
messages: + msg57907
2007-11-28 02:10:42pmawhortercreate