[Django] #22334: Postgis version check discards dev versions

5 views
Skip to first unread message

Django

unread,
Mar 25, 2014, 11:49:26 AM3/25/14
to django-...@googlegroups.com
#22334: Postgis version check discards dev versions
-------------------------------+--------------------
Reporter: xowap | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 1.6
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
After installing a dev version of Postgis, I noticed that my Django app
started to throw {{{ django.core.exceptions.ImproperlyConfigured: Cannot
determine PostGIS version for database "gmp". GeoDjango requires at least
PostGIS version 1.3. Was the database created from a spatial database
template? }}}

Actually the version check regular expression did only accept regular
version numbers (like 2.1.0) but not development version numbers
(2.2.0dev).

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

Django

unread,
Mar 25, 2014, 11:51:09 AM3/25/14
to django-...@googlegroups.com
#22334: Postgis version check discards dev versions
-------------------------------+--------------------------------------

Reporter: xowap | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 1.6
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

Sent PR https://github.com/django/django/pull/2476

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

Django

unread,
Mar 25, 2014, 12:19:27 PM3/25/14
to django-...@googlegroups.com
#22334: Postgis version check discards dev versions
------------------------+------------------------------------

Reporter: xowap | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: 1.6
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1

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

* needs_better_patch: 0 => 1
* component: Uncategorized => GIS
* needs_tests: 0 => 1
* stage: Unreviewed => Accepted


Comment:

This seems sensible to me, the only thing that is missing is a test for
the newly supported behaviour. Could you add that to your PR?

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

Django

unread,
Mar 27, 2014, 8:03:22 AM3/27/14
to django-...@googlegroups.com
#22334: Postgis version check discards dev versions
------------------------+------------------------------------

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

Easy pickings: 0 | UI/UX: 0
------------------------+------------------------------------

Comment (by xowap):

Sure I will do.

I looked into it, however I could not find a proper place to put them.
Would you have a recommendation to make on this subject?

--
Ticket URL: <https://code.djangoproject.com/ticket/22334#comment:3>

Django

unread,
Mar 28, 2014, 3:38:42 AM3/28/14
to django-...@googlegroups.com
#22334: Postgis version check discards dev versions
------------------------+------------------------------------

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

Easy pickings: 0 | UI/UX: 0
------------------------+------------------------------------

Comment (by claudep):

Indeed. Feel free to create a new django/contrib/gis/tests/tests.py file.

--
Ticket URL: <https://code.djangoproject.com/ticket/22334#comment:4>

Django

unread,
Mar 28, 2014, 8:40:46 AM3/28/14
to django-...@googlegroups.com
#22334: Postgis version check discards dev versions
------------------------+------------------------------------

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

Easy pickings: 0 | UI/UX: 0
------------------------+------------------------------------

Comment (by anonymous):

Hum, this is embarrassing: while writing the tests, I discovered that I
could not reproduce the bug on the unpatched code. Indeed, there is no $
at the end of the regexp.

I have no idea of how writing this patch turned the DB connection from
"not working" to "working", but it wasn't probably correlated that much.

However, I wrote and pushed some unit tests, in case you want to keep them
anyway.

--
Ticket URL: <https://code.djangoproject.com/ticket/22334#comment:5>

Django

unread,
Mar 29, 2014, 11:03:18 AM3/29/14
to django-...@googlegroups.com
#22334: Postgis version check discards dev versions
------------------------+------------------------------------

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

Easy pickings: 0 | UI/UX: 0
------------------------+------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"88f1e3d93d8f48a302ff75b1936e471c4a52fff9"]:
{{{
#!CommitTicketReference repository=""
revision="88f1e3d93d8f48a302ff75b1936e471c4a52fff9"
Unit testing Postgis version check

Refs #22334.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22334#comment:6>

Django

unread,
Mar 29, 2014, 11:03:49 AM3/29/14
to django-...@googlegroups.com
#22334: Postgis version check discards dev versions
------------------------+--------------------------------------
Reporter: xowap | Owner: nobody
Type: Bug | Status: closed
Component: GIS | Version: 1.6
Severity: Normal | Resolution: worksforme

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1

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

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


Comment:

Thanks for the tests!

--
Ticket URL: <https://code.djangoproject.com/ticket/22334#comment:7>

Django

unread,
Mar 29, 2014, 2:27:06 PM3/29/14
to django-...@googlegroups.com
#22334: Postgis version check discards dev versions
------------------------+--------------------------------------
Reporter: xowap | Owner: nobody

Type: Bug | Status: closed
Component: GIS | Version: 1.6
Severity: Normal | Resolution: worksforme
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
------------------------+--------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"e819a3cd622fe9404b1f5ea7891906c4cdabbb12"]:
{{{
#!CommitTicketReference repository=""
revision="e819a3cd622fe9404b1f5ea7891906c4cdabbb12"
Skipped PostGIS version tests when psycopg2 not installed

Refs #22334. Thanks Tim Graham for spotting the issue.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22334#comment:8>

Reply all
Reply to author
Forward
0 new messages