After a bit of work to minimize the cases where sqlparse would be a required at runtime for SQLite to AddConstraint/RemoveConstraint operations [0] I came to the conclusion that it would make more sense to make sqlparse an hard dependency of Django 2.2.
The two reasons backing this conclusions are
1. Given we run the suite with sqlparse
installed on CI it will be really hard to prevent inadvertently breaking the promise of a soft dependency on sqlparse
for Meta.constraints
only. I guess we could have a daily CI job but that would quickly get out of hand once we have to perform backport and such.
2. There's a few instances of fragile regex parsing that could be made more reliable if sqlparse
was an hard dependency for SQLite
. Two examples are
Given the transition to require pytz in Django 1.11 went smoothly and our needs for sqlparse are similar to provide a solid experience on SQLite I'd be +1 on requiring it from Django 2.2 to a point where the lowest version of SQLite we support has better introspection capabilities.
Simon