[issue13491] Fixes for sqlite3 doc
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset d2cf730de195 by Petri Lehtinen in branch '2.7': sqlite3: Port relevant documentation changes from 3.2 http://hg.python.org/cpython/rev/d2cf730de195 New changeset 5f492397ccb8 by Petri Lehtinen in branch '3.2': sqlite3: Port documentation changes from the 2.7 branch http://hg.python.org/cpython/rev/5f492397ccb8 New changeset 82032c64dd89 by Petri Lehtinen in branch 'default': Merge branch '3.2' http://hg.python.org/cpython/rev/82032c64dd89 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13491 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13491] Fixes for sqlite3 doc
Petri Lehtinen pe...@digip.org added the comment: All patches applied, thanks everybody! -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13491 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13491] Fixes for sqlite3 doc
Petri Lehtinen pe...@digip.org added the comment: Both patches look good to me. The text_factory example is OK on 2.7 because the OptimizedUnicode flag works correctly there. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13491 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13491] Fixes for sqlite3 doc
Changes by Éric Araujo mer...@netwok.org: -- assignee: docs@python - petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13491 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13491] Fixes for sqlite3 doc
Éric Araujo mer...@netwok.org added the comment: Here’s a patch for 2.7. I haven’t changed the text_factory example. The second patch is for 3.2 and contains a few additional changes that I did in my first patch. -- Added file: http://bugs.python.org/file24634/sqlite-doc-tweaks-2.7.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13491 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13491] Fixes for sqlite3 doc
Changes by Éric Araujo mer...@netwok.org: Added file: http://bugs.python.org/file24635/sqlite-doc-tweaks-3.2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13491 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13491] Fixes for sqlite3 doc
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 9eb77d455be1 by Petri Lehtinen in branch '3.2': Issue #13491: Fix many errors in sqlite3 documentation http://hg.python.org/cpython/rev/9eb77d455be1 New changeset ba5b337ecc27 by Petri Lehtinen in branch 'default': Merge branch '3.2' http://hg.python.org/cpython/rev/ba5b337ecc27 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13491 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13491] Fixes for sqlite3 doc
Petri Lehtinen pe...@digip.org added the comment: Éric: You can make a patch for 2.7 if you want to, I left the issue open. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13491 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13491] Fixes for sqlite3 doc
Éric Araujo mer...@netwok.org added the comment: I think you can commit your patch, with our without merging execute_[12].py, as you think best. Then you can do other patches (with or without pre-commit review) to fix or clean up the examples. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13491 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13491] Fixes for sqlite3 doc
Petri Lehtinen pe...@digip.org added the comment: In the Doc/includes/sqlite3 directory there are still some scripts that require the createdb.py, so I didn't nuke the file. Do these scripts (or a README file) explain about createdb.py? No. There's no mention of createdb.py anywhere. I also removed the strange The arguments to :meth:`executescript` must be :func:`bytes` objects sentence from the patch. I assume it was a mistake, as it's wrong. Why not change it so that it’s correct? (Maybe looking at the file history would show where the mistake comes from.) It's just not in the history, it was only in OP's patch. And it's wrong, as executescript() takes an str argument, not bytes. Having slept over this, I think execute_1.py and execute_2.py should be merged as one file, as after my patch, execute_2.py would not be runnable by itself. This would also be a good chance to look at all the examples and have them cleaned up. That could also be a separate patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13491 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13491] Fixes for sqlite3 doc
Éric Araujo mer...@netwok.org added the comment: No examples included in the documentation now require createdb.py to be run. Cool! These fixes should make it to 2.7 too; I can propose a patch if you don’t want to backport yourself. In the Doc/includes/sqlite3 directory there are still some scripts that require the createdb.py, so I didn't nuke the file. Do these scripts (or a README file) explain about createdb.py? I also removed the strange The arguments to :meth:`executescript` must be :func:`bytes` objects sentence from the patch. I assume it was a mistake, as it's wrong. Why not change it so that it’s correct? (Maybe looking at the file history would show where the mistake comes from.) Ah, and I added a working example of a custom text_factory function Nice. -- versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13491 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13491] Fixes for sqlite3 doc
Petri Lehtinen pe...@digip.org added the comment: Attaching an updated patch with the following changes: - Updated to apply on current default branch - No examples included in the documentation now require createdb.py to be run. There were only three examples that required it, but these were refactored a bit. In the Doc/includes/sqlite3 directory there are still some scripts that require the createdb.py, so I didn't nuke the file. - I also removed the strange The arguments to :meth:`executescript` must be :func:`bytes` objects sentence from the patch. I assume it was a mistake, as it's wrong. -- Added file: http://bugs.python.org/file24469/sqlite_code_update_v3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13491 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13491] Fixes for sqlite3 doc
Petri Lehtinen pe...@digip.org added the comment: Ah, and I added a working example of a custom text_factory function to Doc/includes/sqlite3/text_factory.py, too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13491 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13491] Fixes for sqlite3 doc
Éric Araujo mer...@netwok.org added the comment: The updated patch looks good, I’ll commit it soon. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13491 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13491] Fixes for sqlite3 doc
Nebelhom nebel...@googlemail.com added the comment: Hi, thanks for your help and support, mate. Unfortunately, no word about the createdb.py business (the last bullet point on the list) and whether it should be referred to in the doc. Should we just drop this from the adjustments? Thanks. Johannes P.S. Any suggestions where to look in the doc next until your packaging patch is ready for reviewing? On Mon, Dec 5, 2011 at 4:50 PM, Éric Araujo rep...@bugs.python.org wrote: Éric Araujo mer...@netwok.org added the comment: The updated patch looks good, I’ll commit it soon. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13491 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13491 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13491] Fixes for sqlite3 doc
Éric Araujo mer...@netwok.org added the comment: Unfortunately, no word about the createdb.py business (the last bullet point on the list) and whether it should be referred to in the doc. If you make the whitespace more standard, use the tempfile module (to remove the os.remove line) and use with statements, the file is actually very short (so my earlier hypothesis about createdb was wrong :). I think we could inline it (with a literalinclude directive) or link to it (with :source:`Doc/include/sqlite3/createdb.py`). Add something like “If you want to run these examples, run this code to create and populate the initial database” and we’re set. -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13491 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13491] Fixes for sqlite3 doc
Changes by Nebelhom nebel...@googlemail.com: Added file: http://bugs.python.org/file23823/sqlite_code_update.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13491 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13491] Fixes for sqlite3 doc
Éric Araujo mer...@netwok.org added the comment: It is very helpful that you review the docs. Some obvious fixes were made when moving to Python 3 (print, etc.) but apparently the examples were not run. Sphinx can let us run the code blocks in reST files as doctests, but it is currently not done because the docs are built with a Python 2 version. I have reviewed your patch on our code review tool; I did not check your message (a patch is much easier :). I feel these should be standalone examples out of the box. the sqlite3 includes have a createdb.py file which would create the tables but it is not referenced in the documenta[tion]. I do not know the reasoning behind this, but I would like to have standalone examples in these cases. I think the examples do not stand alone because their author wanted to create and populate a database with many entries, to demonstrate querying, and it was easier to write one script once than to either clutter the examples with long table creation code or having examples with so few rows that it would not be realistic/interesting. To help people wanting to run the examples in the docs, we could explain that createdb.py needs to be run first. The createdb script and other sqlite3 doc examples were added when sqlite3 was added in Python 2.5; I’m adding the module author and then-doc lead (hi Gerhard and Fred), maybe they can shed more light on this. -- nosy: +eric.araujo, fdrake, ghaering, petri.lehtinen title: sqlite3 code adjustments - Fixes for sqlite3 doc versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13491 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com