#27448: GIS distance queries use deprecated ST_distance_sphere
-------------------------------------+-------------------------------------
     Reporter:  Christian von        |                    Owner:  Mjumbe
  Roques                             |  Poe
         Type:                       |                   Status:  assigned
  Cleanup/optimization               |
    Component:  GIS                  |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:  GIS distance         |             Triage Stage:  Accepted
  deprecated ST_distance_sphere      |
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Christian von Roques):

 I've added a test to the test-suite to check the PostGIS version dependent
 behaviour.

 However, my first concise implementation evaluates `spatial_version` in
 `PostGISOperations.__init__`, which in turn evaluates an SQL-query, which
 confuses quite a few of Django's tests (e.g.
 `backends.tests.PostgreSQLTests.test_nodb_connection`). To appease the
 test-suite I modified my implementation to defer evaluation of
 `spatial_version` using `@cached_property`, which works, but is quite a
 bit larger. — My branch
 https://github.com/roques/django/tree/postgis22_deprecated contains both,
 the nice and the deferred/lazy implementation.

 What is the policy for cases like this?

--
Ticket URL: <https://code.djangoproject.com/ticket/27448#comment:8>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.67256df2358c325f52fef684a90da8c7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to