1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
|
[project]
name = "maxminddb"
version = "3.0.0"
description = "Reader for the MaxMind DB format"
authors = [
{name = "Gregory Oschwald", email = "goschwald@maxmind.com"},
]
requires-python = ">=3.10"
readme = "README.rst"
license = "Apache-2.0"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Internet",
"Topic :: Internet :: Proxy Servers",
]
[project.urls]
Homepage = "https://www.maxmind.com/"
Documentation = "https://maxminddb.readthedocs.org/"
"Source Code" = "https://github.com/maxmind/MaxMind-DB-Reader-python"
"Issue Tracker" = "https://github.com/maxmind/MaxMind-DB-Reader-python/issues"
[dependency-groups]
dev = [
"pytest>=8.3.5",
]
lint = [
"mypy>=1.15.0",
"ruff>=0.11.6",
]
[build-system]
requires = [
"setuptools>=77.0.3",
"setuptools-scm",
]
build-backend = "setuptools.build_meta"
[tool.setuptools]
include-package-data = true
packages = ["maxminddb"]
[tool.setuptools.package-data]
maxminddb = ["extension.pyi", "py.typed"]
[tool.ruff.lint]
select = ["ALL"]
ignore = [
# Skip type annotation on **_
"ANN003",
# Redundant as the formatter handles missing trailing commas.
"COM812",
# documenting magic methods
"D105",
# Conflicts with D211
"D203",
# Conflicts with D212
"D213",
# Magic numbers for HTTP status codes seem ok most of the time.
"PLR2004",
# pytest rules
"PT009",
"PT027",
# Using the built-in open is more appropriate for this library.
"PTH123",
]
[tool.ruff.lint.per-file-ignores]
"docs/*" = ["ALL"]
"maxminddb/extension.pyi" = [
# This is a stub for extension and having the docs here is useful.
"PYI021",
]
"setup.py" = ["ALL"]
"tests/*" = ["ANN201", "D"]
[tool.pytest.ini_options]
# Use importlib mode to prevent pytest from adding the project root to sys.path.
# This ensures tests import from the tox virtualenv's installed package (which includes
# the compiled C extension) rather than directly from the source directory (which doesn't
# have the .so file). We still test the source code, just via the installed version.
addopts = "--import-mode=importlib"
[tool.tox]
env_list = [
"3.10",
"3.11",
"3.12",
"3.13",
"3.14",
"lint",
]
skip_missing_interpreters = false
[tool.tox.env_run_base]
dependency_groups = [
"dev",
]
pass_env = [
"CFLAGS",
"LDFLAGS",
"MAXMINDDB_REQUIRE_EXTENSION",
"MAXMINDDB_USE_SYSTEM_LIBMAXMINDDB",
"MM_FORCE_EXT_TESTS",
]
commands = [
["pytest", "tests"],
]
[tool.tox.env.lint]
description = "Code linting"
python = "3.14"
dependency_groups = [
"dev",
"lint",
]
commands = [
["mypy", "maxminddb", "tests"],
["ruff", "check"],
["ruff", "format", "--check", "--diff", "."],
]
[tool.tox.gh.python]
"3.14" = ["3.14", "lint"]
"3.13" = ["3.13"]
"3.12" = ["3.12"]
"3.11" = ["3.11"]
"3.10" = ["3.10"]
|