#36441: Add lazy loading support for GDAL library in `django.contrib.gis.gdal`
-------------------------------------+-------------------------------------
     Reporter:  Josh Thomas          |                    Owner:  Josh
         Type:                       |  Thomas
  Cleanup/optimization               |                   Status:  assigned
    Component:  GIS                  |                  Version:  dev
     Severity:  Normal               |               Resolution:
     Keywords:  gdal                 |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Josh Thomas):

 I'm not opposed to a system check. I can see the value from an API
 stability perspective if people have been relying on eager failure to
 catch misconfigurations. (Though I gotta admit it makes me think a little
 bit of [https://xkcd.com/1172 this XKCD] 😆.)

 GEOS has been lazy-loaded for ~10 years without a check, meaning
 misconfigured GEOS installations have only been caught at runtime when
 geometry fields are actually used and I haven’t really seen complaints
 about that (though maybe I’ve just missed them!).

 The question is: is a check needed because GDAL genuinely needs different
 treatment than GEOS, or is this just noticing the gap while touching GDAL
 code? I admit my ignorance on the details on the differences between the
 two libraries here.

 What would be the preference?

 1. Add it to `BaseSpatialField` which would check both GEOS + GDAL
 2. Add it to `RasterField` only, which uses GDAL but not GEOS, and would
 more mirror the Pillow/`ImageField` pattern
 3. Do nothing and let GDAL follow the same lazy pattern as GEOS
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36441#comment:12>
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/01070199f42a1b75-ea835bf8-80d2-423c-9e22-94a3b651f986-000000%40eu-central-1.amazonses.com.

Reply via email to