Maxminddb

Latest version: v2.6.1

Safety actively analyzes 628649 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 6

1.4.0

++++++++++++++++++

* IMPORTANT: Previously, the pure Python reader would allow
``ipaddress.IPv4Address`` and ``ipaddress.IPv6Address`` objects when calling
``.get()``. This would fail with the C extension. The fact that these objects
worked at all was an implementation detail and has varied with different
releases. This release makes the pure Python implementation consistent
with the extension. A ``TypeError`` will now be thrown if you attempt to
use these types with either the pure Python implementation or the
extension. The IP address passed to ``.get()`` should be a string type.
* Fix issue where incorrect size was used when unpacking some types with the
pure Python reader. Reported by Lee Symes. GitHub 30.
* You may now pass in the database via a file descriptor rather than a file
name when creating a new ``maxminddb.Reader`` object using ``MODE_FD``.
This will read the database from the file descriptor into memory. Pull
request by nkinkade. GitHub 33.

1.3.0

++++++++++++++++++

* ``maxminddb.Reader`` and the C extension now support being used in a context
manager. Pull request by Joakim Uddholm. GitHub 21 & 28.
* Provide a more useful error message when ``MODE_MMAP_EXT`` is requested but
the C extension is not available.

1.2.3

++++++++++++++++++

* Improve compatibility with other Python 2 ``ipaddress`` backports. Although
``ipaddress`` is highly recommended, ``py2-ipaddress`` and
``backport_ipaddress`` should now work. Incompatibility reported by
John Zadroga on ``geoip2`` GitHub issue 41.

1.2.2

++++++++++++++++++

* Fix to the classifiers in ``setup.py``. No code changes.

1.2.1

++++++++++++++++++

* This module now uses the ``ipaddress`` module for Python 2 rather than the
``ipaddr`` module. Users should notice no behavior change beyond the change
in dependencies.
* Removed ``requirements.txt`` from ``MANIFEST.in`` in order to stop warning
during installation.
* Added missing test data.

1.2.0

++++++++++++++++++

* Previously if ``MODE_FILE`` was used and the database was loaded before
forking, the parent and children would use the same file table entry without
locking causing errors reading the database due to the offset being changed
by other processes. In ``MODE_FILE``, the reader will now use ``os.pread``
when available and a lock when ``os.pread`` is not available (e.g., Python
2). If you are using ``MODE_FILE`` on a Python without ``os.pread``, it is
recommended that you open the database after forking to reduce resource
contention.
* The ``Metadata`` class now overloads ``__repr__`` to provide a useful
representation of the contents when debugging.
* An ``InvalidDatabaseError`` will now be thrown if the data type read from
the database is invalid. Previously a ``KeyError`` was thrown.

Page 4 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.