1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00
Commit Graph

29 Commits

Author SHA1 Message Date
Nick Pope
40b5b1596f Fixed #35100 -- Reworked GeoIP2 database initialization. 2024-01-11 12:01:35 +01:00
Nick Pope
f50184a84b
Fixed #35092 -- Exposed extra fields for GeoIP2.country() and GeoIP2.city() responses. 2024-01-10 12:09:44 +01:00
Nick Pope
cc56c22a24
Fixed #35091 -- Allowed GeoIP2 querying using IPv4Address/IPv6Address. 2024-01-07 08:15:40 +01:00
Nick Pope
a93375e8ab Fixed #34305 -- Changed GeoIP2 tests to use MaxMind test databases.
GEOIP_SETTINGS is removed from the global scope as this prevents
modifications to the settings using @override_settings in tests.

Additional improvements now that we have stable test databases include:

- Made testing more comprehensive and improved coverage
- Patched socket.gethostbyname() for whole test case
- Added testing of non-free GeoIP2 databases

Co-authored-by: Tom Forbes <tom@tomforb.es>
2023-12-12 09:58:26 +01:00
Nick Pope
07f9f9960c Deprecated django.contrib.gis.geoip2.GeoIP2.open(). 2023-12-05 08:21:19 +01:00
Nick Pope
0f83133a35
Made GeoIP2.__del__() close all databases. 2023-12-01 13:55:45 +01:00
Nick Pope
b925fefd7d Deprecated django.contrib.gis.geoip2.GeoIP2.coords().
The `ordering` argument is undocumented and of limited use, so this is
effectively the same as `GeoIP2.lon_lat()`.
2023-12-01 08:38:42 +01:00
django-bot
9c19aff7c7 Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
Mariusz Felisiak
135c800fe6
Fixed GeoIPTest.test04_city() failure with the latest GeoIP2 database. 2021-01-29 11:00:12 +01:00
Claude Paroz
eed2e740f7 Fixed #30461 -- Made GeoIP2 and GEOIP_PATH setting accept pathlib.Path as library path.
Thanks Nikita Krokosh for the initial patch.
2019-08-13 19:44:10 +02:00
Mariusz Felisiak
4305fbe8b1
Fixed GeoIPTest.test04_city() failure with the latest GeoIP2 database. 2019-06-27 15:09:28 +02:00
Chris Adkins
705ef6cfeb Fixed #30447 -- Added 'is_in_european_union' in GeoIP2.city() dict. 2019-05-07 13:31:44 +02:00
Tom Forbes
8f90593e6f Removed obsolete and flaky GeoIP tests. 2018-10-23 20:46:49 -04:00
Tim Graham
7a22d9f751
Fixed a test failure with the latest GeoIP2 database. 2018-04-17 21:30:05 -04:00
Alex Stovbur
d171843f57 Fixed #28981 -- Added an exception if GeoIP database can't be loaded from the path. 2018-03-05 12:20:30 -05:00
Tim Graham
66d74676e2 Fixed a GeoIP2 test failure with the latest GeoIP2 database. 2018-01-10 09:39:41 -05:00
Ryan Verner
9473a8481a Fixed #28740 -- Added 'continent_code' and 'continent_name' in GeoIP2.city() dict. 2017-10-25 10:07:37 -04:00
R3turnz
502f03d897 Fixed #28112 -- Added 'time_zone' in GeoIP2.city() dict. 2017-05-22 21:07:14 -04:00
Tim Graham
b014de011b Removed obsolete HAS_GEOS variable for test skipping. 2017-05-04 20:45:18 -04:00
Claude Paroz
3f1ba76851 Fixed #28115 -- Fixed IP address validation in geoip2 module
Regression in 277a4dd4b4.
Thanks Tim Graham for the test.
2017-04-22 20:10:24 +02:00
Tim Graham
7aba69145d Refs #23919 -- Removed django.test.mock Python 2 compatibility shim. 2017-01-20 08:17:20 -05:00
Claude Paroz
7b2f2e74ad Refs #23919 -- Removed six.<various>_types usage
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18 20:18:46 +01:00
Claude Paroz
d7b9aaa366 Refs #23919 -- Removed encoding preambles and future imports 2017-01-18 09:55:19 +01:00
Tim Graham
92053acbb9 Fixed E128 flake8 warnings in tests/. 2016-04-08 10:12:33 -04:00
Hasan
3d0dcd7f5a Refs #26022 -- Used context manager version of assertRaises in tests. 2016-01-29 12:32:18 -05:00
Anton Baklanov
d0ed01cef0 Fixed #25407 -- Removed network dependency in GeoIP tests. 2015-09-23 13:11:57 -04:00
Tim Graham
d3c92afe42 Fixed a GeoIP2 test failure with the latest GeoIP2 database.
Düsseldorf now appears as Dusseldorf in the latest version
of the GeoIP2 database.
2015-09-10 20:54:25 -04:00
Keryn Knight
d4b10a7256 Refs #24121 -- Added a repr() to gis.GeoIP and gis.GeoIP2. 2015-08-31 16:12:40 -04:00
Flavio Curella
7f0953ce1f Fixed #25184 -- Added support for MaxMind GeoLite2 database format 2015-07-31 09:45:03 -04:00