content: [build-system]
  requires = [
    "setuptools >= 78.1.1; python_version >= '3.9'",
    "setuptools <= 75.3.2; python_version == '3.8'",
    "wheel",
    "gitpython",
    "setuptools_scm[toml]>=6.2",
  ]
  build-backend = "setuptools.build_meta"
  
  [tool.setuptools]
  packages = ["pymilvus"]
  
  
  [project]
  name="pymilvus"
  authors = [
    {name='Milvus Team', email="milvus-team@zilliz.com"},
  ]
  requires-python = '>=3.8'
  description = "Python Sdk for Milvus"
  readme = "README.md"
  dependencies=[
      "setuptools <= 75.3.2; python_version == '3.8'",
      "setuptools >= 78.1.1; python_version >= '3.9'",
      "grpcio>=1.66.2,!=1.68.0,!=1.68.1,!=1.69.0,!=1.70.0,!=1.70.1,!=1.71.0,!=1.72.1,!=1.73.0",
      "orjson>=3.10.15", # orjson 3.10.15 is the last version to support python3.8
      "protobuf>=5.27.2", # aligned with grpcio-tools generated codes
      "python-dotenv>=1.0.1, <2.0.0",
      "pandas>=1.2.4",
      "numpy<1.25.0;python_version<='3.8'",
  ]
  
  classifiers=[
      "Programming Language :: Python :: 3",
      "Programming Language :: Python :: 3.8",
      "Programming Language :: Python :: 3.9",
      "Programming Language :: Python :: 3.10",
      "Programming Language :: Python :: 3.11",
      "Programming Language :: Python :: 3.12",
      "Programming Language :: Python :: 3.13",
      "License :: OSI Approved :: Apache Software License",
  ]
  
  dynamic = ["version"]
  
  [project.urls]
  "repository" = 'https://github.com/milvus-io/pymilvus'
  
  [project.optional-dependencies]
  bulk_writer = [
      "requests",
      "minio>=7.0.0",
      "pyarrow>=12.0.0",
      "azure-storage-blob",
      "urllib3",
  ]
  
  model = [
      "pymilvus.model>=0.3.0",
  ]
  
  milvus_lite = [
      "milvus-lite>=2.4.0;sys_platform!='win32'",
  ]
  
  dev = [
      # Python3.13 supports starts from 1.66.2
      "grpcio==1.66.2",
      "grpcio-tools==1.66.2",
      "grpcio-testing==1.66.2",
      "pytest>=5.3.4",
      "pytest-cov>=5.0.0",
      "pytest-timeout>=1.3.4",
      "pytest-asyncio",
      "ruff>=0.12.9,<1",
      "black",
      # develop bulk_writer
      "requests",
      "minio>=7.0.0",
      "pyarrow>=12.0.0",
      "azure-storage-blob",
      "urllib3",
      "scipy",
  ]
  
  [tool.setuptools.dynamic]
  version = { attr = "_version_helper.version"}
  
  [tool.setuptools_scm]
  
  [tool.black]
  line-length = 100
  target-version = ['py38']
  include = '\.pyi?$'
  # 'extend-exclude' excludes files or directories in addition to the defaults
  extend-exclude = '''
  # A regex preceded with ^/ will apply only to files and directories
  # in the root of the project.
  (
    ^/foo.py    # exclude a file named foo.py in the root of the project
    | .*/grpc_gen/
  )
  '''
  
  [tool.ruff]
  lint.select = [
      "E",
      "F",
      "C90",
      "I",
      "N",
      "B", "C", "G",
      "A",
      "ANN001",
      "S", "T", "W", "ARG", "BLE", "COM", "DJ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"
  ]
  lint.ignore = [
      "N818",
      "DTZ", # datatime related
      "BLE", # blind-except (BLE001)
      "SLF", # SLF001 Private member accessed: `_fetch_handler` [E]
      "PD003",
      "TRY003", # [ruff] TRY003 Avoid specifying long messages outside the exception class [E] TODO
      "PLR2004", # Magic value used in comparison, consider replacing 65535 with a constant variable [E] TODO
      "TRY301", #[ruff] TRY301 Abstract `raise` to an inner function [E]
      "FBT001", #[ruff] FBT001 Boolean positional arg in function definition [E] TODO
      "FBT002", # [ruff] FBT002 Boolean default value in function definition [E] TODO
      "PLR0911", # Too many return statements (15 > 6) [E]
      "G004", # [ruff] G004 Logging statement uses f-string [E]
      "S603", # [ruff] S603 `subprocess` call: check for execution of untrusted input [E]
      "N802", #[ruff] N802 Function name `OK` should be lowercase [E] TODO
      "PD011", # [ruff] PD011 Use `.to_numpy()` instead of `.values` [E]
      "COM812",
      "FBT003", # [ruff] FBT003 Boolean positional value in function call [E] TODO
      "ARG002",
      "E501", # black takes care of it
      "ARG005", # [ruff] ARG005 Unused lambda argument: `disable` [E]
      "TRY400",
      "PLR0912", # TODO
      "PLR0915", # To many statements TODO
      "C901", # TODO
      "PYI041", # TODO
      "E402",
      "PLW1641", # TODO Object does not implement `__hash__` method
  ]
  
  # Allow autofix for all enabled rules (when `--fix`) is provided.
  lint.fixable = [
      "A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W",
      "ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT",
      "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH",
      "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP",
      "YTT",
  ]
  lint.unfixable = []
  
  show-fixes = true
  
  # Exclude a variety of commonly ignored directories.
  exclude = [
      ".bzr",
      ".direnv",
      ".eggs",
      ".git",
      ".git-rewrite",
      ".hg",
      ".mypy_cache",
      ".nox",
      ".pants.d",
      ".pytype",
      ".ruff_cache",
      ".svn",
      ".tox",
      ".venv",
      "__pypackages__",
      "_build",
      "buck-out",
      "build",
      "dist",
      "node_modules",
      "venv",
      "grpc_gen",
      "__pycache__",
      "pymilvus/client/stub.py",
  ]
  
  # Same as Black.
  line-length = 100
  
  # Allow unused variables when underscore-prefixed.
  lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
  
  # Assume Python 3.8
  target-version = "py38"
  
  [tool.ruff.lint.mccabe]
  # Unlike Flake8, default to a complexity level of 10.
  max-complexity = 18
  
  [tool.ruff.lint.pycodestyle]
  max-doc-length = 100
  
  [tool.ruff.lint.pylint]
  max-args = 20
  max-branches = 15
  
  [tool.ruff.lint.flake8-builtins]
  builtins-ignorelist = [
      "format",
      "next",
      "object", # TODO
      "id",
      "dict", # TODO
      "filter",
  ]
  builtins-allowed-modules = ["types"]
  