[Django] #33886: GeoIP module unnecessarily requires GDAL

33 views
Skip to first unread message

Django

unread,
Aug 3, 2022, 9:37:36 AM8/3/22
to django-...@googlegroups.com
#33886: GeoIP module unnecessarily requires GDAL
-----------------------------------------+-------------------------------
Reporter: Aarni Koskela | Owner: Aarni Koskela
Type: Bug | Status: assigned
Component: GIS | Version: 4.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+-------------------------------
The commit
https://github.com/django/django/commit/31bef51d8ea5e3bf650de1495ae1f0566670b8f3
(in versions 4.1a1 forward) moved the import of
`django.contrib.gis.geos.Point` from the `def geos()` function to top-
level, with the unfortunate side-effect that importing the `GeoIP` module
now requires working GDAL libraries.

The GeoIP module should be usable without GDAL; naturally, returning a
GDAL geometry would require GDAL.

My suggested fix would be to revert the above commit; a late import should
be fine here.

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

Django

unread,
Aug 3, 2022, 9:54:52 AM8/3/22
to django-...@googlegroups.com
#33886: GeoIP module unnecessarily requires GDAL
-------------------------------+-----------------------------------------

Reporter: Aarni Koskela | Owner: Aarni Koskela
Type: Bug | Status: assigned
Component: GIS | Version: 4.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+-----------------------------------------
Changes (by Claude Paroz):

* stage: Unreviewed => Accepted


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

Django

unread,
Aug 3, 2022, 10:03:36 AM8/3/22
to django-...@googlegroups.com
#33886: GeoIP module unnecessarily requires GDAL
---------------------------------+-----------------------------------------

Reporter: Aarni Koskela | Owner: Aarni Koskela
Type: Bug | Status: assigned
Component: GIS | Version: 4.1
Severity: Release blocker | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+-----------------------------------------
Changes (by Mariusz Felisiak):

* severity: Normal => Release blocker


Comment:

Regression in 31bef51d8ea5e3bf650de1495ae1f0566670b8f3.

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

Django

unread,
Aug 3, 2022, 10:57:57 AM8/3/22
to django-...@googlegroups.com
#33886: GeoIP module unnecessarily requires GDAL
-------------------------------------+-------------------------------------

Reporter: Aarni Koskela | Owner: Aarni
| Koskela
Type: Bug | Status: assigned
Component: GIS | Version: 4.1
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* stage: Accepted => Ready for checkin


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

Django

unread,
Aug 3, 2022, 12:31:37 PM8/3/22
to django-...@googlegroups.com
#33886: GeoIP module unnecessarily requires GDAL
-------------------------------------+-------------------------------------
Reporter: Aarni Koskela | Owner: Aarni
| Koskela
Type: Bug | Status: closed
Component: GIS | Version: 4.1
Severity: Release blocker | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

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


Comment:

In [changeset:"e7afb8a18061f664a5d20d409d423b77195e6060" e7afb8a1]:
{{{
#!CommitTicketReference repository=""
revision="e7afb8a18061f664a5d20d409d423b77195e6060"
Fixed #33886 -- Reallowed using GeoIP2() when GEOS is not installed.

Regression in 31bef51d8ea5e3bf650de1495ae1f0566670b8f3.
}}}

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

Django

unread,
Aug 3, 2022, 12:31:45 PM8/3/22
to django-...@googlegroups.com
#33886: GeoIP module unnecessarily requires GDAL
-------------------------------------+-------------------------------------
Reporter: Aarni Koskela | Owner: Aarni
| Koskela
Type: Bug | Status: closed
Component: GIS | Version: 4.1
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"a3ce58ac4c9fee7c769d48ad1c4df45fa4c1775b" a3ce58ac]:
{{{
#!CommitTicketReference repository=""
revision="a3ce58ac4c9fee7c769d48ad1c4df45fa4c1775b"
[4.1.x] Fixed #33886 -- Reallowed using GeoIP2() when GEOS is not
installed.

Regression in 31bef51d8ea5e3bf650de1495ae1f0566670b8f3.

Backport of e7afb8a18061f664a5d20d409d423b77195e6060 from main
}}}

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

Reply all
Reply to author
Forward
0 new messages