Skip to content

Commit c6e898b

Browse files
committed
Factor n-2 support into deprecation plan
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
1 parent 3be52a6 commit c6e898b

8 files changed

Lines changed: 17 additions & 10 deletions

File tree

.github/workflows/build-tag.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
# overwriting an existing release; replacing a tagged version's
9898
# contents requires bumping VERSION and re-tagging.
9999
twine upload --skip-existing dist/*
100-
# TODO: remove in 1.20.
100+
# TODO: remove in 1.22.
101101
# The previously-separate distributions (dapr-ext-fastapi, dapr-ext-grpc,
102102
# dapr-ext-langgraph, dapr-ext-strands, dapr-ext-workflow, flask-dapr)
103103
# are intentionally NOT republished. Bundling the extension code into

RELEASE.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ A single tag (`v*`) triggers the release of the core SDK only:
88
|---|---|
99
| `dapr` (core SDK) | Includes every extension under `dapr.ext.*`. Users opt in to per-extension third-party deps via extras: `pip install "dapr[fastapi]"`, etc. The legacy top-level `flask_dapr` import path remains available as a thin shim inside this wheel and emits `FutureWarning`. |
1010

11-
**The previously-separate distributions**`dapr-ext-fastapi`, `dapr-ext-grpc`,
11+
**As of 1.19, the previously-separate distributions**`dapr-ext-fastapi`, `dapr-ext-grpc`,
1212
`dapr-ext-langgraph`, `dapr-ext-strands`, `dapr-ext-workflow`, `flask-dapr`
13-
are **no longer published**.
13+
are **no longer published**. Backport branches that predate 1.19 (`release-1.18`,
14+
`release-1.17`) still build and publish them for fixes shipped to those releases.
1415

1516
The design constraint was keeping `from dapr.ext.X import ...` stable across
1617
the upgrade, so the cost lands once in pip during migration rather than
@@ -45,6 +46,11 @@ churning user-pinned versions of fastapi, uvicorn, langchain, etc.
4546
states at import time and prints the recovery command as a `FutureWarning`.
4647
Suppress with `DAPR_SKIP_LEGACY_CHECK=1`.
4748

49+
The warning and the `flask_dapr` shim are kept through 1.21 and removed in
50+
1.22. 1.18 is the last release to ship the standalone distributions, and N-2
51+
support keeps it alive until 1.21, so this window covers every user who could
52+
still be migrating.
53+
4854
You can also create the tag via a **GitHub Release**, which auto-creates the tag and provides
4955
a changelog UI.
5056

dapr/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
limitations under the License.
1414
"""
1515

16-
# TODO: remove in 1.20 (pre-1.19 dapr-ext-* / flask-dapr migration only).
16+
# TODO: remove in 1.22 (legacy dapr-ext-* / flask-dapr migration).
17+
# Kept through 1.21, when N-2 support forces the last 1.18 users to upgrade.
1718
#
1819
# On import, checks for two states a legacy dapr-ext-* install could leave
1920
# the environment in.

dapr/ext/flask/AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ tests/ext/flask/
1818

1919
Installed via the `flask` extra on core dapr: `pip install "dapr[flask]"`.
2020

21-
The legacy top-level import path (`from flask_dapr import DaprApp, DaprActor`) is still supported through a thin shim at the repo root that emits a `FutureWarning`. The shim is scheduled for removal one release after the bundling change ships. All new code and docs should use the canonical `from dapr.ext.flask import ...` path.
21+
The legacy top-level import path (`from flask_dapr import DaprApp, DaprActor`) is still supported through a thin shim at the repo root that emits a `FutureWarning`. The shim is kept through 1.21 and removed in 1.22, giving users on 1.18 (the last release to ship the standalone distributions) the full N-2 support window to migrate. All new code and docs should use the canonical `from dapr.ext.flask import ...` path.
2222

2323
## Public API
2424

@@ -89,6 +89,6 @@ Note: No tests for `DaprActor` in this extension (unlike FastAPI which tests `_w
8989
## Key details
9090

9191
- **Synchronous + asyncio bridge**: Flask is sync, but `ActorRuntime` is async. The extension uses `asyncio.run()` for each actor operation.
92-
- **Canonical import path**: Use `from dapr.ext.flask import DaprApp, DaprActor`. The legacy `flask_dapr` top-level path still works but emits `FutureWarning` and will be removed next cycle.
92+
- **Canonical import path**: Use `from dapr.ext.flask import DaprApp, DaprActor`. The legacy `flask_dapr` top-level path still works but emits `FutureWarning` and will be removed in 1.22.
9393
- **Similar to FastAPI extension**: The two extensions have nearly identical functionality. When modifying one, check if the same change is needed in the other.
9494
- **Reentrancy ID**: Actor method invocation extracts `Dapr-Reentrancy-Id` header, same as FastAPI extension.

flask_dapr/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
limitations under the License.
1414
"""
1515

16-
# TODO: remove in 1.20.
16+
# TODO: remove in 1.22 with the legacy check in dapr/__init__.py.
1717
# Deprecation shim for the pre-1.19 `flask_dapr` top-level import path.
1818
# Use `dapr.ext.flask` instead.
1919

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ pattern = '(?P<version>\S+)'
7575
# `RECORD`. Materialising `dapr/ext/__init__.py` here would lock out every
7676
# future externally-published dapr.ext.* plugin by claiming ownership of the
7777
# namespace parent.
78-
# TODO: drop flask_dapr in 1.20 (with the shim).
78+
# TODO: drop flask_dapr in 1.22 (with the shim).
7979
packages = ["dapr", "flask_dapr"]
8080
# Repo-internal docs (contributor / AI-agent guidance) live next to the code
8181
# for discoverability but should not ship in the published wheel.

tests/ext/flask/test_shim_deprecation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
non-`__main__` callers).
66
"""
77

8-
# TODO: remove in 1.20 with the flask_dapr shim.
8+
# TODO: remove in 1.22 with the flask_dapr shim.
99

1010
import sys
1111

tests/test_legacy_extension_check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
limitations under the License.
1414
"""
1515

16-
# TODO: remove in 1.20 with the detection in dapr/__init__.py it tests.
16+
# TODO: remove in 1.22 with the detection in dapr/__init__.py it tests.
1717

1818
import importlib.metadata
1919
import tempfile

0 commit comments

Comments
 (0)