Skip to content

langchain-classic: pytest fails with a ValueError when building on nixpkgs #34033

@sarahec

Description

@sarahec

Checked other resources

  • This is a bug, not a usage question.
  • I added a clear and descriptive title that summarizes this issue.
  • I used the GitHub search to find a similar question and didn't find it.
  • I am sure that this is a bug in LangChain rather than my code.
  • The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).
  • This is not related to the langchain-community package.
  • I posted a self-contained, minimal, reproducible example. A maintainer can copy it and run it AS IS.

Package (Required)

  • langchain
  • langchain-openai
  • langchain-anthropic
  • langchain-classic
  • langchain-core
  • langchain-cli
  • langchain-model-profiles
  • langchain-tests
  • langchain-text-splitters
  • langchain-chroma
  • langchain-deepseek
  • langchain-exa
  • langchain-fireworks
  • langchain-groq
  • langchain-huggingface
  • langchain-mistralai
  • langchain-nomic
  • langchain-ollama
  • langchain-perplexity
  • langchain-prompty
  • langchain-qdrant
  • langchain-xai
  • Other / not sure / general

Example Code (Python)

Run pytest without the `--only_extended` flag set and it dies with a `ValueError`

Error Message and Stack Trace (if applicable)

> INTERNALERROR>   File "/build/source/libs/langchain/tests/unit_tests/conftest.py", line 85, in pytest_collection_modifyitems
> INTERNALERROR>     only_extended = config.getoption("--only-extended") or False
> INTERNALERROR>                     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
> INTERNALERROR>   File "/nix/store/gx29m36wxs6vz4qk45m7n5pylpgj690y-python3.13-pytest-8.4.2/lib/python3.13/site-packages/_pytest/config/__init__.py", line 1754, in getoption
> INTERNALERROR>     raise ValueError(f"no option named {name!r}") from e
> INTERNALERROR> ValueError: no option named 'only_extended'

Description

System Info

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugRelated to a bug, vulnerability, unexpected error with an existing featurelangchain-classic

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions