Releases: maxmind/GeoIP2-python
Releases · maxmind/GeoIP2-python
2.4.2
- Recent releases of
requests
(2.12.2 and 2.12.3) require that the
username for basic authentication be a string or bytes. The documentation
for this module uses an integer for theuser_id
, which will break with
theserequests
versions. Theuser_id
is now converted to bytes
before being passed torequests
.
2.4.1
2.4.0
- This module now uses
ipaddress
on Python 2 rather thanipaddr
to
validate IP addresses before sending them to the web service. - Added handling of additional error codes that the web service may return.
- PEP 257 documentation fixes.
- Updated documentation to reflect that the accuracy radius is now included
in City. - Previously, the source distribution was missing some tests and test
databases. This has been corrected. Reported by Lumir Balhar.
2.3.0: Enterprise Support. Context Manager Support.
- Added support for the GeoIP2 Enterprise database.
geoip2.database.Reader
now supports being used in awith
statement
(PEP 343). (PR from Nguyễn Hồng Quân. GitHub #29)
2.2.0 New Demographics Fields and Anonymous Deprecations
- The
geoip2.records.Location
class has been updated to add attributes for theaverage_income
andpopulation_density
fields provided by the Insights web service. - The
is_anonymous_proxy
andis_satellite_provider
properties on
`geoip2.records.Traits`` have been deprecated. Please use our GeoIP2 Anonymous IP database to determine whether an IP address is used by an anonymizing service.
2.1.0: New file and memory mode for database reader
- The reader now supports pure Python file and memory modes. If you are not
using the C extension and your Python does not provide themmap
module,
the file mode will be used by default. You can explicitly set the mode using
themode
keyword argument with theMODE_AUTO
,MODE_MMAP
,
MODE_MMAP_EXT
,MODE_FILE
, andMODE_MEMORY
constants exported by
geoip2.database
.
2.0.2
- Added support for the GeoIP2 Anonymous IP database. The
geoip2.database.Reader
class now has ananonymous_ip()
method which
returns ageoip2.models.AnonymousIP
object. - Added
__repr__
and__eq__
methods to the model and record classes
to aid in debugging and using the library from a REPL.
2.0.1
2.0.0
0.7.0
- BREAKING CHANGES:
- The deprecated
city_isp_org()
andomni()
methods
have been removed. - The
geoip2.database.Reader
lookup methods (e.g.,city()
,
isp()
) now raise aTypeError
if they are used with a database that
does not match the method. In particular, doing acity()
lookup on a
GeoIP2 Country database will result in an error and vice versa.
- The deprecated
- A
metadata()
method has been added to thegeoip2.database.Reader
class. This returns amaxminddb.reader.Metadata
object with information
about the database.