Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#25184 closed New feature (fixed)

Add support for MaxMind GeoLite2 database format

Reported by: Tim Graham Owned by: Flavio Curella
Component: GIS Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Django currently supports the GeoLite Legacy format (IPv4 only). There's a patch to add IPv6 legacy support (#18349), but it seems better to add support for the GeoLite2 format instead and possibly deprecate support for the legacy format (could be a separate ticket).

Change History (10)

comment:1 Changed 4 years ago by Flavio Curella

@timgraham

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

comment:2 Changed 4 years ago by Tim Graham

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

comment:3 Changed 4 years ago by Flavio Curella

Owner: changed from nobody to Flavio Curella
Status: newassigned

comment:4 Changed 4 years ago by Flavio Curella

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. Also missing is a way to determine the databases version (at least that I could find). Probably not a big deal, but it will need to be documented.
Last edited 4 years ago by Flavio Curella (previous) (diff)

comment:5 Changed 4 years ago by Tim Graham

  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?
  1. 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.
  1. I haven't used these features before.

comment:6 Changed 4 years ago by Flavio Curella

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

comment:7 Changed 4 years ago by Tim Graham

Has patch: set
Triage Stage: AcceptedReady for checkin

comment:8 Changed 4 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In 7f0953ce:

Fixed #25184 -- Added support for MaxMind GeoLite2 database format

comment:9 Changed 4 years ago by Tim Graham <timograham@…>

In 1e2362ca:

Refs #25184 -- Started deprecation for contrib.gis.geoip.

comment:10 Changed 3 years ago by Tim Graham <timograham@…>

In 56a5760:

Refs #25184 -- Removed contrib.gis.geoip per deprecation timeline.

Note: See TracTickets for help on using tickets.
Back to Top