langchain/libs/langchain/pyproject.toml
Mason Daugherty 5e9eb19a83
chore: update branch with changes from master (#32277)
Co-authored-by: Maxime Grenu <69890511+cluster2600@users.noreply.github.com>
Co-authored-by: Claude <claude@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: jmaillefaud <jonathan.maillefaud@evooq.ch>
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
Co-authored-by: tanwirahmad <tanwirahmad@users.noreply.github.com>
Co-authored-by: Christophe Bornet <cbornet@hotmail.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: niceg <79145285+growmuye@users.noreply.github.com>
Co-authored-by: Chaitanya varma <varmac301@gmail.com>
Co-authored-by: dishaprakash <57954147+dishaprakash@users.noreply.github.com>
Co-authored-by: Chester Curme <chester.curme@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Kanav Bansal <13186335+bansalkanav@users.noreply.github.com>
Co-authored-by: Aleksandr Filippov <71711753+alex-feel@users.noreply.github.com>
Co-authored-by: Alex Feel <afilippov@spotware.com>
2025-07-28 10:39:41 -04:00

246 lines
7.8 KiB
TOML

[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[project]
authors = []
license = { text = "MIT" }
requires-python = ">=3.9, <4.0"
dependencies = [
"langchain-core<1.0.0,>=0.3.72",
"langchain-text-splitters<1.0.0,>=0.3.9",
"langsmith>=0.1.17",
"pydantic<3.0.0,>=2.7.4",
"SQLAlchemy<3,>=1.4",
"requests<3,>=2",
"PyYAML>=5.3",
"async-timeout<5.0.0,>=4.0.0; python_version < \"3.11\"",
]
name = "langchain"
version = "0.3.27"
description = "Building applications with LLMs through composability"
readme = "README.md"
[project.optional-dependencies]
community = ["langchain-community"]
anthropic = ["langchain-anthropic"]
openai = ["langchain-openai"]
azure-ai = ["langchain-azure-ai"]
cohere = ["langchain-cohere"]
google-vertexai = ["langchain-google-vertexai"]
google-genai = ["langchain-google-genai"]
fireworks = ["langchain-fireworks"]
ollama = ["langchain-ollama"]
together = ["langchain-together"]
mistralai = ["langchain-mistralai"]
huggingface = ["langchain-huggingface"]
groq = ["langchain-groq"]
aws = ["langchain-aws"]
deepseek = ["langchain-deepseek"]
xai = ["langchain-xai"]
perplexity = ["langchain-perplexity"]
[project.urls]
"Source Code" = "https://github.com/langchain-ai/langchain/tree/master/libs/langchain"
"Release Notes" = "https://github.com/langchain-ai/langchain/releases?q=tag%3A%22langchain%3D%3D0%22&expanded=true"
repository = "https://github.com/langchain-ai/langchain"
[dependency-groups]
test = [
"pytest<9,>=8",
"pytest-cov<5.0.0,>=4.0.0",
"pytest-dotenv<1.0.0,>=0.5.2",
"duckdb-engine<1.0.0,>=0.9.2",
"pytest-watcher<1.0.0,>=0.2.6",
"freezegun<2.0.0,>=1.2.2",
"responses<1.0.0,>=0.22.0",
"pytest-asyncio<1.0.0,>=0.23.2",
"lark<2.0.0,>=1.1.5",
"pandas<3.0.0,>=2.0.0",
"pytest-mock<4.0.0,>=3.10.0",
"pytest-socket<1.0.0,>=0.6.0",
"syrupy<5.0.0,>=4.0.2",
"requests-mock<2.0.0,>=1.11.0",
"pytest-xdist<4.0.0,>=3.6.1",
"blockbuster<1.6,>=1.5.18",
"cffi<1.17.1; python_version < \"3.10\"",
"cffi; python_version >= \"3.10\"",
"langchain-tests",
"langchain-core",
"langchain-text-splitters",
"langchain-openai",
"toml>=0.10.2",
"packaging>=24.2",
"numpy>=1.26.4; python_version<'3.13'",
"numpy>=2.1.0; python_version>='3.13'",
]
codespell = ["codespell<3.0.0,>=2.2.0"]
test_integration = [
"vcrpy>=7.0",
"urllib3<2; python_version < \"3.10\"",
"wrapt<2.0.0,>=1.15.0",
"python-dotenv<2.0.0,>=1.0.0",
"cassio<1.0.0,>=0.1.0",
"langchainhub<1.0.0,>=0.1.16",
"langchain-core",
"langchain-text-splitters",
]
lint = [
"ruff<0.13,>=0.12.2",
"cffi<1.17.1; python_version < \"3.10\"",
"cffi; python_version >= \"3.10\"",
]
typing = [
"mypy<1.16,>=1.15",
"types-pyyaml<7.0.0.0,>=6.0.12.2",
"types-requests<3.0.0.0,>=2.28.11.5",
"types-toml<1.0.0.0,>=0.10.8.1",
"types-redis<5.0.0.0,>=4.3.21.6",
"types-pytz<2024.0.0.0,>=2023.3.0.0",
"types-chardet<6.0.0.0,>=5.0.4.6",
"mypy-protobuf<4.0.0,>=3.0.0",
"langchain-core",
"langchain-text-splitters",
"numpy>=1.26.4; python_version < '3.13'",
"numpy>=2.1.0; python_version >= '3.13'",
]
dev = [
"jupyter<2.0.0,>=1.0.0",
"playwright<2.0.0,>=1.28.0",
"setuptools<68.0.0,>=67.6.1",
"langchain-core",
"langchain-text-splitters",
]
[tool.uv.sources]
langchain-core = { path = "../core", editable = true }
langchain-tests = { path = "../standard-tests", editable = true }
langchain-text-splitters = { path = "../text-splitters", editable = true }
langchain-openai = { path = "../partners/openai", editable = true }
[tool.ruff]
target-version = "py39"
exclude = ["tests/integration_tests/examples/non-utf8-encoding.py"]
[tool.mypy]
strict = "True"
strict_bytes = "True"
ignore_missing_imports = "True"
enable_error_code = "deprecated"
report_deprecated_as_note = "True"
# TODO: activate for 'strict' checking
disallow_untyped_calls = "False"
disallow_any_generics = "False"
disallow_untyped_decorators = "False"
warn_return_any = "False"
strict_equality = "False"
[tool.codespell]
skip = ".git,*.pdf,*.svg,*.pdf,*.yaml,*.ipynb,poetry.lock,*.min.js,*.css,package-lock.json,example_data,_dist,examples,*.trig"
ignore-regex = ".*(Stati Uniti|Tense=Pres).*"
ignore-words-list = "momento,collison,ned,foor,reworkd,parth,whats,aapply,mysogyny,unsecure,damon,crate,aadd,symbl,precesses,accademia,nin"
[tool.ruff.lint]
select = [
"A", # flake8-builtins
"ARG", # flake8-unused-arguments
"ASYNC", # flake8-async
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"COM", # flake8-commas
"D1", # pydocstyle: missing docstring
"DTZ", # flake8-datetimez
"E", # pycodestyle error
"EM", # flake8-errmsg
"F", # pyflakes
"FA", # flake8-future-annotations
"FBT", # flake8-boolean-trap
"FLY", # flake8-flynt
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"INT", # flake8-gettext
"ISC", # isort-comprehensions
"PERF", # flake8-perf
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"PYI", # flake8-pyi
"Q", # flake8-quotes
"RET", # flake8-return
"RSE", # flake8-rst-docstrings
"RUF", # ruff
"S", # flake8-bandit
"SIM", # flake8-simplify
"SLF", # flake8-self
"SLOT", # flake8-slots
"T10", # flake8-debugger
"T20", # flake8-print
"TC", # flake8-type-checking
"TID", # flake8-tidy-imports
"TRY", # tryceratops
"UP", # pyupgrade
"W", # pycodestyle warning
"YTT", # flake8-2020
]
ignore = [
"COM812", # Messes with the formatter
"ISC001", # Messes with the formatter
"PERF203", # Rarely useful
"PLR09", # Too many something (args, statements, etc)
"S112", # Rarely useful
"RUF012", # Doesn't play well with Pydantic
"TC001", # Doesn't play well with Pydantic
"TC002", # Doesn't play well with Pydantic
"TC003", # Doesn't play well with Pydantic
"UP007", # pyupgrade: non-pep604-annotation-union
# TODO rules
"D100", # pydocstyle: missing docstring in public module
"D104", # pydocstyle: missing docstring in public package
"PLC0415", # pylint: import-outside-top-level
"TRY301", # tryceratops: raise-within-try
]
unfixable = ["B028"] # People should intentionally tune the stacklevel
pydocstyle.convention = "google"
pyupgrade.keep-runtime-typing = true
[tool.ruff.lint.extend-per-file-ignores]
"tests/**/*.py" = [
"D1", # Docstrings not mandatory in tests
"S101", # Tests need assertions
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
"SLF001", # Private member access in tests
"PLR2004", # Magic value comparisons
]
"langchain/chains/constitutional_ai/principles.py" = [
"E501", # Line too long
]
"**/retrievers/*time_weighted_retriever.py" = [
"DTZ001", # Use of non timezone-aware datetime
"DTZ005", # Use of non timezone-aware datetime
"DTZ006", # Use of non timezone-aware datetime
]
[tool.coverage.run]
omit = ["tests/*"]
[tool.pytest.ini_options]
addopts = "--strict-markers --strict-config --durations=5 --snapshot-warn-unused -vv"
markers = [
"requires: mark tests as requiring a specific library",
"scheduled: mark tests to run in scheduled testing",
"compile: mark placeholder test used to compile integration tests without running them",
]
asyncio_mode = "auto"
filterwarnings = [
"ignore::langchain_core._api.beta_decorator.LangChainBetaWarning",
"ignore::langchain_core._api.deprecation.LangChainDeprecationWarning:tests",
"ignore::langchain_core._api.deprecation.LangChainPendingDeprecationWarning:tests",
]