Running the test suite with the latest version of sqlite "3.8.9" gives the following error. The way sqlite brings back constraints change between the two versions.
ERROR: test_unique_together_meta (inspectdb.tests.InspectDBTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/sthompso/PycharmProjects/django/tests/inspectdb/tests.py", line 225, in test_unique_together_meta
stdout=out)
File "/Users/sthompso/PycharmProjects/django/django/core/management/__init__.py", line 118, in call_command
return command.execute(*args, **defaults)
File "/Users/sthompso/PycharmProjects/django/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/Users/sthompso/PycharmProjects/django/django/core/management/commands/inspectdb.py", line 25, in handle
for line in self.handle_inspection(options):
File "/Users/sthompso/PycharmProjects/django/django/core/management/commands/inspectdb.py", line 69, in handle_inspection
constraints = connection.introspection.get_constraints(cursor, table_name)
File "/Users/sthompso/PycharmProjects/django/django/db/backends/sqlite3/introspection.py", line 242, in get_constraints
for number, index, unique in cursor.fetchall():
ValueError: too many values to unpack
It appears that database.index_list() in sqlite3 has changed:
Current documentation for the latest release 3.8.9:
http://www.sqlite.org/pragma.html#pragma_index_list
Older documentation (don't know which version exactly but shows what Django is relying on):
https://www.safaribooksonline.com/library/view/using-sqlite/9781449394592/re183.html