[pypy-commit] pypy default: sqlite3.connect(): use the same order of parameters and same defaults as CPython
amauryfa
noreply at buildbot.pypy.org
Tue Jun 14 01:28:04 CEST 2011
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch:
Changeset: r44919:fedb082d0040
Date: 2011-06-14 01:30 +0200
http://bitbucket.org/pypy/pypy/changeset/fedb082d0040/
Log: sqlite3.connect(): use the same order of parameters and same
defaults as CPython
diff --git a/lib_pypy/_sqlite3.py b/lib_pypy/_sqlite3.py
--- a/lib_pypy/_sqlite3.py
+++ b/lib_pypy/_sqlite3.py
@@ -275,8 +275,8 @@
return unicode(x, 'utf-8')
class Connection(object):
- def __init__(self, database, isolation_level="", detect_types=0, timeout=None,
- check_same_thread=True, cached_statements=None, factory=None):
+ def __init__(self, database, timeout=5.0, detect_types=0, isolation_level="",
+ check_same_thread=True, factory=None, cached_statements=100):
self.db = c_void_p()
if sqlite.sqlite3_open(database, byref(self.db)) != SQLITE_OK:
raise OperationalError("Could not open database")
More information about the pypy-commit
mailing list