#35387: Django's Spatialite backend throws errors with Spatialite 5.0.1
-------------------------------------+-------------------------------------
     Reporter:  Nikolas N            |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  5.0
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  duplicate
     Keywords:  spatialite           |             Triage Stage:
                                     |  Unreviewed
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):

 * cc: David Smith (removed)
 * easy:  1 => 0
 * resolution:   => duplicate
 * status:  new => closed

Comment:

 Nikolas, I missed an important detail from the other Django ticket that
 you linked (#32935). Thank you Sarah for pointing this out! And sorry
 David for the unnecessary CC.

 As per the conversation in #32935, this has been discussed and is not an
 issue with Django and is instead, an issue with sqlite3 v.3.36+
 compatibility with Spatialite 5.0.1 when not compiled with
 `-DSQLITE_ALLOW_ROWID_IN_VIEW` option.

 Django is using `InitSpatialMetaDataFull` in 5.0 [https://www.gaia-
 gis.it/fossil/libspatialite/info/2ab2aeb5d1c9a0458b64b8afd4be4ce7527b059c
 as per the docs for 5.0], specifically

     Please remember that now in SpatiaLite-5.0.0 InitSpatialMetaDataFull
 represents the preferred method for creating all metadata tables required
 by this version.
     InitSpatialMetaData is still maintained so to not break historical
 compatibility, but should no longer be used.

 Some workarounds have been discussed, including downgrading to Spatialite
 4.2, upgrade to 5.1, or recomplie sqlite with the flag above.
 This is a good discussion on the issue: https://groups.google.com/g
 /spatialite-users/c/SnNZt4AGm_o

 It seems that the people most impacted are using Ubuntu 22.04 which has
 this troubling combination of sqlite and spatialite but Ubuntu 24.04 will
 be released soon in a week and uses spatialite 5.1.

 In summary, Django would not be incorporating a workaround such as the one
 proposed. We might be able to accept a patch that resolves this
 compatibility issue ONLY if that doesn't go against official doc
 recommendations. But also please consider that any patch for Django would
 be targeting Django 5.1 to be released (at the earliest) in August. I
 don't think anyone should rely on a patch to Django to solve this issue
 for them.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35387#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018ef18df7bc-5ec1019e-f696-4ff6-af6f-aa63c0716905-000000%40eu-central-1.amazonses.com.

Reply via email to