release(langchain): v1.0.0a1 (#32718)

Also removing globals usage + static version
This commit is contained in:
Sydney Runkle
2025-08-27 13:46:20 -04:00
committed by GitHub
parent 18db07c292
commit 047bcbaa13
3 changed files with 29 additions and 11 deletions

View File

@@ -1,18 +1,15 @@
"""Main entrypoint into package."""
"""Main entrypoint into LangChain."""
from importlib import metadata
from typing import Any
try:
__version__ = metadata.version(__package__)
except metadata.PackageNotFoundError:
# Case where package metadata is not available.
__version__ = ""
del metadata # optional, avoids polluting the results of dir(__package__)
__version__ = "1.0.0a1"
def __getattr__(name: str) -> Any: # noqa: ANN401
"""Get an attribute from the package."""
"""Get an attribute from the package.
TODO: will be removed in a future alpha version.
"""
if name == "verbose":
from langchain.globals import _verbose

View File

@@ -0,0 +1,18 @@
"""Global values and configuration that apply to all of LangChain.
TODO: will be removed in a future alpha version.
"""
from typing import TYPE_CHECKING, Optional
if TYPE_CHECKING:
from langchain_core.caches import BaseCache
# DO NOT USE THESE VALUES DIRECTLY!
# Use them only via `get_<X>()` and `set_<X>()` below,
# or else your code may behave unexpectedly with other uses of these global settings:
# https://github.com/langchain-ai/langchain/pull/11311#issuecomment-1743780004
_verbose: bool = False
_debug: bool = False
_llm_cache: Optional["BaseCache"] = None

View File

@@ -12,13 +12,16 @@ dependencies = [
"langgraph>=0.6.0",
"pydantic>=2.7.4",
]
dynamic = ["version"]
name = "langchain"
version = "1.0.0dev1"
description = "Building applications with LLMs through composability"
readme = "README.md"
[tool.pdm.version]
source = "file"
path = "langchain/__init__.py"
[project.optional-dependencies]
# community = ["langchain-community"]
anthropic = ["langchain-anthropic"]