multiple: get rid of pyproject extras (#22581)

They cause `poetry lock` to take a ton of time, and `uv pip install` can
resolve the constraints from these toml files in trivial time
(addressing problem with #19153)

This allows us to properly upgrade lockfile dependencies moving forward,
which revealed some issues that were either fixed or type-ignored (see
file comments)
This commit is contained in:
Erick Friis
2024-06-06 15:45:22 -07:00
committed by GitHub
parent 4367e89c9a
commit a24a9c6427
34 changed files with 3522 additions and 12444 deletions

View File

@@ -0,0 +1,2 @@
lxml>=4.9.3,<6.0
beautifulsoup4>=4.12.3,<5

File diff suppressed because it is too large Load Diff

View File

@@ -11,15 +11,13 @@ repository = "https://github.com/langchain-ai/langchain"
[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
langchain-core = "^0.2.0"
lxml = {version = ">=4.9.3,<6.0", optional = true}
beautifulsoup4 = {version = "^4.12.3", optional = true}
[tool.poetry.group.lint]
optional = true
[tool.poetry.group.lint.dependencies]
ruff = "^0.1.5"
langchain-core = {path = "../core", develop = true}
langchain-core = { path = "../core", develop = true }
[tool.poetry.group.typing]
optional = true
@@ -36,7 +34,7 @@ optional = true
[tool.poetry.group.dev.dependencies]
jupyter = "^1.0.0"
langchain-core = {path = "../core", develop = true}
langchain-core = { path = "../core", develop = true }
[tool.poetry.group.test]
optional = true
@@ -47,27 +45,21 @@ optional = true
# Any dependencies that do not meet that criteria will be removed.
pytest = "^7.3.0"
freezegun = "^1.2.2"
pytest-mock = "^3.10.0"
pytest-mock = "^3.10.0"
pytest-watcher = "^0.3.4"
pytest-asyncio = "^0.21.1"
pytest-profiling = "^1.7.0"
langchain-core = {path = "../core", develop = true}
langchain-core = { path = "../core", develop = true }
[tool.poetry.group.test_integration]
optional = true
dependencies = {}
[tool.poetry.extras]
extended_testing = [
"lxml", "beautifulsoup4"
]
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"T201", # print
]
@@ -75,11 +67,18 @@ select = [
disallow_untyped_defs = "True"
[[tool.mypy.overrides]]
module = ["transformers", "sentence_transformers", "nltk.tokenize", "konlpy.tag", "bs4", "pytest"]
module = [
"transformers",
"sentence_transformers",
"nltk.tokenize",
"konlpy.tag",
"bs4",
"pytest",
]
ignore_missing_imports = "True"
[tool.coverage.run]
omit = ["tests/*", ]
omit = ["tests/*"]
[build-system]
requires = ["poetry-core>=1.0.0"]
@@ -102,4 +101,3 @@ markers = [
"compile: mark placeholder test used to compile integration tests without running them",
]
asyncio_mode = "auto"