maxminddb 3.2.0__tar.gz → 3.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {maxminddb-3.2.0 → maxminddb-3.3.0}/HISTORY.rst +105 -0
- {maxminddb-3.2.0/maxminddb.egg-info → maxminddb-3.3.0}/PKG-INFO +11 -8
- {maxminddb-3.2.0 → maxminddb-3.3.0}/README.rst +10 -7
- {maxminddb-3.2.0 → maxminddb-3.3.0}/docs/index.rst +18 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/.github/workflows/pages.yml +1 -1
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/.github/workflows/test.yml +16 -2
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/CMakeLists.txt +1 -1
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/Changes.md +6 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/configure.ac +1 -1
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/src/maxminddb.c +4 -4
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/decoder_limits_t.pl +5 -3
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/maxminddb.c +379 -118
- maxminddb-3.3.0/maxminddb/__init__.py +113 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/maxminddb/const.py +5 -2
- {maxminddb-3.2.0 → maxminddb-3.3.0}/maxminddb/decoder.py +98 -24
- {maxminddb-3.2.0 → maxminddb-3.3.0}/maxminddb/extension.pyi +26 -8
- {maxminddb-3.2.0 → maxminddb-3.3.0}/maxminddb/file.py +26 -6
- maxminddb-3.3.0/maxminddb/reader.py +646 -0
- maxminddb-3.3.0/maxminddb/types.py +38 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0/maxminddb.egg-info}/PKG-INFO +11 -8
- {maxminddb-3.2.0 → maxminddb-3.3.0}/maxminddb.egg-info/SOURCES.txt +9 -4
- maxminddb-3.3.0/mise.lock +69 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/mise.toml +1 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/pyproject.toml +11 -2
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/.github/workflows/check-untagged-deps.yml +1 -1
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/.github/workflows/codeql-analysis.yml +3 -11
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/.github/workflows/go.yml +1 -1
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/.github/workflows/links.yml +1 -1
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/.github/workflows/pages.yml +2 -2
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/.github/workflows/precious.yml +1 -1
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/.github/workflows/zizmor.yml +1 -1
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/.golangci.yml +100 -90
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/MaxMind-DB-spec.md +7 -0
- maxminddb-3.3.0/tests/data/bad-data/README.md +29 -0
- maxminddb-3.3.0/tests/data/bad-data/libmaxminddb/libmaxminddb-deep-array-nesting.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/libmaxminddb/libmaxminddb-deep-nesting.mmdb +0 -0
- maxminddb-3.3.0/tests/data/bad-data/libmaxminddb/libmaxminddb-repeated-description-key.mmdb +0 -0
- maxminddb-3.3.0/tests/data/bad-data/libmaxminddb/libmaxminddb-repeated-metadata-key.mmdb +0 -0
- maxminddb-3.3.0/tests/data/bad-data/libmaxminddb/libmaxminddb-repeated-node-count.mmdb +0 -0
- maxminddb-3.3.0/tests/data/bad-data/libmaxminddb/libmaxminddb-repeated-pointer-key.mmdb +0 -0
- maxminddb-3.3.0/tests/data/go.mod +11 -0
- maxminddb-3.3.0/tests/data/go.sum +12 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/mise.lock +37 -37
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/pkg/writer/baddata.go +30 -24
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/pkg/writer/decoder.go +9 -26
- maxminddb-3.3.0/tests/data/pkg/writer/fixtures_test.go +165 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/pkg/writer/geoip2.go +48 -28
- maxminddb-3.3.0/tests/data/pkg/writer/geoip2_test.go +237 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/pkg/writer/maxmind.go +5 -5
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/pkg/writer/nestedstructures.go +3 -4
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/pkg/writer/pointerdos_test.go +0 -1
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/pkg/writer/rawmmdb.go +163 -29
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/pkg/writer/rawmmdb_test.go +10 -1
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/pkg/writer/writer.go +7 -3
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/source-data/GeoIP-Anonymous-Plus-Test.json +9 -9
- maxminddb-3.3.0/tests/data/source-data/GeoIP-Regions-Test.json +474 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/source-data/GeoIP2-Anonymous-IP-Test.json +10 -10
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/source-data/GeoIP2-City-Test.json +172 -221
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/source-data/GeoIP2-Connection-Type-Test.json +24 -24
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/source-data/GeoIP2-Country-Test.json +1901 -144
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/source-data/GeoIP2-DensityIncome-Test.json +2 -2
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/source-data/GeoIP2-Domain-Test.json +89 -89
- maxminddb-3.2.0/tests/data/source-data/GeoIP2-Precision-Enterprise-Test.json → maxminddb-3.3.0/tests/data/source-data/GeoIP2-Enterprise-Test.json +2793 -1944
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/source-data/GeoIP2-IP-Risk-Test.json +4 -4
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/source-data/GeoIP2-ISP-Test.json +1879 -1879
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/source-data/GeoIP2-Static-IP-Score-Test.json +150 -150
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/source-data/GeoIP2-User-Count-Test.json +150 -150
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/source-data/GeoLite2-City-Test.json +140 -116
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/source-data/GeoLite2-Country-Test.json +116 -116
- maxminddb-3.3.0/tests/data/test-data/GeoIP-Anonymous-Plus-Test.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/GeoIP-Regions-Test.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/GeoIP-Residential-Proxy-Test.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/GeoIP2-Anonymous-IP-Test.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/GeoIP2-City-Shield-Test.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/GeoIP2-City-Test.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/GeoIP2-Connection-Type-Test.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/GeoIP2-Country-Shield-Test.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/GeoIP2-Country-Test.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/GeoIP2-DensityIncome-Test.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/GeoIP2-Domain-Test.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/GeoIP2-Enterprise-Shield-Test.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/GeoIP2-Enterprise-Test.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/GeoIP2-IP-Risk-Test.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/GeoIP2-ISP-Test.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/GeoIP2-Static-IP-Score-Test.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/GeoIP2-User-Count-Test.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/GeoLite2-ASN-Test.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/GeoLite2-City-Test.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/GeoLite2-Country-Test.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-no-ipv4-search-tree.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/MaxMind-DB-string-value-entries.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/MaxMind-DB-test-decoder.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/MaxMind-DB-test-ipv4-24.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/MaxMind-DB-test-ipv4-28.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/MaxMind-DB-test-ipv4-32.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/MaxMind-DB-test-ipv6-24.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/MaxMind-DB-test-ipv6-28.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/MaxMind-DB-test-ipv6-32.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/MaxMind-DB-test-metadata-pointers.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/MaxMind-DB-test-mixed-24.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/MaxMind-DB-test-mixed-28.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/MaxMind-DB-test-mixed-32.mmdb +0 -0
- maxminddb-3.3.0/tests/data/test-data/MaxMind-DB-test-nested.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/decoder_test.py +139 -5
- maxminddb-3.3.0/tests/reader_test.py +2405 -0
- maxminddb-3.3.0/tests/typing_test.py +52 -0
- maxminddb-3.3.0/uv.lock +618 -0
- maxminddb-3.2.0/maxminddb/__init__.py +0 -91
- maxminddb-3.2.0/maxminddb/reader.py +0 -383
- maxminddb-3.2.0/maxminddb/types.py +0 -15
- maxminddb-3.2.0/mise.lock +0 -29
- maxminddb-3.2.0/tests/data/bad-data/README.md +0 -14
- maxminddb-3.2.0/tests/data/bad-data/libmaxminddb/libmaxminddb-deep-array-nesting.mmdb +0 -0
- maxminddb-3.2.0/tests/data/go.mod +0 -11
- maxminddb-3.2.0/tests/data/go.sum +0 -16
- maxminddb-3.2.0/tests/data/source-data/GeoIP2-Enterprise-Test.json +0 -1884
- maxminddb-3.2.0/tests/data/source-data/GeoIP2-Precision-Enterprise-Sandbox-Test.json +0 -296
- maxminddb-3.2.0/tests/data/test-data/GeoIP-Anonymous-Plus-Test.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/GeoIP-Residential-Proxy-Test.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/GeoIP2-Anonymous-IP-Test.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/GeoIP2-City-Shield-Test.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/GeoIP2-City-Test.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/GeoIP2-Connection-Type-Test.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/GeoIP2-Country-Shield-Test.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/GeoIP2-Country-Test.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/GeoIP2-DensityIncome-Test.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/GeoIP2-Domain-Test.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/GeoIP2-Enterprise-Shield-Test.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/GeoIP2-Enterprise-Test.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/GeoIP2-IP-Risk-Test.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/GeoIP2-ISP-Test.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/GeoIP2-Precision-Enterprise-Shield-Test.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/GeoIP2-Precision-Enterprise-Test.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/GeoIP2-Static-IP-Score-Test.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/GeoIP2-User-Count-Test.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/GeoLite2-ASN-Test.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/GeoLite2-City-Test.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/GeoLite2-Country-Test.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/MaxMind-DB-string-value-entries.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/MaxMind-DB-test-decoder.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/MaxMind-DB-test-ipv4-24.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/MaxMind-DB-test-ipv4-28.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/MaxMind-DB-test-ipv4-32.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/MaxMind-DB-test-ipv6-24.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/MaxMind-DB-test-ipv6-28.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/MaxMind-DB-test-ipv6-32.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/MaxMind-DB-test-metadata-pointers.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/MaxMind-DB-test-mixed-24.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/MaxMind-DB-test-mixed-28.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/MaxMind-DB-test-mixed-32.mmdb +0 -0
- maxminddb-3.2.0/tests/data/test-data/MaxMind-DB-test-nested.mmdb +0 -0
- maxminddb-3.2.0/tests/reader_test.py +0 -1088
- maxminddb-3.2.0/uv.lock +0 -572
- {maxminddb-3.2.0 → maxminddb-3.3.0}/LICENSE +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/MANIFEST.in +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/docs/Makefile +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/docs/conf.py +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/examples/benchmark.py +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/.clang-format +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/.github/dependabot.yml +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/.github/workflows/clang-addresssanitizer.yml +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/.github/workflows/clang-analyzer.yml +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/.github/workflows/codeql-analysis.yml +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/.github/workflows/dependabot-failure-watcher.yml +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/.github/workflows/links.yml +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/.github/workflows/precious.yml +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/.github/workflows/zizmor.yml +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/.gitignore +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/.gitmodules +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/.perltidyrc +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/.precious.toml +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/AUTHORS +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/LICENSE +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/Makefile.am +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/NOTICE +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/README.dev.md +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/README.fuzzing.md +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/README.md +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/bin/CMakeLists.txt +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/bin/Makefile.am +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/bin/mmdblookup.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/bootstrap +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/c_flag_overrides.cmake +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/cmake_uninstall.cmake.in +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/common.mk +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/cxx_flag_overrides.cmake +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/dev-bin/make-man-pages.pl +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/dev-bin/ppa-release.sh +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/dev-bin/release.sh +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/dev-bin/valgrind-all.pl +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/doc/libmaxminddb.md +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/doc/mmdblookup.md +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/docs/assets/css/main.css +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/docs/hugo.toml +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/docs/layouts/404.html +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/docs/layouts/_default/_markup/render-heading.html +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/docs/layouts/_default/default.html +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/include/maxminddb.h +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/include/maxminddb_config.h.cmake.in +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/include/maxminddb_config.h.in +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/lychee.toml +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/mise.lock +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/mise.toml +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/src/Makefile.am +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/src/data-pool.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/src/data-pool.h +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/src/libmaxminddb.pc.in +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/src/maxminddb-compat-util.h +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/CMakeLists.txt +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/Makefile.am +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/bad_data_size_t.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/bad_databases_t.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/bad_epoch_t.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/bad_indent_t.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/bad_pointers_t.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/bad_search_tree_t.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/basic_lookup_t.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/compile_c++_t.pl +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/data-pool-t.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/data_entry_list_t.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/data_types_t.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/double_close_t.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/dump_t.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/empty_container_metadata_t.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/external_symbols_t.pl +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/fuzz_mmdb.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/gai_error_t.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/get_value_pointer_bug_t.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/get_value_t.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/invalid_sockaddr_t.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/ipv4_start_cache_t.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/ipv6_lookup_in_ipv4_t.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/max_depth_t.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/maxminddb_test_helper.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/maxminddb_test_helper.h +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/metadata_marker_t.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/metadata_pointers_t.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/metadata_t.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/mmdblookup_t.pl +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/no_map_get_value_t.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/overflow_bounds_t.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/pointer_dos_t.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/read_node_t.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/threads_t.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/version_t.c +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/maxminddb_config.h +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/lychee.toml +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/maxminddb/errors.py +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/maxminddb/py.typed +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/maxminddb.egg-info/dependency_links.txt +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/maxminddb.egg-info/top_level.txt +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/setup.cfg +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/setup.py +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/__init__.py +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/.gitattributes +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/.gitconfig +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/.github/dependabot.yml +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/.github/workflows/dependabot-failure-watcher.yml +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/.gitignore +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/.precious.toml +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/LICENSE-APACHE +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/LICENSE-MIT +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/README.md +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/libmaxminddb/libmaxminddb-corrupt-search-tree.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/libmaxminddb/libmaxminddb-empty-array-last-in-metadata.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/libmaxminddb/libmaxminddb-empty-map-last-in-metadata.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/libmaxminddb/libmaxminddb-metadata-marker-only.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/libmaxminddb/libmaxminddb-offset-integer-overflow.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/libmaxminddb/libmaxminddb-oversized-array.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/libmaxminddb/libmaxminddb-oversized-map.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/libmaxminddb/libmaxminddb-separator-record-max-left.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/libmaxminddb/libmaxminddb-separator-record-min-left.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/libmaxminddb/libmaxminddb-separator-record-min-right.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/libmaxminddb/libmaxminddb-uint64-max-epoch.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/maxminddb-golang/cyclic-data-structure.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/maxminddb-golang/invalid-bytes-length.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/maxminddb-golang/invalid-data-record-offset.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/maxminddb-golang/invalid-map-key-length.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/maxminddb-golang/invalid-string-length.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/maxminddb-golang/metadata-is-an-uint128.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/maxminddb-golang/unexpected-bytes.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/maxminddb-python/bad-unicode-in-map-key.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/cmd/write-test-data/main.go +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/docs/assets/css/main.css +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/docs/hugo.toml +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/docs/layouts/404.html +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/docs/layouts/_default/_markup/render-heading.html +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/docs/layouts/_default/default.html +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/lychee.toml +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/mise.toml +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/pkg/writer/ip.go +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/pkg/writer/pointerdos.go +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/source-data/GeoIP-Residential-Proxy-Test.json +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/source-data/GeoLite2-ASN-Test.json +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/GeoIP2-City-Test-Broken-Double-Format.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/GeoIP2-City-Test-Invalid-Node-Count.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-test-broken-pointers-24.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-test-broken-search-tree-24.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-test-decode-path-shared-budget.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-test-decoder-payload-limit-over.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-test-decoder-payload-limit.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-test-decoder-value-limit-over.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-test-decoder-value-limit-pointer-heavy.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-test-decoder-value-limit.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-test-metadata-payload-limit.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-test-payload-amplification-dos-string.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-test-payload-amplification-dos-worst-case.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-test-payload-amplification-dos.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-test-pointer-decoder-dos-ipv6.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-test-pointer-decoder-dos.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-test-pointer-decoder.mmdb +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/README.md +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/maps-with-pointers.raw +0 -0
- {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/threading_test.py +0 -0
|
@@ -3,6 +3,111 @@
|
|
|
3
3
|
History
|
|
4
4
|
-------
|
|
5
5
|
|
|
6
|
+
3.3.0 (2026-11-17)
|
|
7
|
+
++++++++++++++++++
|
|
8
|
+
|
|
9
|
+
* Fixed iteration over an IPv6 database with a network shorter than /96
|
|
10
|
+
whose first bits are zero, such as ``::/1``. The readers raised
|
|
11
|
+
``ValueError`` or skipped networks. The pure Python reader also raised
|
|
12
|
+
``ValueError`` for a network that starts at ``::1:0:0``, such as
|
|
13
|
+
``::1:0:0/96``.
|
|
14
|
+
* The pure Python reader now raises ``InvalidDatabaseError`` for a search tree
|
|
15
|
+
record that points before the data section. Previously, it returned an
|
|
16
|
+
empty map.
|
|
17
|
+
* Iterating over a database with a corrupt search tree, such as one with a
|
|
18
|
+
cycle, now raises ``InvalidDatabaseError``. Previously, the C extension
|
|
19
|
+
could corrupt memory, and the pure Python reader raised ``RecursionError``
|
|
20
|
+
or returned part of the networks.
|
|
21
|
+
* A second ``__init__`` on a pure Python ``Reader`` now closes the old
|
|
22
|
+
database, and an iterator from before it raises ``ValueError``, as in the
|
|
23
|
+
C extension. Before, the iterator walked the new database with node
|
|
24
|
+
numbers from the old one. A failed ``__init__`` keeps the old database.
|
|
25
|
+
After ``close()``, an iterator raises ``ValueError`` in every mode.
|
|
26
|
+
* The pure Python reader now raises ``InvalidDatabaseError`` when a value,
|
|
27
|
+
search tree record or pointer goes past the end of the data section, or when
|
|
28
|
+
the search tree overlaps the metadata. Previously, it could return a shorter
|
|
29
|
+
or wrong value, or decode bytes from the metadata section.
|
|
30
|
+
* The pure Python reader now raises ``InvalidDatabaseError`` when a record map
|
|
31
|
+
key is not a string, as the C extension does. Previously, it returned the
|
|
32
|
+
non-string key or raised ``TypeError``.
|
|
33
|
+
* The pure Python reader now raises ``InvalidDatabaseError`` for extended type
|
|
34
|
+
byte 0. Previously, it decoded the value as a map. The C extension still
|
|
35
|
+
decodes it as a map, because libmaxminddb does not check this byte.
|
|
36
|
+
* An empty database file now raises ``InvalidDatabaseError`` in ``MODE_FILE``,
|
|
37
|
+
as in ``MODE_MEMORY``. Previously, it raised ``OSError`` on platforms with
|
|
38
|
+
``os.pread``.
|
|
39
|
+
* C extension:
|
|
40
|
+
|
|
41
|
+
* Fixed segmentation faults from invalid use of ``Metadata``, ``Reader`` and
|
|
42
|
+
the internal iterator type.
|
|
43
|
+
* Fixed a segmentation fault on a database with a map key that is not a
|
|
44
|
+
string. Such a database now raises ``InvalidDatabaseError``.
|
|
45
|
+
* Fixed large ``uint32`` values, which came back negative on platforms
|
|
46
|
+
with a 32-bit C ``long``, such as Windows.
|
|
47
|
+
* Fixed memory leaks and a use-after-free. A second ``__init__`` on a
|
|
48
|
+
``Reader`` now closes the old database, and an iterator from before it
|
|
49
|
+
raises ``ValueError``. A failed ``__init__`` keeps the old database.
|
|
50
|
+
Reinitializing a ``Metadata`` changes nothing.
|
|
51
|
+
* Fixed a ``RuntimeWarning`` or ``RuntimeError`` on free-threaded Python on
|
|
52
|
+
macOS when a ``Reader`` failed to open or was used without ``__init__``.
|
|
53
|
+
* Fixed a deadlock on free-threaded Python when a ``Reader`` was closed
|
|
54
|
+
during iteration, from another thread or from a signal handler.
|
|
55
|
+
* Fixed a crash on free-threaded Python when two threads advanced the same
|
|
56
|
+
iterator.
|
|
57
|
+
* An exhausted iterator now raises ``StopIteration`` after its ``Reader``
|
|
58
|
+
closes, not ``ValueError``.
|
|
59
|
+
* The iterator now stops after an error, as the pure Python iterator does.
|
|
60
|
+
This includes an error in the data of one record, but not a failure to
|
|
61
|
+
get the read lock. Previously, the next call returned the remaining
|
|
62
|
+
networks.
|
|
63
|
+
* Added the ``node_byte_size`` and ``search_tree_size`` properties to
|
|
64
|
+
``Metadata``, as the pure Python ``Metadata`` has.
|
|
65
|
+
|
|
66
|
+
* Metadata:
|
|
67
|
+
|
|
68
|
+
* The pure Python reader ignores unknown keys, which a new minor version of
|
|
69
|
+
the format can add, if their values decode. Previously, an unknown key
|
|
70
|
+
raised ``TypeError``. It raises ``InvalidDatabaseError`` for a missing key,
|
|
71
|
+
a key that is not a string, a value that is not of the expected Python
|
|
72
|
+
type or is out of range, an invalid ``ip_version`` or format version, a
|
|
73
|
+
``build_epoch`` of 0, or a string that is not UTF-8 anywhere in the
|
|
74
|
+
metadata. Previously, the reader opened most of these files, and some
|
|
75
|
+
raised ``TypeError`` or ``UnicodeDecodeError``.
|
|
76
|
+
* The C extension ignores unknown keys unless a value cannot be decoded,
|
|
77
|
+
such as a map with a key that is not a string. Previously,
|
|
78
|
+
``Reader.metadata()`` crashed with a segmentation fault on any unknown
|
|
79
|
+
key.
|
|
80
|
+
* For a metadata string that is not UTF-8, the ``InvalidDatabaseError``
|
|
81
|
+
from the C ``Reader.metadata()`` has the ``UnicodeDecodeError`` as its
|
|
82
|
+
cause.
|
|
83
|
+
|
|
84
|
+
* Added ``maxminddb.Mode``, which the README already described.
|
|
85
|
+
* Type checkers now reject a subscript of ``maxminddb.types.Record`` or
|
|
86
|
+
``Primitive``, such as ``Record[str]``. The subscript still works at
|
|
87
|
+
runtime. Pull request by Adam Hitchcock. GitHub #464.
|
|
88
|
+
|
|
89
|
+
* Type hints:
|
|
90
|
+
|
|
91
|
+
* ``Primitive`` includes ``bytearray``, which the C extension returns for
|
|
92
|
+
the ``bytes`` type.
|
|
93
|
+
* ``Reader.__iter__`` declares its item type.
|
|
94
|
+
* Added the ``StrOrBytesPath`` and ``DatabaseSource`` aliases to
|
|
95
|
+
``maxminddb.types``.
|
|
96
|
+
* The ``maxminddb.extension.Reader`` stub accepts only a path, as the
|
|
97
|
+
extension does.
|
|
98
|
+
* ``MODE_FD`` accepts any object whose ``read()`` method returns ``bytes``,
|
|
99
|
+
such as a ``gzip.GzipFile``. ``maxminddb.types.SupportsRead`` describes
|
|
100
|
+
this type.
|
|
101
|
+
|
|
102
|
+
* ``MODE_AUTO`` now accepts a binary file object. Previously, it raised
|
|
103
|
+
``TypeError``. It reads the file object into memory with the pure Python
|
|
104
|
+
reader, as ``MODE_FD`` does. The C extension needs a path, so lookups are
|
|
105
|
+
slower than with a path when the extension is installed.
|
|
106
|
+
* The pure Python reader raises ``TypeError`` when the database argument does
|
|
107
|
+
not suit the mode.
|
|
108
|
+
* Updated the vendored libmaxminddb to 1.14.1. This fixes a build failure
|
|
109
|
+
with ``-Werror`` on platforms where ``ssize_t`` is 32 bits, such as i686.
|
|
110
|
+
|
|
6
111
|
3.2.0 (2026-09-10)
|
|
7
112
|
++++++++++++++++++
|
|
8
113
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: maxminddb
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.3.0
|
|
4
4
|
Summary: Reader for the MaxMind DB format
|
|
5
5
|
Author-email: Gregory Oschwald <goschwald@maxmind.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -67,7 +67,7 @@ provide `free GeoLite databases
|
|
|
67
67
|
files must be decompressed with ``gunzip``.
|
|
68
68
|
|
|
69
69
|
After you have obtained a database and imported the module, call
|
|
70
|
-
``open_database`` with a path, or file
|
|
70
|
+
``open_database`` with a path, or binary file object (with ``Mode.FD`` or ``Mode.AUTO``),
|
|
71
71
|
to the database as the first argument. Optionally, you may pass a mode as the
|
|
72
72
|
second argument. The modes are available from ``maxminddb.Mode``. Valid modes are:
|
|
73
73
|
|
|
@@ -75,13 +75,16 @@ second argument. The modes are available from ``maxminddb.Mode``. Valid modes ar
|
|
|
75
75
|
* ``Mode.MMAP`` - read from memory map. Pure Python.
|
|
76
76
|
* ``Mode.FILE`` - read database as standard file. Pure Python.
|
|
77
77
|
* ``Mode.MEMORY`` - load database into memory. Pure Python.
|
|
78
|
-
* ``Mode.FD`` - load database into memory from a file
|
|
78
|
+
* ``Mode.FD`` - load database into memory from a binary file object. Pure Python.
|
|
79
79
|
* ``Mode.AUTO`` - try ``Mode.MMAP_EXT``, ``Mode.MMAP``, ``Mode.FILE`` in that
|
|
80
|
-
order.
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
file
|
|
80
|
+
order. A file object is read into memory with the pure Python reader, as
|
|
81
|
+
with ``Mode.FD``. Pass a path to use the faster C extension. Default.
|
|
82
|
+
|
|
83
|
+
**NOTE**: When using a file object, it is the *caller's* responsibility to be
|
|
84
|
+
sure that the file object gets closed properly. The caller may close the
|
|
85
|
+
file object immediately after the ``Reader`` object is created. The pure
|
|
86
|
+
Python reader closes a file descriptor that you pass to it. This includes
|
|
87
|
+
``Mode.AUTO`` when the C extension is not installed.
|
|
85
88
|
|
|
86
89
|
The ``open_database`` function returns a ``Reader`` object. To look up an IP
|
|
87
90
|
address, use the ``get`` method on this object. The method will return the
|
|
@@ -39,7 +39,7 @@ provide `free GeoLite databases
|
|
|
39
39
|
files must be decompressed with ``gunzip``.
|
|
40
40
|
|
|
41
41
|
After you have obtained a database and imported the module, call
|
|
42
|
-
``open_database`` with a path, or file
|
|
42
|
+
``open_database`` with a path, or binary file object (with ``Mode.FD`` or ``Mode.AUTO``),
|
|
43
43
|
to the database as the first argument. Optionally, you may pass a mode as the
|
|
44
44
|
second argument. The modes are available from ``maxminddb.Mode``. Valid modes are:
|
|
45
45
|
|
|
@@ -47,13 +47,16 @@ second argument. The modes are available from ``maxminddb.Mode``. Valid modes ar
|
|
|
47
47
|
* ``Mode.MMAP`` - read from memory map. Pure Python.
|
|
48
48
|
* ``Mode.FILE`` - read database as standard file. Pure Python.
|
|
49
49
|
* ``Mode.MEMORY`` - load database into memory. Pure Python.
|
|
50
|
-
* ``Mode.FD`` - load database into memory from a file
|
|
50
|
+
* ``Mode.FD`` - load database into memory from a binary file object. Pure Python.
|
|
51
51
|
* ``Mode.AUTO`` - try ``Mode.MMAP_EXT``, ``Mode.MMAP``, ``Mode.FILE`` in that
|
|
52
|
-
order.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
file
|
|
52
|
+
order. A file object is read into memory with the pure Python reader, as
|
|
53
|
+
with ``Mode.FD``. Pass a path to use the faster C extension. Default.
|
|
54
|
+
|
|
55
|
+
**NOTE**: When using a file object, it is the *caller's* responsibility to be
|
|
56
|
+
sure that the file object gets closed properly. The caller may close the
|
|
57
|
+
file object immediately after the ``Reader`` object is created. The pure
|
|
58
|
+
Python reader closes a file descriptor that you pass to it. This includes
|
|
59
|
+
``Mode.AUTO`` when the C extension is not installed.
|
|
57
60
|
|
|
58
61
|
The ``open_database`` function returns a ``Reader`` object. To look up an IP
|
|
59
62
|
address, use the ``get`` method on this object. The method will return the
|
|
@@ -35,6 +35,24 @@ Database Reader
|
|
|
35
35
|
:undoc-members:
|
|
36
36
|
:show-inheritance:
|
|
37
37
|
|
|
38
|
+
=====
|
|
39
|
+
Types
|
|
40
|
+
=====
|
|
41
|
+
|
|
42
|
+
.. automodule:: maxminddb.types
|
|
43
|
+
:members:
|
|
44
|
+
:undoc-members:
|
|
45
|
+
:exclude-members: Primitive, Record
|
|
46
|
+
|
|
47
|
+
.. The runtime values of these aliases contain AnyStr, so give the types that
|
|
48
|
+
type checkers see.
|
|
49
|
+
|
|
50
|
+
.. autodata:: maxminddb.types.Primitive
|
|
51
|
+
:annotation: = str | bytes | bytearray | bool | float | int
|
|
52
|
+
|
|
53
|
+
.. autodata:: maxminddb.types.Record
|
|
54
|
+
:annotation: = Primitive | RecordList | RecordDict
|
|
55
|
+
|
|
38
56
|
==================
|
|
39
57
|
Indices and tables
|
|
40
58
|
==================
|
|
@@ -6,16 +6,28 @@ on:
|
|
|
6
6
|
- cron: '3 20 * * SUN'
|
|
7
7
|
permissions: {}
|
|
8
8
|
jobs:
|
|
9
|
+
# The -m32 variants build and test as 32-bit. ssize_t and long are 32 bits
|
|
10
|
+
# wide on i686, which exposes signedness and range problems that the 64-bit
|
|
11
|
+
# builds cannot see. The flag goes in CC rather than CFLAGS so that the
|
|
12
|
+
# libtap build, which has its own Makefile, and the test scripts that
|
|
13
|
+
# compile code themselves pick it up too. CFLAGS must stay out of the job
|
|
14
|
+
# environment: when it is set, even empty, make exports the configured
|
|
15
|
+
# CFLAGS to libtap, and libtap does not build on macOS with _POSIX_C_SOURCE.
|
|
9
16
|
test-autoconf:
|
|
10
17
|
strategy:
|
|
11
18
|
matrix:
|
|
12
19
|
os: [ubuntu-latest, macos-latest]
|
|
13
20
|
cc: [gcc, clang]
|
|
14
21
|
posix: ['', -D_POSIX_C_SOURCE=200112L]
|
|
15
|
-
|
|
22
|
+
arch: ['', -m32]
|
|
23
|
+
exclude:
|
|
24
|
+
- os: macos-latest
|
|
25
|
+
arch: -m32
|
|
26
|
+
name: Autotools build on ${{matrix.os}} using ${{matrix.cc}} ${{matrix.posix}} ${{matrix.arch}}
|
|
16
27
|
runs-on: ${{ matrix.os }}
|
|
17
28
|
env:
|
|
18
|
-
CC: ${{ matrix.cc }}
|
|
29
|
+
CC: ${{ matrix.cc }} ${{ matrix.arch }}
|
|
30
|
+
CXXFLAGS: ${{ matrix.arch }}
|
|
19
31
|
VERBOSE: 1
|
|
20
32
|
steps:
|
|
21
33
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
@@ -24,6 +36,8 @@ jobs:
|
|
|
24
36
|
persist-credentials: false
|
|
25
37
|
- run: sudo apt install libipc-run3-perl
|
|
26
38
|
if: ${{ matrix.os == 'ubuntu-latest' }}
|
|
39
|
+
- run: sudo apt-get update && sudo apt-get install -y gcc-multilib g++-multilib
|
|
40
|
+
if: ${{ matrix.os == 'ubuntu-latest' && matrix.arch == '-m32' }}
|
|
27
41
|
- run: brew install autoconf automake libtool
|
|
28
42
|
if: ${{ matrix.os == 'macos-latest' }}
|
|
29
43
|
- run: ./bootstrap
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## 1.14.1 - 2026-09-17
|
|
2
|
+
|
|
3
|
+
- Fixed a `-Wsign-compare` warning in `MMDB_open()` that broke builds with
|
|
4
|
+
`-Werror` on platforms where `ssize_t` is 32 bits, such as i686. Pull request
|
|
5
|
+
by Robert Scheck. GitHub #487.
|
|
6
|
+
|
|
1
7
|
## 1.14.0 - 2026-09-08
|
|
2
8
|
|
|
3
9
|
- Bounded the resources that `MMDB_get_entry_data_list()` spends decoding a
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# Process this file with autoconf to produce a configure script.
|
|
3
3
|
|
|
4
4
|
AC_PREREQ([2.63])
|
|
5
|
-
AC_INIT([libmaxminddb], [1.14.
|
|
5
|
+
AC_INIT([libmaxminddb], [1.14.1], [support@maxmind.com])
|
|
6
6
|
AC_CONFIG_SRCDIR([include/maxminddb.h])
|
|
7
7
|
AC_CONFIG_HEADERS([config.h include/maxminddb_config.h])
|
|
8
8
|
|
|
@@ -367,16 +367,16 @@ int MMDB_open(const char *const filename, uint32_t flags, MMDB_s *const mmdb) {
|
|
|
367
367
|
}
|
|
368
368
|
ssize_t data_section_size =
|
|
369
369
|
mmdb->file_size - search_tree_size - MMDB_DATA_SECTION_SEPARATOR;
|
|
370
|
-
if (data_section_size
|
|
370
|
+
if (data_section_size <= 0 || (uint64_t)data_section_size > UINT32_MAX) {
|
|
371
371
|
status = MMDB_INVALID_METADATA_ERROR;
|
|
372
372
|
goto cleanup;
|
|
373
373
|
}
|
|
374
374
|
mmdb->data_section_size = (uint32_t)data_section_size;
|
|
375
375
|
|
|
376
376
|
// Although it is likely not possible to construct a database with valid
|
|
377
|
-
//
|
|
378
|
-
//
|
|
379
|
-
//
|
|
377
|
+
// metadata, as parsed above, and a data_section_size less than 3, we do
|
|
378
|
+
// this check as later we assume it is at least three when doing bound
|
|
379
|
+
// checks.
|
|
380
380
|
if (mmdb->data_section_size < 3) {
|
|
381
381
|
status = MMDB_INVALID_DATA_ERROR;
|
|
382
382
|
goto cleanup;
|
|
@@ -21,14 +21,16 @@ if ($@) {
|
|
|
21
21
|
my $root = abs_path("$Bin/..");
|
|
22
22
|
my $include_dir = "$root/include";
|
|
23
23
|
my $src_dir = "$root/src";
|
|
24
|
-
|
|
24
|
+
|
|
25
|
+
# CC may carry flags, such as CC="gcc -m32".
|
|
26
|
+
my @cc = split ' ', $ENV{CC} || 'cc';
|
|
25
27
|
|
|
26
28
|
# The checks below rebuild the library with -Werror. Only gcc and clang are
|
|
27
29
|
# known to compile it cleanly with the flags used here, so skip elsewhere
|
|
28
30
|
# instead of failing on a missing compiler or an unrelated warning.
|
|
29
31
|
my ( $cc_version, $cc_stderr ) = ( q{}, q{} );
|
|
30
32
|
my $cc_status = eval {
|
|
31
|
-
run3( [
|
|
33
|
+
run3( [ @cc, '--version' ], \undef, \$cc_version, \$cc_stderr );
|
|
32
34
|
$?;
|
|
33
35
|
};
|
|
34
36
|
$cc_version .= $cc_stderr;
|
|
@@ -44,7 +46,7 @@ my @instrumentation = grep { /^-f/ }
|
|
|
44
46
|
map { split ' ' } grep { defined } @ENV{ 'CFLAGS', 'LDFLAGS' };
|
|
45
47
|
|
|
46
48
|
my @base = (
|
|
47
|
-
|
|
49
|
+
@cc,
|
|
48
50
|
@instrumentation,
|
|
49
51
|
'-std=c99',
|
|
50
52
|
'-Wall',
|