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.
Files changed (314) hide show
  1. {maxminddb-3.2.0 → maxminddb-3.3.0}/HISTORY.rst +105 -0
  2. {maxminddb-3.2.0/maxminddb.egg-info → maxminddb-3.3.0}/PKG-INFO +11 -8
  3. {maxminddb-3.2.0 → maxminddb-3.3.0}/README.rst +10 -7
  4. {maxminddb-3.2.0 → maxminddb-3.3.0}/docs/index.rst +18 -0
  5. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/.github/workflows/pages.yml +1 -1
  6. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/.github/workflows/test.yml +16 -2
  7. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/CMakeLists.txt +1 -1
  8. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/Changes.md +6 -0
  9. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/configure.ac +1 -1
  10. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/src/maxminddb.c +4 -4
  11. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/decoder_limits_t.pl +5 -3
  12. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/maxminddb.c +379 -118
  13. maxminddb-3.3.0/maxminddb/__init__.py +113 -0
  14. {maxminddb-3.2.0 → maxminddb-3.3.0}/maxminddb/const.py +5 -2
  15. {maxminddb-3.2.0 → maxminddb-3.3.0}/maxminddb/decoder.py +98 -24
  16. {maxminddb-3.2.0 → maxminddb-3.3.0}/maxminddb/extension.pyi +26 -8
  17. {maxminddb-3.2.0 → maxminddb-3.3.0}/maxminddb/file.py +26 -6
  18. maxminddb-3.3.0/maxminddb/reader.py +646 -0
  19. maxminddb-3.3.0/maxminddb/types.py +38 -0
  20. {maxminddb-3.2.0 → maxminddb-3.3.0/maxminddb.egg-info}/PKG-INFO +11 -8
  21. {maxminddb-3.2.0 → maxminddb-3.3.0}/maxminddb.egg-info/SOURCES.txt +9 -4
  22. maxminddb-3.3.0/mise.lock +69 -0
  23. {maxminddb-3.2.0 → maxminddb-3.3.0}/mise.toml +1 -0
  24. {maxminddb-3.2.0 → maxminddb-3.3.0}/pyproject.toml +11 -2
  25. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/.github/workflows/check-untagged-deps.yml +1 -1
  26. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/.github/workflows/codeql-analysis.yml +3 -11
  27. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/.github/workflows/go.yml +1 -1
  28. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/.github/workflows/links.yml +1 -1
  29. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/.github/workflows/pages.yml +2 -2
  30. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/.github/workflows/precious.yml +1 -1
  31. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/.github/workflows/zizmor.yml +1 -1
  32. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/.golangci.yml +100 -90
  33. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/MaxMind-DB-spec.md +7 -0
  34. maxminddb-3.3.0/tests/data/bad-data/README.md +29 -0
  35. maxminddb-3.3.0/tests/data/bad-data/libmaxminddb/libmaxminddb-deep-array-nesting.mmdb +0 -0
  36. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/libmaxminddb/libmaxminddb-deep-nesting.mmdb +0 -0
  37. maxminddb-3.3.0/tests/data/bad-data/libmaxminddb/libmaxminddb-repeated-description-key.mmdb +0 -0
  38. maxminddb-3.3.0/tests/data/bad-data/libmaxminddb/libmaxminddb-repeated-metadata-key.mmdb +0 -0
  39. maxminddb-3.3.0/tests/data/bad-data/libmaxminddb/libmaxminddb-repeated-node-count.mmdb +0 -0
  40. maxminddb-3.3.0/tests/data/bad-data/libmaxminddb/libmaxminddb-repeated-pointer-key.mmdb +0 -0
  41. maxminddb-3.3.0/tests/data/go.mod +11 -0
  42. maxminddb-3.3.0/tests/data/go.sum +12 -0
  43. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/mise.lock +37 -37
  44. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/pkg/writer/baddata.go +30 -24
  45. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/pkg/writer/decoder.go +9 -26
  46. maxminddb-3.3.0/tests/data/pkg/writer/fixtures_test.go +165 -0
  47. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/pkg/writer/geoip2.go +48 -28
  48. maxminddb-3.3.0/tests/data/pkg/writer/geoip2_test.go +237 -0
  49. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/pkg/writer/maxmind.go +5 -5
  50. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/pkg/writer/nestedstructures.go +3 -4
  51. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/pkg/writer/pointerdos_test.go +0 -1
  52. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/pkg/writer/rawmmdb.go +163 -29
  53. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/pkg/writer/rawmmdb_test.go +10 -1
  54. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/pkg/writer/writer.go +7 -3
  55. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/source-data/GeoIP-Anonymous-Plus-Test.json +9 -9
  56. maxminddb-3.3.0/tests/data/source-data/GeoIP-Regions-Test.json +474 -0
  57. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/source-data/GeoIP2-Anonymous-IP-Test.json +10 -10
  58. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/source-data/GeoIP2-City-Test.json +172 -221
  59. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/source-data/GeoIP2-Connection-Type-Test.json +24 -24
  60. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/source-data/GeoIP2-Country-Test.json +1901 -144
  61. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/source-data/GeoIP2-DensityIncome-Test.json +2 -2
  62. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/source-data/GeoIP2-Domain-Test.json +89 -89
  63. 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
  64. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/source-data/GeoIP2-IP-Risk-Test.json +4 -4
  65. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/source-data/GeoIP2-ISP-Test.json +1879 -1879
  66. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/source-data/GeoIP2-Static-IP-Score-Test.json +150 -150
  67. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/source-data/GeoIP2-User-Count-Test.json +150 -150
  68. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/source-data/GeoLite2-City-Test.json +140 -116
  69. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/source-data/GeoLite2-Country-Test.json +116 -116
  70. maxminddb-3.3.0/tests/data/test-data/GeoIP-Anonymous-Plus-Test.mmdb +0 -0
  71. maxminddb-3.3.0/tests/data/test-data/GeoIP-Regions-Test.mmdb +0 -0
  72. maxminddb-3.3.0/tests/data/test-data/GeoIP-Residential-Proxy-Test.mmdb +0 -0
  73. maxminddb-3.3.0/tests/data/test-data/GeoIP2-Anonymous-IP-Test.mmdb +0 -0
  74. maxminddb-3.3.0/tests/data/test-data/GeoIP2-City-Shield-Test.mmdb +0 -0
  75. maxminddb-3.3.0/tests/data/test-data/GeoIP2-City-Test.mmdb +0 -0
  76. maxminddb-3.3.0/tests/data/test-data/GeoIP2-Connection-Type-Test.mmdb +0 -0
  77. maxminddb-3.3.0/tests/data/test-data/GeoIP2-Country-Shield-Test.mmdb +0 -0
  78. maxminddb-3.3.0/tests/data/test-data/GeoIP2-Country-Test.mmdb +0 -0
  79. maxminddb-3.3.0/tests/data/test-data/GeoIP2-DensityIncome-Test.mmdb +0 -0
  80. maxminddb-3.3.0/tests/data/test-data/GeoIP2-Domain-Test.mmdb +0 -0
  81. maxminddb-3.3.0/tests/data/test-data/GeoIP2-Enterprise-Shield-Test.mmdb +0 -0
  82. maxminddb-3.3.0/tests/data/test-data/GeoIP2-Enterprise-Test.mmdb +0 -0
  83. maxminddb-3.3.0/tests/data/test-data/GeoIP2-IP-Risk-Test.mmdb +0 -0
  84. maxminddb-3.3.0/tests/data/test-data/GeoIP2-ISP-Test.mmdb +0 -0
  85. maxminddb-3.3.0/tests/data/test-data/GeoIP2-Static-IP-Score-Test.mmdb +0 -0
  86. maxminddb-3.3.0/tests/data/test-data/GeoIP2-User-Count-Test.mmdb +0 -0
  87. maxminddb-3.3.0/tests/data/test-data/GeoLite2-ASN-Test.mmdb +0 -0
  88. maxminddb-3.3.0/tests/data/test-data/GeoLite2-City-Test.mmdb +0 -0
  89. maxminddb-3.3.0/tests/data/test-data/GeoLite2-Country-Test.mmdb +0 -0
  90. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-no-ipv4-search-tree.mmdb +0 -0
  91. maxminddb-3.3.0/tests/data/test-data/MaxMind-DB-string-value-entries.mmdb +0 -0
  92. maxminddb-3.3.0/tests/data/test-data/MaxMind-DB-test-decoder.mmdb +0 -0
  93. maxminddb-3.3.0/tests/data/test-data/MaxMind-DB-test-ipv4-24.mmdb +0 -0
  94. maxminddb-3.3.0/tests/data/test-data/MaxMind-DB-test-ipv4-28.mmdb +0 -0
  95. maxminddb-3.3.0/tests/data/test-data/MaxMind-DB-test-ipv4-32.mmdb +0 -0
  96. maxminddb-3.3.0/tests/data/test-data/MaxMind-DB-test-ipv6-24.mmdb +0 -0
  97. maxminddb-3.3.0/tests/data/test-data/MaxMind-DB-test-ipv6-28.mmdb +0 -0
  98. maxminddb-3.3.0/tests/data/test-data/MaxMind-DB-test-ipv6-32.mmdb +0 -0
  99. maxminddb-3.3.0/tests/data/test-data/MaxMind-DB-test-metadata-pointers.mmdb +0 -0
  100. maxminddb-3.3.0/tests/data/test-data/MaxMind-DB-test-mixed-24.mmdb +0 -0
  101. maxminddb-3.3.0/tests/data/test-data/MaxMind-DB-test-mixed-28.mmdb +0 -0
  102. maxminddb-3.3.0/tests/data/test-data/MaxMind-DB-test-mixed-32.mmdb +0 -0
  103. maxminddb-3.3.0/tests/data/test-data/MaxMind-DB-test-nested.mmdb +0 -0
  104. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/decoder_test.py +139 -5
  105. maxminddb-3.3.0/tests/reader_test.py +2405 -0
  106. maxminddb-3.3.0/tests/typing_test.py +52 -0
  107. maxminddb-3.3.0/uv.lock +618 -0
  108. maxminddb-3.2.0/maxminddb/__init__.py +0 -91
  109. maxminddb-3.2.0/maxminddb/reader.py +0 -383
  110. maxminddb-3.2.0/maxminddb/types.py +0 -15
  111. maxminddb-3.2.0/mise.lock +0 -29
  112. maxminddb-3.2.0/tests/data/bad-data/README.md +0 -14
  113. maxminddb-3.2.0/tests/data/bad-data/libmaxminddb/libmaxminddb-deep-array-nesting.mmdb +0 -0
  114. maxminddb-3.2.0/tests/data/go.mod +0 -11
  115. maxminddb-3.2.0/tests/data/go.sum +0 -16
  116. maxminddb-3.2.0/tests/data/source-data/GeoIP2-Enterprise-Test.json +0 -1884
  117. maxminddb-3.2.0/tests/data/source-data/GeoIP2-Precision-Enterprise-Sandbox-Test.json +0 -296
  118. maxminddb-3.2.0/tests/data/test-data/GeoIP-Anonymous-Plus-Test.mmdb +0 -0
  119. maxminddb-3.2.0/tests/data/test-data/GeoIP-Residential-Proxy-Test.mmdb +0 -0
  120. maxminddb-3.2.0/tests/data/test-data/GeoIP2-Anonymous-IP-Test.mmdb +0 -0
  121. maxminddb-3.2.0/tests/data/test-data/GeoIP2-City-Shield-Test.mmdb +0 -0
  122. maxminddb-3.2.0/tests/data/test-data/GeoIP2-City-Test.mmdb +0 -0
  123. maxminddb-3.2.0/tests/data/test-data/GeoIP2-Connection-Type-Test.mmdb +0 -0
  124. maxminddb-3.2.0/tests/data/test-data/GeoIP2-Country-Shield-Test.mmdb +0 -0
  125. maxminddb-3.2.0/tests/data/test-data/GeoIP2-Country-Test.mmdb +0 -0
  126. maxminddb-3.2.0/tests/data/test-data/GeoIP2-DensityIncome-Test.mmdb +0 -0
  127. maxminddb-3.2.0/tests/data/test-data/GeoIP2-Domain-Test.mmdb +0 -0
  128. maxminddb-3.2.0/tests/data/test-data/GeoIP2-Enterprise-Shield-Test.mmdb +0 -0
  129. maxminddb-3.2.0/tests/data/test-data/GeoIP2-Enterprise-Test.mmdb +0 -0
  130. maxminddb-3.2.0/tests/data/test-data/GeoIP2-IP-Risk-Test.mmdb +0 -0
  131. maxminddb-3.2.0/tests/data/test-data/GeoIP2-ISP-Test.mmdb +0 -0
  132. maxminddb-3.2.0/tests/data/test-data/GeoIP2-Precision-Enterprise-Shield-Test.mmdb +0 -0
  133. maxminddb-3.2.0/tests/data/test-data/GeoIP2-Precision-Enterprise-Test.mmdb +0 -0
  134. maxminddb-3.2.0/tests/data/test-data/GeoIP2-Static-IP-Score-Test.mmdb +0 -0
  135. maxminddb-3.2.0/tests/data/test-data/GeoIP2-User-Count-Test.mmdb +0 -0
  136. maxminddb-3.2.0/tests/data/test-data/GeoLite2-ASN-Test.mmdb +0 -0
  137. maxminddb-3.2.0/tests/data/test-data/GeoLite2-City-Test.mmdb +0 -0
  138. maxminddb-3.2.0/tests/data/test-data/GeoLite2-Country-Test.mmdb +0 -0
  139. maxminddb-3.2.0/tests/data/test-data/MaxMind-DB-string-value-entries.mmdb +0 -0
  140. maxminddb-3.2.0/tests/data/test-data/MaxMind-DB-test-decoder.mmdb +0 -0
  141. maxminddb-3.2.0/tests/data/test-data/MaxMind-DB-test-ipv4-24.mmdb +0 -0
  142. maxminddb-3.2.0/tests/data/test-data/MaxMind-DB-test-ipv4-28.mmdb +0 -0
  143. maxminddb-3.2.0/tests/data/test-data/MaxMind-DB-test-ipv4-32.mmdb +0 -0
  144. maxminddb-3.2.0/tests/data/test-data/MaxMind-DB-test-ipv6-24.mmdb +0 -0
  145. maxminddb-3.2.0/tests/data/test-data/MaxMind-DB-test-ipv6-28.mmdb +0 -0
  146. maxminddb-3.2.0/tests/data/test-data/MaxMind-DB-test-ipv6-32.mmdb +0 -0
  147. maxminddb-3.2.0/tests/data/test-data/MaxMind-DB-test-metadata-pointers.mmdb +0 -0
  148. maxminddb-3.2.0/tests/data/test-data/MaxMind-DB-test-mixed-24.mmdb +0 -0
  149. maxminddb-3.2.0/tests/data/test-data/MaxMind-DB-test-mixed-28.mmdb +0 -0
  150. maxminddb-3.2.0/tests/data/test-data/MaxMind-DB-test-mixed-32.mmdb +0 -0
  151. maxminddb-3.2.0/tests/data/test-data/MaxMind-DB-test-nested.mmdb +0 -0
  152. maxminddb-3.2.0/tests/reader_test.py +0 -1088
  153. maxminddb-3.2.0/uv.lock +0 -572
  154. {maxminddb-3.2.0 → maxminddb-3.3.0}/LICENSE +0 -0
  155. {maxminddb-3.2.0 → maxminddb-3.3.0}/MANIFEST.in +0 -0
  156. {maxminddb-3.2.0 → maxminddb-3.3.0}/docs/Makefile +0 -0
  157. {maxminddb-3.2.0 → maxminddb-3.3.0}/docs/conf.py +0 -0
  158. {maxminddb-3.2.0 → maxminddb-3.3.0}/examples/benchmark.py +0 -0
  159. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/.clang-format +0 -0
  160. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/.github/dependabot.yml +0 -0
  161. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/.github/workflows/clang-addresssanitizer.yml +0 -0
  162. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/.github/workflows/clang-analyzer.yml +0 -0
  163. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/.github/workflows/codeql-analysis.yml +0 -0
  164. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/.github/workflows/dependabot-failure-watcher.yml +0 -0
  165. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/.github/workflows/links.yml +0 -0
  166. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/.github/workflows/precious.yml +0 -0
  167. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/.github/workflows/zizmor.yml +0 -0
  168. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/.gitignore +0 -0
  169. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/.gitmodules +0 -0
  170. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/.perltidyrc +0 -0
  171. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/.precious.toml +0 -0
  172. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/AUTHORS +0 -0
  173. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/LICENSE +0 -0
  174. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/Makefile.am +0 -0
  175. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/NOTICE +0 -0
  176. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/README.dev.md +0 -0
  177. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/README.fuzzing.md +0 -0
  178. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/README.md +0 -0
  179. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/bin/CMakeLists.txt +0 -0
  180. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/bin/Makefile.am +0 -0
  181. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/bin/mmdblookup.c +0 -0
  182. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/bootstrap +0 -0
  183. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/c_flag_overrides.cmake +0 -0
  184. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/cmake_uninstall.cmake.in +0 -0
  185. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/common.mk +0 -0
  186. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/cxx_flag_overrides.cmake +0 -0
  187. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/dev-bin/make-man-pages.pl +0 -0
  188. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/dev-bin/ppa-release.sh +0 -0
  189. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/dev-bin/release.sh +0 -0
  190. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/dev-bin/valgrind-all.pl +0 -0
  191. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/doc/libmaxminddb.md +0 -0
  192. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/doc/mmdblookup.md +0 -0
  193. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/docs/assets/css/main.css +0 -0
  194. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/docs/hugo.toml +0 -0
  195. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/docs/layouts/404.html +0 -0
  196. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/docs/layouts/_default/_markup/render-heading.html +0 -0
  197. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/docs/layouts/_default/default.html +0 -0
  198. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/include/maxminddb.h +0 -0
  199. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/include/maxminddb_config.h.cmake.in +0 -0
  200. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/include/maxminddb_config.h.in +0 -0
  201. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/lychee.toml +0 -0
  202. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/mise.lock +0 -0
  203. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/mise.toml +0 -0
  204. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/src/Makefile.am +0 -0
  205. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/src/data-pool.c +0 -0
  206. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/src/data-pool.h +0 -0
  207. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/src/libmaxminddb.pc.in +0 -0
  208. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/src/maxminddb-compat-util.h +0 -0
  209. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/CMakeLists.txt +0 -0
  210. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/Makefile.am +0 -0
  211. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/bad_data_size_t.c +0 -0
  212. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/bad_databases_t.c +0 -0
  213. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/bad_epoch_t.c +0 -0
  214. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/bad_indent_t.c +0 -0
  215. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/bad_pointers_t.c +0 -0
  216. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/bad_search_tree_t.c +0 -0
  217. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/basic_lookup_t.c +0 -0
  218. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/compile_c++_t.pl +0 -0
  219. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/data-pool-t.c +0 -0
  220. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/data_entry_list_t.c +0 -0
  221. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/data_types_t.c +0 -0
  222. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/double_close_t.c +0 -0
  223. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/dump_t.c +0 -0
  224. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/empty_container_metadata_t.c +0 -0
  225. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/external_symbols_t.pl +0 -0
  226. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/fuzz_mmdb.c +0 -0
  227. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/gai_error_t.c +0 -0
  228. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/get_value_pointer_bug_t.c +0 -0
  229. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/get_value_t.c +0 -0
  230. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/invalid_sockaddr_t.c +0 -0
  231. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/ipv4_start_cache_t.c +0 -0
  232. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/ipv6_lookup_in_ipv4_t.c +0 -0
  233. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/max_depth_t.c +0 -0
  234. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/maxminddb_test_helper.c +0 -0
  235. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/maxminddb_test_helper.h +0 -0
  236. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/metadata_marker_t.c +0 -0
  237. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/metadata_pointers_t.c +0 -0
  238. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/metadata_t.c +0 -0
  239. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/mmdblookup_t.pl +0 -0
  240. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/no_map_get_value_t.c +0 -0
  241. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/overflow_bounds_t.c +0 -0
  242. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/pointer_dos_t.c +0 -0
  243. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/read_node_t.c +0 -0
  244. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/threads_t.c +0 -0
  245. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/libmaxminddb/t/version_t.c +0 -0
  246. {maxminddb-3.2.0 → maxminddb-3.3.0}/extension/maxminddb_config.h +0 -0
  247. {maxminddb-3.2.0 → maxminddb-3.3.0}/lychee.toml +0 -0
  248. {maxminddb-3.2.0 → maxminddb-3.3.0}/maxminddb/errors.py +0 -0
  249. {maxminddb-3.2.0 → maxminddb-3.3.0}/maxminddb/py.typed +0 -0
  250. {maxminddb-3.2.0 → maxminddb-3.3.0}/maxminddb.egg-info/dependency_links.txt +0 -0
  251. {maxminddb-3.2.0 → maxminddb-3.3.0}/maxminddb.egg-info/top_level.txt +0 -0
  252. {maxminddb-3.2.0 → maxminddb-3.3.0}/setup.cfg +0 -0
  253. {maxminddb-3.2.0 → maxminddb-3.3.0}/setup.py +0 -0
  254. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/__init__.py +0 -0
  255. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/.gitattributes +0 -0
  256. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/.gitconfig +0 -0
  257. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/.github/dependabot.yml +0 -0
  258. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/.github/workflows/dependabot-failure-watcher.yml +0 -0
  259. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/.gitignore +0 -0
  260. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/.precious.toml +0 -0
  261. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/LICENSE-APACHE +0 -0
  262. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/LICENSE-MIT +0 -0
  263. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/README.md +0 -0
  264. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/libmaxminddb/libmaxminddb-corrupt-search-tree.mmdb +0 -0
  265. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/libmaxminddb/libmaxminddb-empty-array-last-in-metadata.mmdb +0 -0
  266. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/libmaxminddb/libmaxminddb-empty-map-last-in-metadata.mmdb +0 -0
  267. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/libmaxminddb/libmaxminddb-metadata-marker-only.mmdb +0 -0
  268. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/libmaxminddb/libmaxminddb-offset-integer-overflow.mmdb +0 -0
  269. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/libmaxminddb/libmaxminddb-oversized-array.mmdb +0 -0
  270. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/libmaxminddb/libmaxminddb-oversized-map.mmdb +0 -0
  271. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/libmaxminddb/libmaxminddb-separator-record-max-left.mmdb +0 -0
  272. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/libmaxminddb/libmaxminddb-separator-record-min-left.mmdb +0 -0
  273. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/libmaxminddb/libmaxminddb-separator-record-min-right.mmdb +0 -0
  274. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/libmaxminddb/libmaxminddb-uint64-max-epoch.mmdb +0 -0
  275. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/maxminddb-golang/cyclic-data-structure.mmdb +0 -0
  276. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/maxminddb-golang/invalid-bytes-length.mmdb +0 -0
  277. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/maxminddb-golang/invalid-data-record-offset.mmdb +0 -0
  278. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/maxminddb-golang/invalid-map-key-length.mmdb +0 -0
  279. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/maxminddb-golang/invalid-string-length.mmdb +0 -0
  280. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/maxminddb-golang/metadata-is-an-uint128.mmdb +0 -0
  281. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/maxminddb-golang/unexpected-bytes.mmdb +0 -0
  282. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/bad-data/maxminddb-python/bad-unicode-in-map-key.mmdb +0 -0
  283. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/cmd/write-test-data/main.go +0 -0
  284. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/docs/assets/css/main.css +0 -0
  285. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/docs/hugo.toml +0 -0
  286. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/docs/layouts/404.html +0 -0
  287. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/docs/layouts/_default/_markup/render-heading.html +0 -0
  288. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/docs/layouts/_default/default.html +0 -0
  289. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/lychee.toml +0 -0
  290. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/mise.toml +0 -0
  291. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/pkg/writer/ip.go +0 -0
  292. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/pkg/writer/pointerdos.go +0 -0
  293. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/source-data/GeoIP-Residential-Proxy-Test.json +0 -0
  294. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/source-data/GeoLite2-ASN-Test.json +0 -0
  295. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/GeoIP2-City-Test-Broken-Double-Format.mmdb +0 -0
  296. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/GeoIP2-City-Test-Invalid-Node-Count.mmdb +0 -0
  297. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-test-broken-pointers-24.mmdb +0 -0
  298. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-test-broken-search-tree-24.mmdb +0 -0
  299. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-test-decode-path-shared-budget.mmdb +0 -0
  300. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-test-decoder-payload-limit-over.mmdb +0 -0
  301. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-test-decoder-payload-limit.mmdb +0 -0
  302. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-test-decoder-value-limit-over.mmdb +0 -0
  303. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-test-decoder-value-limit-pointer-heavy.mmdb +0 -0
  304. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-test-decoder-value-limit.mmdb +0 -0
  305. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-test-metadata-payload-limit.mmdb +0 -0
  306. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-test-payload-amplification-dos-string.mmdb +0 -0
  307. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-test-payload-amplification-dos-worst-case.mmdb +0 -0
  308. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-test-payload-amplification-dos.mmdb +0 -0
  309. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-test-pointer-decoder-dos-ipv6.mmdb +0 -0
  310. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-test-pointer-decoder-dos.mmdb +0 -0
  311. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/MaxMind-DB-test-pointer-decoder.mmdb +0 -0
  312. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/README.md +0 -0
  313. {maxminddb-3.2.0 → maxminddb-3.3.0}/tests/data/test-data/maps-with-pointers.raw +0 -0
  314. {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.2.0
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 descriptor (in the case of ``Mode.FD``),
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 descriptor. Pure Python.
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. Default.
81
-
82
- **NOTE**: When using ``Mode.FD``, it is the *caller's* responsibility to be
83
- sure that the file descriptor gets closed properly. The caller may close the
84
- file descriptor immediately after the ``Reader`` object is created.
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 descriptor (in the case of ``Mode.FD``),
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 descriptor. Pure Python.
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. Default.
53
-
54
- **NOTE**: When using ``Mode.FD``, it is the *caller's* responsibility to be
55
- sure that the file descriptor gets closed properly. The caller may close the
56
- file descriptor immediately after the ``Reader`` object is created.
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
  ==================
@@ -51,4 +51,4 @@ jobs:
51
51
  steps:
52
52
  - name: Deploy to GitHub Pages
53
53
  id: deployment
54
- uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
54
+ uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1
@@ -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
- name: Autotools build on ${{matrix.os}} using ${{matrix.cc}} ${{matrix.posix}}
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
@@ -2,7 +2,7 @@ cmake_minimum_required (VERSION 3.9...3.30)
2
2
 
3
3
  project(maxminddb
4
4
  LANGUAGES C
5
- VERSION 1.14.0
5
+ VERSION 1.14.1
6
6
  )
7
7
  set(MAXMINDDB_SOVERSION 0.0.7)
8
8
  set(CMAKE_C_STANDARD 99)
@@ -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.0], [support@maxmind.com])
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 > UINT32_MAX || data_section_size <= 0) {
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
- // valid metadata, as parsed above, and a data_section_size less than 3,
378
- // we do this check as later we assume it is at least three when doing
379
- // bound checks.
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
- my $cc = $ENV{CC} || 'cc';
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( [ $cc, '--version' ], \undef, \$cc_version, \$cc_stderr );
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
- $cc,
49
+ @cc,
48
50
  @instrumentation,
49
51
  '-std=c99',
50
52
  '-Wall',