Skip to content

Commit 819e9ea

Browse files
author
mingsing
committed
Merge branch 'main' into fix/pubsub_re_sub
2 parents 45ce7d7 + 9e73bf5 commit 819e9ea

File tree

195 files changed

+1410
-2590
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

195 files changed

+1410
-2590
lines changed

.devcontainer/devcontainer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"terminal.integrated.shell.linux": "/bin/bash",
1010
"python.pythonPath": "/usr/local/bin/python",
1111
"python.linting.enabled": true,
12-
"python.linting.flake8Enabled": true,
1312
"python.linting.mypyEnabled": true,
1413
},
1514

.github/workflows/build-push-to-main.yaml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ jobs:
1010
lint:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v5
14-
- name: Set up Python 3.9
13+
- uses: actions/checkout@v6
14+
- name: Set up Python 3.10
1515
uses: actions/setup-python@v6
1616
with:
17-
python-version: 3.9
17+
python-version: '3.10'
1818
- name: Install dependencies
1919
run: |
2020
python -m pip install --upgrade pip
@@ -30,19 +30,16 @@ jobs:
3030
echo "Source files are not formatted correctly. Run 'tox -e ruff' to autoformat."
3131
exit 1
3232
fi
33-
- name: Run Linter
34-
run: |
35-
tox -e flake8
3633
3734
build:
3835
needs: lint
3936
runs-on: ubuntu-latest
4037
strategy:
4138
fail-fast: false
4239
matrix:
43-
python_ver: ["3.9", "3.10", "3.11", "3.12", "3.13"]
40+
python_ver: ["3.10", "3.11", "3.12", "3.13"]
4441
steps:
45-
- uses: actions/checkout@v5
42+
- uses: actions/checkout@v6
4643
- name: Set up Python ${{ matrix.python_ver }}
4744
uses: actions/setup-python@v6
4845
with:
@@ -66,11 +63,11 @@ jobs:
6663
env:
6764
TWINE_USERNAME: "__token__"
6865
steps:
69-
- uses: actions/checkout@v5
70-
- name: Set up Python 3.9
66+
- uses: actions/checkout@v6
67+
- name: Set up Python 3.10
7168
uses: actions/setup-python@v6
7269
with:
73-
python-version: 3.9
70+
python-version: '3.10'
7471
- name: Install dependencies
7572
run: |
7673
python -m pip install --upgrade pip
@@ -109,3 +106,10 @@ jobs:
109106
cd ext/dapr-ext-fastapi
110107
python setup.py sdist bdist_wheel
111108
twine upload dist/*
109+
- name: Build and publish dapr-ext-langgraph
110+
env:
111+
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
112+
run: |
113+
cd ext/dapr-ext-langgraph
114+
python setup.py sdist bdist_wheel
115+
twine upload dist/*

.github/workflows/build-tag.yaml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ jobs:
1414
lint:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v5
18-
- name: Set up Python 3.9
17+
- uses: actions/checkout@v6
18+
- name: Set up Python 3.10
1919
uses: actions/setup-python@v6
2020
with:
21-
python-version: 3.9
21+
python-version: '3.10'
2222
- name: Install dependencies
2323
run: |
2424
python -m pip install --upgrade pip
@@ -34,19 +34,16 @@ jobs:
3434
echo "Source files are not formatted correctly. Run 'tox -e ruff' to autoformat."
3535
exit 1
3636
fi
37-
- name: Run Linter
38-
run: |
39-
tox -e flake8
4037
4138
build:
4239
needs: lint
4340
runs-on: ubuntu-latest
4441
strategy:
4542
fail-fast: false
4643
matrix:
47-
python_ver: ["3.9", "3.10", "3.11", "3.12", "3.13"]
44+
python_ver: ["3.10", "3.11", "3.12", "3.13"]
4845
steps:
49-
- uses: actions/checkout@v5
46+
- uses: actions/checkout@v6
5047
- name: Set up Python ${{ matrix.python_ver }}
5148
uses: actions/setup-python@v6
5249
with:
@@ -70,11 +67,11 @@ jobs:
7067
env:
7168
TWINE_USERNAME: "__token__"
7269
steps:
73-
- uses: actions/checkout@v5
74-
- name: Set up Python 3.9
70+
- uses: actions/checkout@v6
71+
- name: Set up Python 3.10
7572
uses: actions/setup-python@v6
7673
with:
77-
python-version: 3.9
74+
python-version: '3.10'
7875
- name: Install dependencies
7976
run: |
8077
python -m pip install --upgrade pip
@@ -118,3 +115,11 @@ jobs:
118115
cd ext/dapr-ext-fastapi
119116
python setup.py sdist bdist_wheel
120117
twine upload dist/*
118+
- name: Build and publish dapr-ext-langgraph
119+
if: startsWith(github.ref_name, 'langgraph-v')
120+
env:
121+
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
122+
run: |
123+
cd ext/dapr-ext-langgraph
124+
python setup.py sdist bdist_wheel
125+
twine upload dist/*

.github/workflows/build.yaml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ jobs:
1616
lint:
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v5
20-
- name: Set up Python 3.9
19+
- uses: actions/checkout@v6
20+
- name: Set up Python 3.10
2121
uses: actions/setup-python@v6
2222
with:
23-
python-version: 3.9
23+
python-version: '3.10'
2424
- name: Install dependencies
2525
run: |
2626
python -m pip install --upgrade pip
@@ -36,19 +36,16 @@ jobs:
3636
echo "Source files are not formatted correctly. Run 'tox -e ruff' to autoformat."
3737
exit 1
3838
fi
39-
- name: Run Linter
40-
run: |
41-
tox -e flake8
4239
4340
build:
4441
needs: lint
4542
runs-on: ubuntu-latest
4643
strategy:
4744
fail-fast: false
4845
matrix:
49-
python_ver: ["3.9", "3.10", "3.11", "3.12", "3.13"]
46+
python_ver: ["3.10", "3.11", "3.12", "3.13"]
5047
steps:
51-
- uses: actions/checkout@v5
48+
- uses: actions/checkout@v6
5249
- name: Set up Python ${{ matrix.python_ver }}
5350
uses: actions/setup-python@v6
5451
with:
@@ -64,4 +61,4 @@ jobs:
6461
run: |
6562
tox -e py`echo "${{ matrix.python_ver }}" | sed 's/\.//g'`
6663
- name: Upload test coverage
67-
uses: codecov/codecov-action@v5
64+
uses: codecov/codecov-action@v5

.github/workflows/dapr-bot-schedule.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
runs-on: ubuntu-latest
2525
steps:
2626
- name: Checkout repo
27-
uses: actions/checkout@v5
27+
uses: actions/checkout@v6
2828
- name: Install dependencies
2929
run: pip install PyGithub
3030
- name: Automerge and update

.github/workflows/fossa.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
FOSSA_API_KEY: b88e1f4287c3108c8751bf106fb46db6 # This is a push-only token that is safe to be exposed.
4141
steps:
4242
- name: "Checkout code"
43-
uses: actions/checkout@v5
43+
uses: actions/checkout@v6
4444

4545
- name: "Run FOSSA Scan"
4646
uses: fossas/[email protected] # Use a specific version if locking is preferred

.github/workflows/validate_examples.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
strategy:
4747
fail-fast: false
4848
matrix:
49-
python_ver: ["3.9", "3.10", "3.11", "3.12", "3.13"]
49+
python_ver: ["3.10", "3.11", "3.12", "3.13"]
5050
steps:
5151
- name: Parse repository_dispatch payload
5252
if: github.event_name == 'repository_dispatch'
@@ -58,7 +58,7 @@ jobs:
5858
fi
5959
6060
- name: Check out code onto GOPATH
61-
uses: actions/checkout@v5
61+
uses: actions/checkout@v6
6262
with:
6363
repository: ${{ env.CHECKOUT_REPO }}
6464
ref: ${{ env.CHECKOUT_REF }}
@@ -70,7 +70,7 @@ jobs:
7070
echo "Found $RUNTIME_VERSION"
7171
- name: Determine latest Dapr Cli version
7272
run: |
73-
export CLI_VERSION=$(curl "https://api.github.com/repos/dapr/cli/releases?per_page=1&page=1" --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' | jq '.[0].tag_name'| tr -d '",v')
73+
export CLI_VERSION=$(curl "https://api.github.com/repos/dapr/cli/releases/latest" --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' | jq '.tag_name'| tr -d '",v')
7474
echo "DAPR_CLI_VER=$CLI_VERSION" >> $GITHUB_ENV
7575
echo "Found $CLI_VERSION"
7676
- name: Set up Python ${{ matrix.python_ver }}
@@ -89,14 +89,14 @@ jobs:
8989
with:
9090
go-version: ${{ env.GOVER }}
9191
- name: Checkout Dapr CLI repo to override dapr command.
92-
uses: actions/checkout@v5
92+
uses: actions/checkout@v6
9393
if: env.DAPR_CLI_REF != ''
9494
with:
9595
repository: dapr/cli
9696
ref: ${{ env.DAPR_CLI_REF }}
9797
path: cli
9898
- name: Checkout Dapr repo to override daprd.
99-
uses: actions/checkout@v5
99+
uses: actions/checkout@v6
100100
if: env.DAPR_REF != ''
101101
with:
102102
repository: dapr/dapr

README.md

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Dapr SDK for Python
22

3-
[![PyPI - Version](https://img.shields.io/pypi/v/dapr?style=flat&logo=pypi&logoColor=white&label=Latest%20version)](https://pypi.org/project/dapr/)
4-
[![PyPI - Downloads](https://img.shields.io/pypi/dm/dapr?style=flat&logo=pypi&logoColor=white&label=Downloads)](https://pypi.org/project/dapr/)
5-
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/dapr/python-sdk/.github%2Fworkflows%2Fbuild.yaml?branch=main&label=Build&logo=github)](https://github.com/dapr/python-sdk/actions/workflows/build.yaml)
6-
[![codecov](https://codecov.io/gh/dapr/python-sdk/branch/main/graph/badge.svg)](https://codecov.io/gh/dapr/python-sdk)
7-
[![GitHub License](https://img.shields.io/github/license/dapr/python-sdk?style=flat&label=License&logo=github)](https://github.com/dapr/python-sdk/blob/main/LICENSE)
8-
[![GitHub issue custom search in repo](https://img.shields.io/github/issues-search/dapr/python-sdk?query=type%3Aissue%20is%3Aopen%20label%3A%22good%20first%20issue%22&label=Good%20first%20issues&style=flat&logo=github)](https://github.com/dapr/python-sdk/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)
9-
[![Discord](https://img.shields.io/discord/778680217417809931?label=Discord&style=flat&logo=discord)](http://bit.ly/dapr-discord)
10-
[![YouTube Channel Views](https://img.shields.io/youtube/channel/views/UCtpSQ9BLB_3EXdWAUQYwnRA?style=flat&label=YouTube%20views&logo=youtube)](https://youtube.com/@daprdev)
3+
[![PyPI - Version](https://img.shields.io/pypi/v/dapr?style=flat&logo=pypi&logoColor=white&label=Latest%20version)](https://pypi.org/project/dapr/)
4+
[![PyPI - Downloads](https://img.shields.io/pypi/dm/dapr?style=flat&logo=pypi&logoColor=white&label=Downloads)](https://pypi.org/project/dapr/)
5+
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/dapr/python-sdk/.github%2Fworkflows%2Fbuild.yaml?branch=main&label=Build&logo=github)](https://github.com/dapr/python-sdk/actions/workflows/build.yaml)
6+
[![codecov](https://codecov.io/gh/dapr/python-sdk/branch/main/graph/badge.svg)](https://codecov.io/gh/dapr/python-sdk)
7+
[![GitHub License](https://img.shields.io/github/license/dapr/python-sdk?style=flat&label=License&logo=github)](https://github.com/dapr/python-sdk/blob/main/LICENSE)
8+
[![GitHub issue custom search in repo](https://img.shields.io/github/issues-search/dapr/python-sdk?query=type%3Aissue%20is%3Aopen%20label%3A%22good%20first%20issue%22&label=Good%20first%20issues&style=flat&logo=github)](https://github.com/dapr/python-sdk/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)
9+
[![Discord](https://img.shields.io/discord/778680217417809931?label=Discord&style=flat&logo=discord)](http://bit.ly/dapr-discord)
10+
[![YouTube Channel Views](https://img.shields.io/youtube/channel/views/UCtpSQ9BLB_3EXdWAUQYwnRA?style=flat&label=YouTube%20views&logo=youtube)](https://youtube.com/@daprdev)
1111
<!-- IGNORE_LINKS -->
1212
[![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/daprdev?logo=x&style=flat)](https://twitter.com/daprdev)
1313
<!-- END_IGNORE -->
@@ -86,6 +86,7 @@ pip3 install -e .
8686
pip3 install -e ./ext/dapr-ext-grpc/
8787
pip3 install -e ./ext/dapr-ext-fastapi/
8888
pip3 install -e ./ext/dapr-ext-workflow/
89+
pip3 install -e ./ext/dapr-ext-langgraph/
8990
```
9091

9192
3. Install required packages
@@ -94,31 +95,25 @@ pip3 install -e ./ext/dapr-ext-workflow/
9495
pip3 install -r dev-requirements.txt
9596
```
9697

97-
4. Run linter
98-
99-
```bash
100-
tox -e flake8
101-
```
102-
103-
5. Run autofix
98+
4. Run linter and autofix
10499

105100
```bash
106101
tox -e ruff
107102
```
108103

109-
6. Run unit-test
104+
5. Run unit-test
110105

111106
```bash
112107
tox -e py311
113108
```
114109

115-
7. Run type check
110+
6. Run type check
116111

117112
```bash
118113
tox -e type
119114
```
120115

121-
8. Run examples
116+
7. Run examples
122117

123118
```bash
124119
tox -e examples
@@ -153,7 +148,7 @@ export DAPR_BRANCH=release-1.16 # Optional, defaults to master
153148
./tools/regen_grpcclient.sh
154149
```
155150

156-
> Note: The `grpcio-tools` version we're using doesn't support Python 3.13.
151+
> Note: The `grpcio-tools` version we're using doesn't support Python 3.13.
157152
158153
## Help & Feedback
159154

dapr/actor/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
from dapr.actor.runtime.remindable import Remindable
2121
from dapr.actor.runtime.runtime import ActorRuntime
2222

23-
2423
__all__ = [
2524
'ActorInterface',
2625
'ActorProxy',

dapr/actor/client/proxy.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
from dapr.actor.runtime._type_utils import get_dispatchable_attrs_from_interface
2222
from dapr.clients import DaprActorClientBase, DaprActorHttpClient
2323
from dapr.clients.retry import RetryPolicy
24-
from dapr.serializers import Serializer, DefaultJSONSerializer
2524
from dapr.conf import settings
25+
from dapr.serializers import DefaultJSONSerializer, Serializer
2626

2727
# Actor factory Callable type hint.
2828
ACTOR_FACTORY_CALLBACK = Callable[[ActorInterface, str, str], 'ActorProxy']
@@ -35,8 +35,7 @@ def create(
3535
actor_type: str,
3636
actor_id: ActorId,
3737
actor_interface: Optional[Type[ActorInterface]] = None,
38-
) -> 'ActorProxy':
39-
...
38+
) -> 'ActorProxy': ...
4039

4140

4241
class ActorProxyFactory(ActorFactoryBase):

0 commit comments

Comments
 (0)