Author: Matti Picus <matti.pi...@gmail.com> Branch: py3.5 Changeset: r92845:7d0732ed45b9 Date: 2017-10-25 15:53 +0300 http://bitbucket.org/pypy/pypy/changeset/7d0732ed45b9/
Log: merge default into py3.5 diff --git a/lib_pypy/_sqlite3.py b/lib_pypy/_sqlite3.py --- a/lib_pypy/_sqlite3.py +++ b/lib_pypy/_sqlite3.py @@ -1080,7 +1080,7 @@ if '\0' in sql: raise ValueError("the query contains a null character") - first_word = sql.lstrip().split(" ")[0].upper() + first_word = sql.lstrip().split()[0].upper() if first_word == "": self._type = _STMT_TYPE_INVALID elif first_word == "SELECT": diff --git a/pypy/module/test_lib_pypy/test_sqlite3.py b/pypy/module/test_lib_pypy/test_sqlite3.py --- a/pypy/module/test_lib_pypy/test_sqlite3.py +++ b/pypy/module/test_lib_pypy/test_sqlite3.py @@ -228,6 +228,14 @@ cur.execute("create table test(a)") cur.executemany("insert into test values (?)", [[1], [2], [3]]) assert cur.lastrowid is None + # issue 2682 + cur.execute('''insert + into test + values (?) + ''', (1, )) + assert cur.lastrowid is not None + cur.execute('''insert\t into test values (?) ''', (1, )) + assert cur.lastrowid is not None def test_authorizer_bad_value(self, con): def authorizer_cb(action, arg1, arg2, dbname, source): _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit