[Django] #27103: GDAL driver ensure_registered should check counts separately

8 views
Skip to first unread message

Django

unread,
Aug 22, 2016, 8:02:34 AM8/22/16
to django-...@googlegroups.com
#27103: GDAL driver ensure_registered should check counts separately
----------------------------+--------------------
Reporter: dracos | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: 1.10
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 0 | UI/UX: 0
----------------------------+--------------------
It is possible for external code to register some of the drivers, and then
Django code will die because it expects them all to have been registered.
For example, on a standard Debian box (wheezy or jessie), the following
code works fine:

from django.contrib.gis.gdal import DataSource
ds = DataSource('/home/matthew/data.shp')

whilst the following code dies saying the file could not be loaded:

from osgeo import gdal
from django.contrib.gis.gdal import DataSource
ds = DataSource('/home/matthew/data.shp')

This is because the osgeo import has registered the raster drivers, but
not the data source ones, and yet Django's ensure_registered will only try
and register both if the overall count is zero.

--
Ticket URL: <https://code.djangoproject.com/ticket/27103>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 22, 2016, 8:47:03 AM8/22/16
to django-...@googlegroups.com
#27103: GDAL driver ensure_registered should check counts separately
------------------------+------------------------------------

Reporter: dracos | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
------------------------+------------------------------------
Changes (by timgraham):

* needs_better_patch: => 0
* stage: Unreviewed => Accepted
* needs_tests: => 1
* needs_docs: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/27103#comment:1>

Django

unread,
Aug 23, 2016, 5:30:51 PM8/23/16
to django-...@googlegroups.com
#27103: GDAL driver ensure_registered should check counts separately
------------------------+------------------------------------
Reporter: dracos | Owner: nobody
Type: Bug | Status: closed
Component: GIS | Version: 1.10
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------+------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"fb951fb0c58e80dc6156a77fb0498272d5e77a66" fb951fb0]:
{{{
#!CommitTicketReference repository=""
revision="fb951fb0c58e80dc6156a77fb0498272d5e77a66"
Fixed #27103 -- Registered vcapi/rcapi GDAL prototypes based on their own
drivers.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27103#comment:2>

Reply all
Reply to author
Forward
0 new messages