[Django] #25184: Add support for MaxMind GeoLite2 database format

8 views
Skip to first unread message

Django

unread,
Jul 28, 2015, 8:45:03 AM7/28/15
to django-...@googlegroups.com
#25184: Add support for MaxMind GeoLite2 database format
---------------------------------------+------------------------
Reporter: timgraham | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: master
Severity: Normal | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------+------------------------
Django currently supports the
[http://dev.maxmind.com/geoip/legacy/geolite/ GeoLite Legacy format] (IPv4
only). There's a patch to add IPv6 legacy support (#18349), but it seems
better to add support for the
[http://dev.maxmind.com/geoip/geoip2/geolite2/ GeoLite2 format] instead
and possibly deprecate support for the legacy format (could be a separate
ticket).

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

Django

unread,
Jul 28, 2015, 12:15:22 PM7/28/15
to django-...@googlegroups.com
#25184: Add support for MaxMind GeoLite2 database format
-----------------------------+------------------------------------

Reporter: timgraham | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------

Comment (by fcurella):

@timgraham

Are we looking to support both format for a limited time, or can we have a
clear cut?

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

Django

unread,
Jul 28, 2015, 12:31:04 PM7/28/15
to django-...@googlegroups.com
#25184: Add support for MaxMind GeoLite2 database format
-----------------------------+------------------------------------

Reporter: timgraham | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------

Comment (by timgraham):

Support both. Support for the old format should be dropped using the usual
deprecation cycle.

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

Django

unread,
Jul 28, 2015, 2:45:24 PM7/28/15
to django-...@googlegroups.com
#25184: Add support for MaxMind GeoLite2 database format
-----------------------------+------------------------------------
Reporter: timgraham | Owner: fcurella
Type: New feature | Status: assigned
Component: GIS | Version: master
Severity: Normal | Resolution:

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

* owner: nobody => fcurella
* status: new => assigned


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

Django

unread,
Jul 28, 2015, 2:49:49 PM7/28/15
to django-...@googlegroups.com
#25184: Add support for MaxMind GeoLite2 database format
-----------------------------+------------------------------------
Reporter: timgraham | Owner: fcurella
Type: New feature | Status: assigned
Component: GIS | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------

Comment (by fcurella):

I have a few question re: how we want to approach this:

1. Do we want to support both GeoIP and GeoIP2 for some version of Django?
2. Could we use the GeoIP2 Python bindings
(http://geoip2.readthedocs.org/en/latest/), or should we interface
directly with the C library, like `contrib.gis.geoip` currently does?
3. Correct me if I'm wrong, but looks like the new database records don't
have all the information the old ones had. Specifically, I can't see any
`country_code3`, or `area_code`. Probably not a big deal, but it will need
to be documented.

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

Django

unread,
Jul 28, 2015, 2:56:57 PM7/28/15
to django-...@googlegroups.com
#25184: Add support for MaxMind GeoLite2 database format
-----------------------------+------------------------------------
Reporter: timgraham | Owner: fcurella
Type: New feature | Status: assigned
Component: GIS | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------

Comment (by timgraham):

1. Yes, we need to keep backwards compatibility to give users a chance to
upgrade. Possibly adding a new `django.contrib.gis.geoip2` module and then
deprecating the old one (separate ticket) would make sense?

2. I don't see a reason to reinvent the wheel. As long as the dependency
is optional if you don't care to use GeoIP features, I think that approach
should be fine unless someone says otherwise.

3. I haven't used these features before.

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

Django

unread,
Jul 28, 2015, 4:11:28 PM7/28/15
to django-...@googlegroups.com
#25184: Add support for MaxMind GeoLite2 database format
-----------------------------+------------------------------------
Reporter: timgraham | Owner: fcurella
Type: New feature | Status: assigned
Component: GIS | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------

Comment (by fcurella):

Their Python bindings are licensed under Apache License, Version 2.0. I
don't think that would be a problem (and even if, we are not
redistributing). I just want to confirm we don't have any licensing issue

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

Django

unread,
Jul 31, 2015, 9:52:51 AM7/31/15
to django-...@googlegroups.com
#25184: Add support for MaxMind GeoLite2 database format
-----------------------------+---------------------------------------------

Reporter: timgraham | Owner: fcurella
Type: New feature | Status: assigned
Component: GIS | Version: master
Severity: Normal | 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 timgraham):

* has_patch: 0 => 1
* stage: Accepted => Ready for checkin


Comment:

[https://github.com/django/django/pull/5062 PR]

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

Django

unread,
Jul 31, 2015, 10:11:39 AM7/31/15
to django-...@googlegroups.com
#25184: Add support for MaxMind GeoLite2 database format
-----------------------------+---------------------------------------------
Reporter: timgraham | Owner: fcurella
Type: New feature | Status: closed
Component: GIS | Version: master
Severity: Normal | 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 Tim Graham <timograham@…>):

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


Comment:

In [changeset:"7f0953ce1f1e263a2a74db52d70cdf278840a1d2" 7f0953ce]:
{{{
#!CommitTicketReference repository=""
revision="7f0953ce1f1e263a2a74db52d70cdf278840a1d2"
Fixed #25184 -- Added support for MaxMind GeoLite2 database format
}}}

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

Django

unread,
Jul 31, 2015, 10:11:40 AM7/31/15
to django-...@googlegroups.com
#25184: Add support for MaxMind GeoLite2 database format
-----------------------------+---------------------------------------------
Reporter: timgraham | Owner: fcurella
Type: New feature | Status: closed
Component: GIS | Version: master

Severity: Normal | 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 Tim Graham <timograham@…>):

In [changeset:"1e2362ca0f2805e91204a7b005e5aed293b40c9e" 1e2362ca]:
{{{
#!CommitTicketReference repository=""
revision="1e2362ca0f2805e91204a7b005e5aed293b40c9e"
Refs #25184 -- Started deprecation for contrib.gis.geoip.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25184#comment:9>

Django

unread,
Jan 17, 2017, 10:09:51 PM1/17/17
to django-...@googlegroups.com
#25184: Add support for MaxMind GeoLite2 database format
-----------------------------+---------------------------------------------
Reporter: Tim Graham | Owner: Flavio Curella

Type: New feature | Status: closed
Component: GIS | Version: master

Severity: Normal | 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 Tim Graham <timograham@…>):

In [changeset:"56a5760543f0428346a45f5efcffacf8caedd744" 56a5760]:
{{{
#!CommitTicketReference repository=""
revision="56a5760543f0428346a45f5efcffacf8caedd744"
Refs #25184 -- Removed contrib.gis.geoip per deprecation timeline.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25184#comment:10>

Reply all
Reply to author
Forward
0 new messages