I'm fine with adding it as a dependency, my experience has been that it's a
stable, well-maintained package over the past few years I've used it.

On Sun, 28 Oct 2018 at 05:00, charettes <charett...@gmail.com> wrote:

> 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
>  -
> https://github.com/django/django/blob/f892781b957f674806a227a10c58768f66a48c07/django/db/backends/sqlite3/introspection.py#L90-L146
>  -
> https://github.com/django/django/blob/f892781b957f674806a227a10c58768f66a48c07/django/db/backends/sqlite3/schema.py#L91-L127
>
> 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
>
> [0] https://github.com/django/django/pull/10572
>
> Le mercredi 10 octobre 2018 14:53:53 UTC-4, Tim Graham a écrit :
>>
>> sqlparse is already installed as part of Django's tests. The question is
>> whether sqlparse should be mandatory for SQLite users (i.e. when getting
>> started with a new project an error message will say, "You must install
>> sqlparse to use SQLite" (I don't think there's a way to install it
>> automatically unless we install it for all users, regardless of database)
>> or if we should try to make it optional and only raise an error if a
>> project's migrations require it.
>>
>> The question is "what percentage of SQLite projects are going to end up
>> needing sqlparse based on their migrations? If it's high enough, it might
>> make for a better user experience to have users install it when they're
>> getting started instead of a lazy error when get_constraints() is
>> called."
>>
>> On Monday, October 8, 2018 at 3:22:32 AM UTC-4, Andrew Godwin wrote:
>>>
>>> Adding sqlparse into the introspection code for SQLite specifically
>>> means it's going to be a runtime dependency for anything to do with
>>> migrations.
>>>
>>> I'm alright having that be the case, but I do think we should make sure
>>> the tests run with SQLite as otherwise a large section of the most
>>> complicated code in migrations won't be tested properly.
>>>
>>> Andrew
>>>
>>>
>>> On Mon, 8 Oct 2018, 00:59 Ian Foote, <i...@feete.org> wrote:
>>>
>>>> Hi all,
>>>>
>>>> On my pull request (https://github.com/django/django/pull/10406)
>>>> refactoring how Django creates database constraints I introduced a
>>>> dependency on sqlparse in the sqlite introspection code. This allows Django
>>>> to correctly read information about constraints on sqlite, particularly the
>>>> name.
>>>>
>>>> When reviewing (
>>>> https://github.com/django/django/pull/10406#issuecomment-424542217)
>>>> Tim Graham raised the question of whether we should make sqlparse a
>>>> mandatory requirement for the sqlite tests or if we should skip those tests
>>>> that require it. In later discussion (
>>>> https://github.com/django/django/pull/10406#issuecomment-427362983),
>>>> Tim raised the point that the introspection code is used by migrations.
>>>>
>>>> I'm not clear myself what the best route forwards here is, so I'm
>>>> bringing it to Django Developers for discussion (as Tim suggested).
>>>>
>>>> Thanks,
>>>> Ian
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Django developers (Contributions to Django itself)" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to django-develop...@googlegroups.com.
>>>> To post to this group, send email to django-d...@googlegroups.com.
>>>> Visit this group at https://groups.google.com/group/django-developers.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/django-developers/CAFv-zfKadOeWit8M6GMmx4H2ChUCU6u%3DscHX8F7oBKJkHRbuVg%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-developers/CAFv-zfKadOeWit8M6GMmx4H2ChUCU6u%3DscHX8F7oBKJkHRbuVg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-developers@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/6129880a-837b-4b9d-b22d-edbe1c0e1a6a%40googlegroups.com
> <https://groups.google.com/d/msgid/django-developers/6129880a-837b-4b9d-b22d-edbe1c0e1a6a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Adam

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAMyDDM2v25xTqczJBvWn9%2BP2ZzWxchgfAx-L66x8zwX3ydC3vg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to