[issue8129] Wrong arguments in sqlite3.connect() documentation

2010-07-29 Thread STINNER Victor

STINNER Victor  added the comment:

I was trying to fix but, but... oh! Georg fixed that 2 weeks ago (r82763). 
Thank you!

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue8129] Wrong arguments in sqlite3.connect() documentation

2010-03-13 Thread Florent Xicluna

Changes by Florent Xicluna :


--
priority:  -> normal
stage:  -> needs patch

___
Python tracker 

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



[issue8129] Wrong arguments in sqlite3.connect() documentation

2010-03-12 Thread STINNER Victor

New submission from STINNER Victor :

Python documentation has the prototype:

sqlite3.connect(database[, timeout, isolation_level, detect_types, factory])

http://docs.python.org/library/sqlite3.html#sqlite3.connect

Source code:

 - sqlite.rst: .. function:: connect(database[, timeout, isolation_level, 
detect_types, factory])
 - connect() documentation: connect(database[, 
timeout, isolation_level, detect_types, factory])
 - module_connect(): char *kwlist[] = {"database", "timeout", "detect_types", 
"isolation_level", "check_same_thread", "factory", "cached_statements", NULL, 
NULL};
 - pysqlite_connection_init(): char *kwlist[] = {"database", "timeout", 
"detect_types", "isolation_level", "check_same_thread", "factory", 
"cached_statements", NULL, NULL};

module_connect() and pysqlite_connection_init() use the same keyword list, but 
the documentation invert arguments detect_types and isolation_level, and miss 
check_same_thread and cached_statements arguments.

--

Example:

>>> import sqlite3
>>> con=sqlite3.connect(':memory:', 2.0, 'DEFER')
Traceback (most recent call last):
  File "", line 1, in 
TypeError: an integer is required
>>> con=sqlite3.connect(':memory:', 2.0, True)
>>> con=sqlite3.connect(':memory:', 2.0, isolation_level='DEFER')

The third argument is a boolean, it's the detect_types option (not the 
isolation level, a string).

--
assignee: georg.brandl
components: Documentation
messages: 100987
nosy: georg.brandl, haypo
severity: normal
status: open
title: Wrong arguments in sqlite3.connect() documentation
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

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