Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Lowercase SQL 'insert' for Turkish locale

Python issue 13099 means that we can't get the last row ID after a capitalised
'INSERT' to an sqlite3 database, if the locale is set to Turkish. This should
be fixed in Python 2.7.3 and 3.2.3, but in the meantime, lowercase insert
should be fine.
  • Loading branch information...
commit a7f24ab921a39ec12cc3f15fc64c41508968d4af 1 parent fcafc40
@takluyver takluyver authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 IPython/core/
6 IPython/core/
@@ -152,7 +152,11 @@ def new_session(self, conn=None):
conn = self.db
with conn:
- cur = conn.execute("""INSERT INTO sessions VALUES (NULL, ?, NULL,
+ # N.B. 'insert into' here is lower case because of a bug in the
+ # sqlite3 module that affects the Turkish locale. This should be
+ # fixed for Python 2.7.3 and 3.2.3, as well as 3.3 onwards.
+ #
+ cur = conn.execute("""insert into sessions VALUES (NULL, ?, NULL,
NULL, "") """, (,))
self.session_number = cur.lastrowid
Please sign in to comment.
Something went wrong with that request. Please try again.