diff --git a/README.md b/README.md index a71d8ff..36cc76d 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,69 @@ [![API Docs](https://img.shields.io/badge/docs-API%20reference-brightgreen)](https://oddrationale.github.io/deepagents-azure-blob-backend) [![autofix.ci](https://img.shields.io/badge/autofix.ci-enabled-success)](https://github.com/oddrationale/deepagents-azure-blob-backend/actions/workflows/autofix.ci.yml) +> [!WARNING] +> **This package is deprecated and no longer maintained.** +> +> Its Azure Blob Storage backend now ships first-party in [`langchain-azure-storage`](https://pypi.org/project/langchain-azure-storage/), maintained by LangChain and Microsoft in [langchain-ai/langchain-azure](https://github.com/langchain-ai/langchain-azure): +> +> ```bash +> pip install "langchain-azure-storage[deepagents]" +> ``` +> +> The constructor API changed during upstream review, so this is not a drop-in swap — see [Migrating to langchain-azure-storage](#migrating-to-langchain-azure-storage) below. +> +> Existing releases stay installable and nothing is yanked, but `0.5.0` is the last one. It supports only `deepagents<0.7.0`; for `deepagents>=0.7.1`, use `langchain-azure-storage`. + Azure Blob Storage filesystem backend for [LangChain Deep Agents](https://github.com/langchain-ai/deepagents). Deep Agents exposes a `BackendProtocol` — a pluggable interface for file operations (`read`, `write`, `edit`, `ls`, `glob`, `grep`) that the agent uses as its virtual filesystem. This package provides an Azure Blob Storage implementation of that interface. +## Migrating to langchain-azure-storage + +```bash +pip uninstall deepagents-azure-blob-backend +pip install "langchain-azure-storage[deepagents]" +``` + +The successor drops the `AzureBlobConfig` dataclass and takes its arguments directly on the constructor. Credentials are Azure SDK credential objects rather than raw key or token strings: + +```python +# Before +from deepagents_azure_blob_backend import AzureBlobBackend, AzureBlobConfig + +backend = AzureBlobBackend( + AzureBlobConfig( + account_url="https://.blob.core.windows.net", + container_name="agent-workspace", + prefix="session-001/", + ) +) + +# After +from langchain_azure_storage.deepagents import AzureBlobBackend + +backend = AzureBlobBackend( + "https://.blob.core.windows.net", + "agent-workspace", + prefix="session-001/", +) +``` + +| `AzureBlobConfig` field | Replacement | +|---|---| +| `account_url`, `container_name` | Positional arguments to `AzureBlobBackend(...)` | +| `prefix` | Keyword argument `prefix=` | +| `credential=` | Keyword argument `credential=` (`TokenCredential`, `AsyncTokenCredential`, or `AzureSasCredential`) | +| `connection_string="..."` | `AzureBlobBackend.from_connection_string(connection_string, container_name, prefix=...)` | +| `sas_token="sv=..."` | `credential=AzureSasCredential("sv=...")` (from `azure.core.credentials`) | +| `account_key="..."` | No direct equivalent — use `from_connection_string` (a connection string carries `AccountKey`) or a SAS credential | +| *(omit all credentials)* | Unchanged — `DefaultAzureCredential` is still the default | +| `max_concurrency`, `encoding`, `api_version` | Not exposed; the successor manages concurrency and encoding internally | + +The successor also requires `deepagents>=0.7.1`, where `write` overwrites an existing file instead of erroring and `delete`/`adelete` are part of `BackendProtocol`. Python 3.11+ is required for the `deepagents` extra. + +Further reading: [backend integrations](https://docs.langchain.com/oss/python/integrations/backends) · [design proposal and behavior notes](https://github.com/langchain-ai/langchain-azure/blob/main/libs/azure-storage/proposals/deepagents_backend.md) · [upstream PR](https://github.com/langchain-ai/langchain-azure/pull/783) + ## Installation ```bash @@ -24,7 +83,7 @@ Or with [uv](https://docs.astral.sh/uv/): uv add deepagents-azure-blob-backend ``` -This package requires `deepagents>=0.6.1`, where `BackendProtocol` exposes structured `ls`, `glob`, and `grep` result types. +This package requires `deepagents>=0.6.1,<0.7.0`, where `BackendProtocol` exposes structured `ls`, `glob`, and `grep` result types. It does not support the `BackendProtocol` changes in `deepagents` 0.7.0 — see [Migrating to langchain-azure-storage](#migrating-to-langchain-azure-storage). ## Quick Start diff --git a/pyproject.toml b/pyproject.toml index 59a0985..934f85d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,13 +1,13 @@ [project] name = "deepagents-azure-blob-backend" version = "0.4.1" -description = "Azure Blob Storage filesystem backend for LangChain Deep Agents" +description = "Deprecated — use langchain-azure-storage[deepagents]. Azure Blob Storage filesystem backend for LangChain Deep Agents" readme = "README.md" requires-python = ">=3.11" license = "MIT" keywords = ["langchain", "deepagents", "azure", "blob-storage", "agent", "backend", "llm"] classifiers = [ - "Development Status :: 3 - Alpha", + "Development Status :: 7 - Inactive", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", @@ -17,7 +17,11 @@ classifiers = [ "Topic :: Software Development :: Libraries", ] dependencies = [ - "deepagents>=0.6.1", + # Do not raise this ceiling. deepagents 0.7.0 changed `BackendProtocol` in ways this + # backend does not implement (write overwrites instead of erroring, `delete`/`adelete` + # is required, `GrepResult.truncated`). This package is deprecated and will not be + # updated for it — use langchain-azure-storage[deepagents] on deepagents >= 0.7.1. + "deepagents>=0.6.1,<0.7.0", "azure-storage-blob[aio]>=12.0.0", "azure-identity>=1.0.0", "wcmatch", @@ -31,6 +35,7 @@ dependencies = [ ] [project.urls] +"Successor package" = "https://pypi.org/project/langchain-azure-storage/" Homepage = "https://github.com/oddrationale/deepagents-azure-blob-backend" Documentation = "https://oddrationale.github.io/deepagents-azure-blob-backend" Repository = "https://github.com/oddrationale/deepagents-azure-blob-backend" diff --git a/src/deepagents_azure_blob_backend/__init__.py b/src/deepagents_azure_blob_backend/__init__.py index ae52790..02229e2 100644 --- a/src/deepagents_azure_blob_backend/__init__.py +++ b/src/deepagents_azure_blob_backend/__init__.py @@ -1,5 +1,17 @@ """Azure Blob Storage filesystem backend for [LangChain Deep Agents](https://github.com/langchain-ai/deepagents). +> **Deprecated since 0.5.0.** This package is no longer maintained. Its backend now ships +> first-party as `AzureBlobBackend` in +> [`langchain-azure-storage`](https://pypi.org/project/langchain-azure-storage/): +> +> ```bash +> pip install "langchain-azure-storage[deepagents]" +> ``` +> +> The constructor API changed, so this is not a drop-in swap — see the +> [migration guide](https://github.com/oddrationale/deepagents-azure-blob-backend#migrating-to-langchain-azure-storage). +> Released versions stay installable, but this package supports only `deepagents<0.7.0`. + This package provides `AzureBlobBackend`, an implementation of the Deep Agents `BackendProtocol` that uses Azure Blob Storage as its virtual filesystem. @@ -31,7 +43,20 @@ See `AzureBlobConfig` for full details and `AzureBlobBackend` for the API. """ +import warnings + from .backend import AzureBlobBackend from .config import AzureBlobConfig +_DEPRECATION_MESSAGE = ( + "deepagents-azure-blob-backend is deprecated and will receive no further updates. " + "Its Azure Blob Storage backend now ships first-party as " + "langchain_azure_storage.deepagents.AzureBlobBackend — install " + "'langchain-azure-storage[deepagents]'. The constructor API changed, so this is not a " + "drop-in swap: see " + "https://github.com/oddrationale/deepagents-azure-blob-backend#migrating-to-langchain-azure-storage" +) + +warnings.warn(_DEPRECATION_MESSAGE, DeprecationWarning, stacklevel=2) + __all__ = ["AzureBlobBackend", "AzureBlobConfig"] diff --git a/tests/unit_tests/test_deprecation.py b/tests/unit_tests/test_deprecation.py new file mode 100644 index 0000000..ca5345f --- /dev/null +++ b/tests/unit_tests/test_deprecation.py @@ -0,0 +1,21 @@ +"""Unit tests for the package-level deprecation notice.""" + +from __future__ import annotations + +import importlib + +import pytest + +import deepagents_azure_blob_backend + + +class TestDeprecationWarning: + def test_import_warns(self): + # The warning fires at module exec time, so a plain import is a no-op once + # another test has already imported the package. + with pytest.warns(DeprecationWarning, match="langchain-azure-storage"): + importlib.reload(deepagents_azure_blob_backend) + + def test_reload_still_exports_public_api(self): + module = importlib.reload(deepagents_azure_blob_backend) + assert module.__all__ == ["AzureBlobBackend", "AzureBlobConfig"] diff --git a/uv.lock b/uv.lock index a1a9c52..02c4ee8 100644 --- a/uv.lock +++ b/uv.lock @@ -628,7 +628,7 @@ requires-dist = [ { name = "azure-identity", specifier = ">=1.0.0" }, { name = "azure-storage-blob", extras = ["aio"], specifier = ">=12.0.0" }, { name = "cryptography", specifier = ">=46.0.7" }, - { name = "deepagents", specifier = ">=0.6.1" }, + { name = "deepagents", specifier = ">=0.6.1,<0.7.0" }, { name = "langchain-core", specifier = ">=1.2.28" }, { name = "langsmith", specifier = ">=0.7.31" }, { name = "pyjwt", specifier = ">=2.12.0" },