From 2d6aa3cfed808b893940f3b2fe3ceea5736365e1 Mon Sep 17 00:00:00 2001 From: Sergio Herrera <627709+seherv@users.noreply.github.com> Date: Wed, 6 May 2026 13:55:06 +0200 Subject: [PATCH 01/10] Remove development builds Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com> --- .github/workflows/build-push-to-main.yaml | 122 ------------------ .github/workflows/build.yaml | 10 ++ README.md | 20 +-- RELEASE.md | 59 ++++----- dapr/version/version.py | 2 +- .../dapr/ext/fastapi/version.py | 2 +- ext/dapr-ext-fastapi/setup.py | 83 ------------ ext/dapr-ext-grpc/dapr/ext/grpc/version.py | 2 +- ext/dapr-ext-grpc/setup.py | 83 ------------ .../dapr/ext/langgraph/version.py | 2 +- ext/dapr-ext-langgraph/setup.py | 85 ------------ .../dapr/ext/strands/version.py | 2 +- ext/dapr-ext-strands/setup.py | 85 ------------ .../dapr/ext/workflow/version.py | 2 +- ext/dapr-ext-workflow/setup.py | 83 ------------ ext/flask_dapr/flask_dapr/version.py | 2 +- ext/flask_dapr/setup.py | 83 ------------ setup.py | 62 --------- 18 files changed, 52 insertions(+), 737 deletions(-) delete mode 100644 .github/workflows/build-push-to-main.yaml delete mode 100644 ext/dapr-ext-fastapi/setup.py delete mode 100644 ext/dapr-ext-grpc/setup.py delete mode 100644 ext/dapr-ext-langgraph/setup.py delete mode 100644 ext/dapr-ext-strands/setup.py delete mode 100644 ext/dapr-ext-workflow/setup.py delete mode 100644 ext/flask_dapr/setup.py delete mode 100644 setup.py diff --git a/.github/workflows/build-push-to-main.yaml b/.github/workflows/build-push-to-main.yaml deleted file mode 100644 index 1f3dbf628..000000000 --- a/.github/workflows/build-push-to-main.yaml +++ /dev/null @@ -1,122 +0,0 @@ -name: dapr-python-dev - -on: - push: - branches: - - main - workflow_dispatch: - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - name: Set up Python 3.10 - uses: actions/setup-python@v6 - with: - python-version: '3.10' - - name: Install uv - uses: astral-sh/setup-uv@v7 - - name: Install dependencies - run: uv sync --frozen --all-packages --group dev - - name: Run Autoformatter - run: | - uv run ruff check --fix && uv run ruff format - statusResult=$(git status -u --porcelain) - if [ -z "$statusResult" ] - then - exit 0 - else - echo "Source files are not formatted correctly. Run 'uv run ruff check --fix && uv run ruff format'." - exit 1 - fi - - build: - needs: lint - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - python_ver: ["3.10", "3.11", "3.12", "3.13", "3.14"] - steps: - - uses: actions/checkout@v6 - - name: Set up Python ${{ matrix.python_ver }} - uses: actions/setup-python@v6 - with: - python-version: ${{ matrix.python_ver }} - - name: Install uv - uses: astral-sh/setup-uv@v7 - - name: Install dependencies - run: uv sync --frozen --all-packages --group dev - - name: Check Typing - run: uv run mypy - - name: Run unit-tests - run: | - uv run coverage run -m pytest tests ext -m "not e2e" --ignore=tests/integration --ignore=tests/examples --import-mode=importlib - uv run coverage xml - - name: Upload test coverage - uses: codecov/codecov-action@v6 - publish: - needs: build - if: github.event_name != 'pull_request' - runs-on: ubuntu-latest - env: - TWINE_USERNAME: "__token__" - steps: - - uses: actions/checkout@v6 - - name: Set up Python 3.10 - uses: actions/setup-python@v6 - with: - python-version: '3.10' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install build twine - - name: Build and publish Dapr Python SDK - env: - TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} - run: | - python -m build - twine upload dist/* - - name: Build and publish dapr-ext-workflow - env: - TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} - run: | - cd ext/dapr-ext-workflow - python -m build - twine upload dist/* - - name: Build and publish Dapr Flask Extension - env: - TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} - run: | - cd ext/flask_dapr - python -m build - twine upload dist/* - - name: Build and publish dapr-ext-grpc - env: - TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} - run: | - cd ext/dapr-ext-grpc - python -m build - twine upload dist/* - - name: Build and publish dapr-ext-fastapi - env: - TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} - run: | - cd ext/dapr-ext-fastapi - python -m build - twine upload dist/* - - name: Build and publish dapr-ext-langgraph - env: - TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} - run: | - cd ext/dapr-ext-langgraph - python -m build - twine upload dist/* - - name: Build and publish dapr-ext-strands - env: - TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} - run: | - cd ext/dapr-ext-strands - python -m build - twine upload dist/* diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6e10a39ad..808c94da2 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -3,6 +3,7 @@ name: dapr-python on: push: branches: + - main - feature/* pull_request: branches: @@ -36,6 +37,15 @@ jobs: echo "Source files are not formatted correctly. Run 'uv run ruff check --fix && uv run ruff format'." exit 1 fi + - name: Verify main is on a .dev version + if: github.ref == 'refs/heads/main' || github.base_ref == 'main' + run: | + uv run python -c " + from dapr.version import __version__ + assert __version__.endswith('.dev'), ( + f'main __version__ must end in .dev (got {__version__!r}); see RELEASE.md' + ) + " build: needs: lint diff --git a/README.md b/README.md index c2ae5d7f2..44bfa49e0 100644 --- a/README.md +++ b/README.md @@ -49,20 +49,24 @@ pip3 install dapr-ext-grpc pip3 install dapr-ext-fastapi ``` -* Development package +* In-development version + +Only tagged releases are published to PyPI. To install the in-development +version (the current state of `main`), point pip at the GitHub repository: ```sh -# Install Dapr client sdk -pip3 install dapr +# Install the latest dev build of the Dapr client sdk +pip3 install "dapr @ git+https://github.com/dapr/python-sdk.git@main" -# Install Dapr gRPC AppCallback service extension -pip3 install dapr-ext-grpc-dev +# Install the latest dev build of the gRPC AppCallback service extension +pip3 install "dapr-ext-grpc @ git+https://github.com/dapr/python-sdk.git@main#subdirectory=ext/dapr-ext-grpc" -# Install Dapr Fast Api extension for Actor -pip3 install dapr-ext-fastapi-dev +# Install the latest dev build of the FastAPI extension for Actor +pip3 install "dapr-ext-fastapi @ git+https://github.com/dapr/python-sdk.git@main#subdirectory=ext/dapr-ext-fastapi" ``` -> Note: Do not install both packages. +Replace `@main` with a commit SHA or release branch (e.g. `@release-1.17`) +to pin to a specific point in history. ### Try out examples diff --git a/RELEASE.md b/RELEASE.md index 49eac2335..93e02c625 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -34,16 +34,19 @@ release-X.Y ●──●────●───●───●───● │ first commit on release-X.Y: - versions (prev).dev → X.Y.0rc0 - - dapr deps >=(prev).dev → >=X.Y.0rc0 simultaneously on main: - versions (prev).dev → X.Y.0.dev - - dapr deps >=(prev).dev → >=X.Y.0.dev ``` +Only tag pushes (`v*`) publish to PyPI. Pushes to `main` and release branches +do not publish anything. + +Users who need the development builds can install from git +(see the [README](./README.md#install-dapr-python-sdk)). + ## Version files -Every package in this repository has one version file and, for extensions, one `setup.cfg` -dependency line that must be kept in sync during a release. +Every package in this repository has one version file. **Version files** (set `__version__`): - `dapr/version/version.py` @@ -54,24 +57,16 @@ dependency line that must be kept in sync during a release. - `ext/dapr-ext-strands/dapr/ext/strands/version.py` - `ext/flask_dapr/flask_dapr/version.py` -**Dependency lower bounds** in extension `setup.cfg` files (each has `dapr >= `): -- `ext/dapr-ext-workflow/setup.cfg` -- `ext/dapr-ext-grpc/setup.cfg` -- `ext/dapr-ext-fastapi/setup.cfg` -- `ext/dapr-ext-langgraph/setup.cfg` -- `ext/dapr-ext-strands/setup.cfg` -- `ext/flask_dapr/setup.cfg` - ## Version string conventions -| Stage | `__version__` example | dep lower bound example | -|---|---|---| -| Development (always on `main`) | `1.17.0.dev` | `dapr >= 1.17.0.dev` | -| First RC (on `release-X.Y`) | `1.17.0rc0` | `dapr >= 1.17.0rc0` | -| Subsequent RCs (on `release-X.Y`) | `1.17.0rc1`, `1.17.0rc2`, … | `dapr >= 1.17.0rc1` | -| Stable release | `1.17.0` | `dapr >= 1.17.0` | -| Patch release candidate | `1.17.1rc1` | `dapr >= 1.17.1rc1` | -| Stable patch release | `1.17.1` | `dapr >= 1.17.1` | +| Stage | `__version__` example | +| ---------------------------------- | ----------------------------- | +| Development (always on `main`) | `1.18.0.dev` | +| First RC (on `release-X.Y`) | `1.18.0rc0` | +| Subsequent RCs (on `release-X.Y`) | `1.18.0rc1`, `1.18.0rc2`, … | +| Stable release | `1.18.0` | +| Patch release candidate | `1.18.1rc1` | +| Stable patch release | `1.18.1` | ## Remote convention @@ -94,17 +89,13 @@ git push upstream release-X.Y ### 2. Bump versions on the release branch (first commit) -On the newly created `release-X.Y` branch, open a PR **targeting `release-X.Y`** that does: - -- In all seven version files: change `X.Y.0.dev` → `X.Y.0rc0` -- In all six extension `setup.cfg` files: change `dapr >= X.Y.0.dev` → `dapr >= X.Y.0rc0` +On the newly created `release-X.Y` branch, open a PR **targeting `release-X.Y`** that +changes `X.Y.0.dev` → `X.Y.0rc0` in all the version files. ### 3. Bump versions on `main` (second commit) -Open a PR targeting `main` to align it with the new release version: - -- In all seven version files: change the previous dev version to `X.Y.0.dev` -- In all six extension `setup.cfg` files: change the previous `dapr >= ...dev` to `dapr >= X.Y.0.dev` +Open a PR targeting `main` that changes the previous dev version to `X.Y.0.dev` in all +the version files. ### 4. Push the tag @@ -127,10 +118,8 @@ Perform this when you want to publish `X.Y.0rcN` (N ≥ 1) from an existing `rel ### 1. Bump versions on the release branch -Open a PR **targeting `release-X.Y`** that does: - -- In all seven version files: change `X.Y.0rc(N-1)` → `X.Y.0rcN` -- In all six extension `setup.cfg` files: change `dapr >= X.Y.0rc(N-1)` → `dapr >= X.Y.0rcN` +Open a PR **targeting `release-X.Y`** that changes `X.Y.0rc(N-1)` → `X.Y.0rcN` in all +the version files. ### 2. Push the tag @@ -150,10 +139,8 @@ initial `X.Y.0` or a patch release (`X.Y.1`, `X.Y.2`, …). ### 1. Bump versions on the release branch -Open a PR **targeting `release-X.Y`** that does: - -- In all seven version files: change `X.Y.ZrcN` → `X.Y.Z` (drop the `rcN` suffix) -- In all six extension `setup.cfg` files: change `dapr >= X.Y.ZrcN` → `dapr >= X.Y.Z` +Open a PR **targeting `release-X.Y`** that drops the `rcN` suffix in all the version +files: `X.Y.ZrcN` → `X.Y.Z`. ### 2. Push the tag diff --git a/dapr/version/version.py b/dapr/version/version.py index cd6ba3565..dc8e17fbf 100644 --- a/dapr/version/version.py +++ b/dapr/version/version.py @@ -13,4 +13,4 @@ limitations under the License. """ -__version__ = '1.17.0.dev' +__version__ = '1.18.0.dev' diff --git a/ext/dapr-ext-fastapi/dapr/ext/fastapi/version.py b/ext/dapr-ext-fastapi/dapr/ext/fastapi/version.py index cd6ba3565..dc8e17fbf 100644 --- a/ext/dapr-ext-fastapi/dapr/ext/fastapi/version.py +++ b/ext/dapr-ext-fastapi/dapr/ext/fastapi/version.py @@ -13,4 +13,4 @@ limitations under the License. """ -__version__ = '1.17.0.dev' +__version__ = '1.18.0.dev' diff --git a/ext/dapr-ext-fastapi/setup.py b/ext/dapr-ext-fastapi/setup.py deleted file mode 100644 index 0668df856..000000000 --- a/ext/dapr-ext-fastapi/setup.py +++ /dev/null @@ -1,83 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -Copyright 2023 The Dapr Authors -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - -import os -import sys - -if sys.version_info >= (3, 11): - import tomllib -else: - import tomli as tomllib - -from packaging.requirements import Requirement -from setuptools import setup - -# Load version in dapr package. -version_info = {} -with open('dapr/ext/fastapi/version.py') as fp: - exec(fp.read(), version_info) -__version__ = version_info['__version__'] - - -def is_release(): - return '.dev' not in __version__ - - -name = 'dapr-ext-fastapi' -version = __version__ -description = 'The official release of Dapr FastAPI extension.' -long_description = """ -This is the FastAPI extension for Dapr. - -Dapr is a portable, serverless, event-driven runtime that makes it easy for developers to -build resilient, stateless and stateful microservices that run on the cloud and edge and -embraces the diversity of languages and developer frameworks. - -Dapr codifies the best practices for building microservice applications into open, -independent, building blocks that enable you to build portable applications with the language -and framework of your choice. Each building block is independent and you can use one, some, -or all of them in your application. -""".lstrip() - -# Get build number from GITHUB_RUN_NUMBER environment variable -build_number = os.environ.get('GITHUB_RUN_NUMBER', '0') - -# Read dependencies from pyproject.toml (single source of truth) -with open('pyproject.toml', 'rb') as f: - stable_requires = list(tomllib.load(f)['project']['dependencies']) - -setup_kwargs = dict( - name=name, - version=version, - description=description, - long_description=long_description, - install_requires=stable_requires, -) - -if not is_release(): - dev_version = f'{__version__}{build_number}' - setup_kwargs['name'] += '-dev' - setup_kwargs['version'] = dev_version - setup_kwargs['description'] = 'The developmental release for Dapr FastAPI extension.' - setup_kwargs['long_description'] = ( - 'This is the developmental release for Dapr FastAPI extension.' - ) - setup_kwargs['install_requires'] = [ - f'dapr-dev=={dev_version}' if Requirement(r).name == 'dapr' else r for r in stable_requires - ] - -print(f'package name: {setup_kwargs["name"]}, version: {setup_kwargs["version"]}', flush=True) - -setup(**setup_kwargs) diff --git a/ext/dapr-ext-grpc/dapr/ext/grpc/version.py b/ext/dapr-ext-grpc/dapr/ext/grpc/version.py index cd6ba3565..dc8e17fbf 100644 --- a/ext/dapr-ext-grpc/dapr/ext/grpc/version.py +++ b/ext/dapr-ext-grpc/dapr/ext/grpc/version.py @@ -13,4 +13,4 @@ limitations under the License. """ -__version__ = '1.17.0.dev' +__version__ = '1.18.0.dev' diff --git a/ext/dapr-ext-grpc/setup.py b/ext/dapr-ext-grpc/setup.py deleted file mode 100644 index 20c39510c..000000000 --- a/ext/dapr-ext-grpc/setup.py +++ /dev/null @@ -1,83 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -Copyright 2023 The Dapr Authors -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - -import os -import sys - -if sys.version_info >= (3, 11): - import tomllib -else: - import tomli as tomllib - -from packaging.requirements import Requirement -from setuptools import setup - -# Load version in dapr package. -version_info = {} -with open('dapr/ext/grpc/version.py') as fp: - exec(fp.read(), version_info) -__version__ = version_info['__version__'] - - -def is_release(): - return '.dev' not in __version__ - - -name = 'dapr-ext-grpc' -version = __version__ -description = 'The official release of Dapr Python SDK gRPC Extension.' -long_description = """ -This is the gRPC extension for Dapr. - -Dapr is a portable, serverless, event-driven runtime that makes it easy for developers to -build resilient, stateless and stateful microservices that run on the cloud and edge and -embraces the diversity of languages and developer frameworks. - -Dapr codifies the best practices for building microservice applications into open, -independent, building blocks that enable you to build portable applications with the language -and framework of your choice. Each building block is independent and you can use one, some, -or all of them in your application. -""".lstrip() - -# Get build number from GITHUB_RUN_NUMBER environment variable -build_number = os.environ.get('GITHUB_RUN_NUMBER', '0') - -# Read dependencies from pyproject.toml (single source of truth) -with open('pyproject.toml', 'rb') as f: - stable_requires = list(tomllib.load(f)['project']['dependencies']) - -setup_kwargs = dict( - name=name, - version=version, - description=description, - long_description=long_description, - install_requires=stable_requires, -) - -if not is_release(): - dev_version = f'{__version__}{build_number}' - setup_kwargs['name'] += '-dev' - setup_kwargs['version'] = dev_version - setup_kwargs['description'] = 'The developmental release for Dapr gRPC AppCallback.' - setup_kwargs['long_description'] = ( - 'This is the developmental release for Dapr gRPC AppCallback.' - ) - setup_kwargs['install_requires'] = [ - f'dapr-dev=={dev_version}' if Requirement(r).name == 'dapr' else r for r in stable_requires - ] - -print(f'package name: {setup_kwargs["name"]}, version: {setup_kwargs["version"]}', flush=True) - -setup(**setup_kwargs) diff --git a/ext/dapr-ext-langgraph/dapr/ext/langgraph/version.py b/ext/dapr-ext-langgraph/dapr/ext/langgraph/version.py index b81f0d988..65bc828bf 100644 --- a/ext/dapr-ext-langgraph/dapr/ext/langgraph/version.py +++ b/ext/dapr-ext-langgraph/dapr/ext/langgraph/version.py @@ -13,4 +13,4 @@ limitations under the License. """ -__version__ = '1.17.0.dev' +__version__ = '1.18.0.dev' diff --git a/ext/dapr-ext-langgraph/setup.py b/ext/dapr-ext-langgraph/setup.py deleted file mode 100644 index ce8a4edcb..000000000 --- a/ext/dapr-ext-langgraph/setup.py +++ /dev/null @@ -1,85 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -Copyright 2025 The Dapr Authors -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - -import os -import sys - -if sys.version_info >= (3, 11): - import tomllib -else: - import tomli as tomllib - -from packaging.requirements import Requirement -from setuptools import setup - -# Load version in dapr package. -version_info = {} -with open('dapr/ext/langgraph/version.py') as fp: - exec(fp.read(), version_info) -__version__ = version_info['__version__'] - - -def is_release(): - return '.dev' not in __version__ - - -name = 'dapr-ext-langgraph' -version = __version__ -description = 'The official release of Dapr Python SDK LangGraph Extension.' -long_description = """ -This is the Dapr Checkpointer extension for LangGraph. - -Dapr is a portable, serverless, event-driven runtime that makes it easy for developers to -build resilient, stateless and stateful microservices that run on the cloud and edge and -embraces the diversity of languages and developer frameworks. - -Dapr codifies the best practices for building microservice applications into open, -independent, building blocks that enable you to build portable applications with the language -and framework of your choice. Each building block is independent and you can use one, some, -or all of them in your application. -""".lstrip() - -# Get build number from GITHUB_RUN_NUMBER environment variable -build_number = os.environ.get('GITHUB_RUN_NUMBER', '0') - -# Read dependencies from pyproject.toml (single source of truth) -with open('pyproject.toml', 'rb') as f: - stable_requires = list(tomllib.load(f)['project']['dependencies']) - -setup_kwargs = dict( - name=name, - version=version, - description=description, - long_description=long_description, - install_requires=stable_requires, -) - -if not is_release(): - dev_version = f'{__version__}{build_number}' - setup_kwargs['name'] += '-dev' - setup_kwargs['version'] = dev_version - setup_kwargs['description'] = ( - 'The developmental release for the Dapr Checkpointer extension for LangGraph' - ) - setup_kwargs['long_description'] = ( - 'This is the developmental release for the Dapr Checkpointer extension for LangGraph' - ) - setup_kwargs['install_requires'] = [ - f'dapr-dev=={dev_version}' if Requirement(r).name == 'dapr' else r for r in stable_requires - ] - -print(f'package name: {setup_kwargs["name"]}, version: {setup_kwargs["version"]}', flush=True) - -setup(**setup_kwargs) diff --git a/ext/dapr-ext-strands/dapr/ext/strands/version.py b/ext/dapr-ext-strands/dapr/ext/strands/version.py index b81f0d988..65bc828bf 100644 --- a/ext/dapr-ext-strands/dapr/ext/strands/version.py +++ b/ext/dapr-ext-strands/dapr/ext/strands/version.py @@ -13,4 +13,4 @@ limitations under the License. """ -__version__ = '1.17.0.dev' +__version__ = '1.18.0.dev' diff --git a/ext/dapr-ext-strands/setup.py b/ext/dapr-ext-strands/setup.py deleted file mode 100644 index c26d086e9..000000000 --- a/ext/dapr-ext-strands/setup.py +++ /dev/null @@ -1,85 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -Copyright 2025 The Dapr Authors -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - -import os -import sys - -if sys.version_info >= (3, 11): - import tomllib -else: - import tomli as tomllib - -from packaging.requirements import Requirement -from setuptools import setup - -# Load version in dapr package. -version_info = {} -with open('dapr/ext/strands/version.py') as fp: - exec(fp.read(), version_info) -__version__ = version_info['__version__'] - - -def is_release(): - return '.dev' not in __version__ - - -name = 'dapr-ext-strands' -version = __version__ -description = 'The official release of Dapr Python SDK Strands Agents Extension.' -long_description = """ -This is the Dapr Session Manager extension for Strands Agents. - -Dapr is a portable, serverless, event-driven runtime that makes it easy for developers to -build resilient, stateless and stateful microservices that run on the cloud and edge and -embraces the diversity of languages and developer frameworks. - -Dapr codifies the best practices for building microservice applications into open, -independent, building blocks that enable you to build portable applications with the language -and framework of your choice. Each building block is independent and you can use one, some, -or all of them in your application. -""".lstrip() - -# Get build number from GITHUB_RUN_NUMBER environment variable -build_number = os.environ.get('GITHUB_RUN_NUMBER', '0') - -# Read dependencies from pyproject.toml (single source of truth) -with open('pyproject.toml', 'rb') as f: - stable_requires = list(tomllib.load(f)['project']['dependencies']) - -setup_kwargs = dict( - name=name, - version=version, - description=description, - long_description=long_description, - install_requires=stable_requires, -) - -if not is_release(): - dev_version = f'{__version__}{build_number}' - setup_kwargs['name'] += '-dev' - setup_kwargs['version'] = dev_version - setup_kwargs['description'] = ( - 'The developmental release for the Dapr Session Manager extension for Strands Agents' - ) - setup_kwargs['long_description'] = ( - 'This is the developmental release for the Dapr Session Manager extension for Strands Agents' - ) - setup_kwargs['install_requires'] = [ - f'dapr-dev=={dev_version}' if Requirement(r).name == 'dapr' else r for r in stable_requires - ] - -print(f'package name: {setup_kwargs["name"]}, version: {setup_kwargs["version"]}', flush=True) - -setup(**setup_kwargs) diff --git a/ext/dapr-ext-workflow/dapr/ext/workflow/version.py b/ext/dapr-ext-workflow/dapr/ext/workflow/version.py index cd6ba3565..dc8e17fbf 100644 --- a/ext/dapr-ext-workflow/dapr/ext/workflow/version.py +++ b/ext/dapr-ext-workflow/dapr/ext/workflow/version.py @@ -13,4 +13,4 @@ limitations under the License. """ -__version__ = '1.17.0.dev' +__version__ = '1.18.0.dev' diff --git a/ext/dapr-ext-workflow/setup.py b/ext/dapr-ext-workflow/setup.py deleted file mode 100644 index 7c542875d..000000000 --- a/ext/dapr-ext-workflow/setup.py +++ /dev/null @@ -1,83 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -Copyright 2023 The Dapr Authors -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - -import os -import sys - -if sys.version_info >= (3, 11): - import tomllib -else: - import tomli as tomllib - -from packaging.requirements import Requirement -from setuptools import setup - -# Load version in dapr package. -version_info = {} -with open('dapr/ext/workflow/version.py') as fp: - exec(fp.read(), version_info) -__version__ = version_info['__version__'] - - -def is_release(): - return '.dev' not in __version__ - - -name = 'dapr-ext-workflow' -version = __version__ -description = 'The official release of Dapr Python SDK Workflow Authoring Extension.' -long_description = """ -This is the Workflow authoring extension for Dapr. - -Dapr is a portable, serverless, event-driven runtime that makes it easy for developers to -build resilient, stateless and stateful microservices that run on the cloud and edge and -embraces the diversity of languages and developer frameworks. - -Dapr codifies the best practices for building microservice applications into open, -independent, building blocks that enable you to build portable applications with the language -and framework of your choice. Each building block is independent and you can use one, some, -or all of them in your application. -""".lstrip() - -# Get build number from GITHUB_RUN_NUMBER environment variable -build_number = os.environ.get('GITHUB_RUN_NUMBER', '0') - -# Read dependencies from pyproject.toml (single source of truth) -with open('pyproject.toml', 'rb') as f: - stable_requires = list(tomllib.load(f)['project']['dependencies']) - -setup_kwargs = dict( - name=name, - version=version, - description=description, - long_description=long_description, - install_requires=stable_requires, -) - -if not is_release(): - dev_version = f'{__version__}{build_number}' - setup_kwargs['name'] += '-dev' - setup_kwargs['version'] = dev_version - setup_kwargs['description'] = 'The developmental release for Dapr Workflow Authoring.' - setup_kwargs['long_description'] = ( - 'This is the developmental release for Dapr Workflow Authoring.' - ) - setup_kwargs['install_requires'] = [ - f'dapr-dev=={dev_version}' if Requirement(r).name == 'dapr' else r for r in stable_requires - ] - -print(f'package name: {setup_kwargs["name"]}, version: {setup_kwargs["version"]}', flush=True) - -setup(**setup_kwargs) diff --git a/ext/flask_dapr/flask_dapr/version.py b/ext/flask_dapr/flask_dapr/version.py index cd6ba3565..dc8e17fbf 100644 --- a/ext/flask_dapr/flask_dapr/version.py +++ b/ext/flask_dapr/flask_dapr/version.py @@ -13,4 +13,4 @@ limitations under the License. """ -__version__ = '1.17.0.dev' +__version__ = '1.18.0.dev' diff --git a/ext/flask_dapr/setup.py b/ext/flask_dapr/setup.py deleted file mode 100644 index e74874119..000000000 --- a/ext/flask_dapr/setup.py +++ /dev/null @@ -1,83 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -Copyright 2023 The Dapr Authors -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - -import os -import sys - -if sys.version_info >= (3, 11): - import tomllib -else: - import tomli as tomllib - -from packaging.requirements import Requirement -from setuptools import setup - -# Load version in dapr package. -version_info = {} -with open('flask_dapr/version.py') as fp: - exec(fp.read(), version_info) -__version__ = version_info['__version__'] - - -def is_release(): - return '.dev' not in __version__ - - -name = 'flask-dapr' -version = __version__ -description = 'The official release of Dapr Python SDK Flask Extension.' -long_description = """ -This is the Flask extension for Dapr. - -Dapr is a portable, serverless, event-driven runtime that makes it easy for developers to -build resilient, stateless and stateful microservices that run on the cloud and edge and -embraces the diversity of languages and developer frameworks. - -Dapr codifies the best practices for building microservice applications into open, -independent, building blocks that enable you to build portable applications with the language -and framework of your choice. Each building block is independent and you can use one, some, -or all of them in your application. -""".lstrip() - -# Get build number from GITHUB_RUN_NUMBER environment variable -build_number = os.environ.get('GITHUB_RUN_NUMBER', '0') - -# Read dependencies from pyproject.toml (single source of truth) -with open('pyproject.toml', 'rb') as f: - stable_requires = list(tomllib.load(f)['project']['dependencies']) - -setup_kwargs = dict( - name=name, - version=version, - description=description, - long_description=long_description, - install_requires=stable_requires, -) - -if not is_release(): - dev_version = f'{__version__}{build_number}' - setup_kwargs['name'] += '-dev' - setup_kwargs['version'] = dev_version - setup_kwargs['description'] = 'The developmental release for Dapr Python SDK Flask.' - setup_kwargs['long_description'] = ( - 'This is the developmental release for Dapr Python SDK Flask.' - ) - setup_kwargs['install_requires'] = [ - f'dapr-dev=={dev_version}' if Requirement(r).name == 'dapr' else r for r in stable_requires - ] - -print(f'package name: {setup_kwargs["name"]}, version: {setup_kwargs["version"]}', flush=True) - -setup(**setup_kwargs) diff --git a/setup.py b/setup.py deleted file mode 100644 index 123adc99a..000000000 --- a/setup.py +++ /dev/null @@ -1,62 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -Copyright 2021 The Dapr Authors -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - -import os - -from setuptools import setup - -# Load version in dapr package. -version_info = {} -with open('dapr/version/version.py') as fp: - exec(fp.read(), version_info) -__version__ = version_info['__version__'] - - -def is_release(): - return '.dev' not in __version__ - - -name = 'dapr' -version = __version__ -description = 'The official release of Dapr Python SDK.' -long_description = """ -Dapr is a portable, serverless, event-driven runtime that makes it easy for developers to -build resilient, stateless and stateful microservices that run on the cloud and edge and -embraces the diversity of languages and developer frameworks. - -Dapr codifies the best practices for building microservice applications into open, -independent, building blocks that enable you to build portable applications with the language -and framework of your choice. Each building block is independent and you can use one, some, -or all of them in your application. -""".lstrip() - -# Get build number from GITHUB_RUN_NUMBER environment variable -build_number = os.environ.get('GITHUB_RUN_NUMBER', '0') - -if not is_release(): - version = f'{__version__}{build_number}' - name += '-dev' - description = 'The developmental release for Dapr Python SDK.' - long_description = 'This is the developmental release for Dapr Python SDK.' - -print(f'package name: {name}, version: {version}', flush=True) - - -setup( - name=name, - version=version, - description=description, - long_description=long_description, -) From 31360827956872bcc7d872e599057cfe83e6b59b Mon Sep 17 00:00:00 2001 From: Sergio Herrera <627709+seherv@users.noreply.github.com> Date: Thu, 7 May 2026 20:23:37 +0200 Subject: [PATCH 02/10] Add sanity checks to tagged release builds Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com> --- .github/workflows/build-tag.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/build-tag.yaml b/.github/workflows/build-tag.yaml index a9132d12e..8e3d82831 100644 --- a/.github/workflows/build-tag.yaml +++ b/.github/workflows/build-tag.yaml @@ -19,6 +19,27 @@ jobs: uses: astral-sh/setup-uv@v7 - name: Install dependencies run: uv sync --frozen --all-packages --group dev + - name: Verify version.py matches tag + if: startsWith(github.ref, 'refs/tags/v') + run: | + uv run python -c " + import os + from dapr.version import __version__ + tag_version = os.environ['GITHUB_REF'].removeprefix('refs/tags/v') + assert tag_version == __version__, ( + f'Tag {os.environ[\"GITHUB_REF\"]!r} expects __version__={tag_version!r}, ' + f'got {__version__!r}. Bump version files before tagging, see RELEASE.md' + ) + " + - name: Verify release version is not a .dev + if: startsWith(github.ref, 'refs/tags/v') + run: | + uv run python -c " + from dapr.version import __version__ + assert '.dev' not in __version__, ( + f'__version__ {__version__!r} contains ".dev". Release tags must point to a stable or rc version' + ) + " - name: Run Autoformatter run: | uv run ruff check --fix && uv run ruff format From a66b855f30833d9be0b10b0b04ec08105f283de9 Mon Sep 17 00:00:00 2001 From: Sergio Herrera <627709+seherv@users.noreply.github.com> Date: Thu, 7 May 2026 22:17:15 +0200 Subject: [PATCH 03/10] Disable redundant sdist builds for hatchling migration Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com> --- .github/workflows/build-tag.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-tag.yaml b/.github/workflows/build-tag.yaml index 8e3d82831..a3a3ef868 100644 --- a/.github/workflows/build-tag.yaml +++ b/.github/workflows/build-tag.yaml @@ -97,47 +97,47 @@ jobs: env: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | - python -m build + python -m build --wheel twine upload dist/* - name: Build and publish dapr-ext-workflow env: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | cd ext/dapr-ext-workflow - python -m build + python -m build --wheel twine upload dist/* - name: Build and publish Dapr Flask Extension env: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | cd ext/flask_dapr - python -m build + python -m build --wheel twine upload dist/* - name: Build and publish dapr-ext-grpc env: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | cd ext/dapr-ext-grpc - python -m build + python -m build --wheel twine upload dist/* - name: Build and publish dapr-ext-fastapi env: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | cd ext/dapr-ext-fastapi - python -m build + python -m build --wheel twine upload dist/* - name: Build and publish dapr-ext-langgraph env: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | cd ext/dapr-ext-langgraph - python -m build + python -m build --wheel twine upload dist/* - name: Build and publish dapr-ext-strands env: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | cd ext/dapr-ext-strands - python -m build + python -m build --wheel twine upload dist/* From 8793a47c429ee8e4980a8bc414d98dd8598587e3 Mon Sep 17 00:00:00 2001 From: Sergio Herrera <627709+seherv@users.noreply.github.com> Date: Thu, 7 May 2026 22:21:28 +0200 Subject: [PATCH 04/10] Move all version numbers to a centralized VERSION file Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com> --- RELEASE.md | 37 +++++++------------ VERSION | 1 + dapr/version/__init__.py | 3 +- dapr/version/version.py | 16 -------- .../dapr/ext/fastapi/version.py | 16 -------- ext/dapr-ext-fastapi/pyproject.toml | 19 ++++------ ext/dapr-ext-grpc/dapr/ext/grpc/version.py | 16 -------- ext/dapr-ext-grpc/pyproject.toml | 19 ++++------ .../dapr/ext/langgraph/version.py | 16 -------- ext/dapr-ext-langgraph/pyproject.toml | 19 ++++------ .../dapr/ext/strands/version.py | 16 -------- ext/dapr-ext-strands/pyproject.toml | 19 ++++------ .../dapr/ext/workflow/version.py | 16 -------- ext/dapr-ext-workflow/pyproject.toml | 19 ++++------ ext/flask_dapr/flask_dapr/version.py | 16 -------- ext/flask_dapr/pyproject.toml | 17 ++++----- pyproject.toml | 33 ++++++----------- 17 files changed, 77 insertions(+), 221 deletions(-) create mode 100644 VERSION delete mode 100644 dapr/version/version.py delete mode 100644 ext/dapr-ext-fastapi/dapr/ext/fastapi/version.py delete mode 100644 ext/dapr-ext-grpc/dapr/ext/grpc/version.py delete mode 100644 ext/dapr-ext-langgraph/dapr/ext/langgraph/version.py delete mode 100644 ext/dapr-ext-strands/dapr/ext/strands/version.py delete mode 100644 ext/dapr-ext-workflow/dapr/ext/workflow/version.py delete mode 100644 ext/flask_dapr/flask_dapr/version.py diff --git a/RELEASE.md b/RELEASE.md index 93e02c625..d5922f7a6 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -44,22 +44,14 @@ do not publish anything. Users who need the development builds can install from git (see the [README](./README.md#install-dapr-python-sdk)). -## Version files +## Version file -Every package in this repository has one version file. - -**Version files** (set `__version__`): -- `dapr/version/version.py` -- `ext/dapr-ext-workflow/dapr/ext/workflow/version.py` -- `ext/dapr-ext-grpc/dapr/ext/grpc/version.py` -- `ext/dapr-ext-fastapi/dapr/ext/fastapi/version.py` -- `ext/dapr-ext-langgraph/dapr/ext/langgraph/version.py` -- `ext/dapr-ext-strands/dapr/ext/strands/version.py` -- `ext/flask_dapr/flask_dapr/version.py` +A single `VERSION` file at the repo root is the source of truth for all +the packages. Each package's `pyproject.toml` reads from it. ## Version string conventions -| Stage | `__version__` example | +| Stage | `VERSION` example | | ---------------------------------- | ----------------------------- | | Development (always on `main`) | `1.18.0.dev` | | First RC (on `release-X.Y`) | `1.18.0rc0` | @@ -87,15 +79,15 @@ git checkout -b release-X.Y git push upstream release-X.Y ``` -### 2. Bump versions on the release branch (first commit) +### 2. Bump VERSION on the release branch (first commit) On the newly created `release-X.Y` branch, open a PR **targeting `release-X.Y`** that -changes `X.Y.0.dev` → `X.Y.0rc0` in all the version files. +changes the `VERSION` file from `X.Y.0.dev` → `X.Y.0rc0`. -### 3. Bump versions on `main` (second commit) +### 3. Bump VERSION on `main` (second commit) -Open a PR targeting `main` that changes the previous dev version to `X.Y.0.dev` in all -the version files. +Open a PR targeting `main` that changes `VERSION` from the previous dev version to +`X.Y.0.dev`. ### 4. Push the tag @@ -116,10 +108,9 @@ all packages to PyPI. Perform this when you want to publish `X.Y.0rcN` (N ≥ 1) from an existing `release-X.Y` branch. -### 1. Bump versions on the release branch +### 1. Bump VERSION on the release branch -Open a PR **targeting `release-X.Y`** that changes `X.Y.0rc(N-1)` → `X.Y.0rcN` in all -the version files. +Open a PR **targeting `release-X.Y`** that changes `VERSION` from `X.Y.0rc(N-1)` → `X.Y.0rcN`. ### 2. Push the tag @@ -137,10 +128,10 @@ git tag vX.Y.0rcN && git push upstream vX.Y.0rcN Perform this when `release-X.Y` is ready to ship a stable version — whether that is the initial `X.Y.0` or a patch release (`X.Y.1`, `X.Y.2`, …). -### 1. Bump versions on the release branch +### 1. Bump VERSION on the release branch -Open a PR **targeting `release-X.Y`** that drops the `rcN` suffix in all the version -files: `X.Y.ZrcN` → `X.Y.Z`. +Open a PR **targeting `release-X.Y`** that drops the `rcN` suffix in `VERSION`: +`X.Y.ZrcN` → `X.Y.Z`. ### 2. Push the tag diff --git a/VERSION b/VERSION new file mode 100644 index 000000000..4773ce833 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +1.18.0.dev \ No newline at end of file diff --git a/dapr/version/__init__.py b/dapr/version/__init__.py index 3eb160812..af4518bb5 100644 --- a/dapr/version/__init__.py +++ b/dapr/version/__init__.py @@ -1,3 +1,4 @@ -from dapr.version.version import __version__ +from importlib.metadata import version +__version__ = version('dapr') __all__ = ['__version__'] diff --git a/dapr/version/version.py b/dapr/version/version.py deleted file mode 100644 index dc8e17fbf..000000000 --- a/dapr/version/version.py +++ /dev/null @@ -1,16 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -Copyright 2023 The Dapr Authors -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - -__version__ = '1.18.0.dev' diff --git a/ext/dapr-ext-fastapi/dapr/ext/fastapi/version.py b/ext/dapr-ext-fastapi/dapr/ext/fastapi/version.py deleted file mode 100644 index dc8e17fbf..000000000 --- a/ext/dapr-ext-fastapi/dapr/ext/fastapi/version.py +++ /dev/null @@ -1,16 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -Copyright 2023 The Dapr Authors -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - -__version__ = '1.18.0.dev' diff --git a/ext/dapr-ext-fastapi/pyproject.toml b/ext/dapr-ext-fastapi/pyproject.toml index fb78bad5b..2d272c329 100644 --- a/ext/dapr-ext-fastapi/pyproject.toml +++ b/ext/dapr-ext-fastapi/pyproject.toml @@ -29,19 +29,16 @@ Documentation = "https://github.com/dapr/docs" Source = "https://github.com/dapr/python-sdk" [build-system] -requires = ["setuptools>=61.0", "wheel", "packaging", "tomli; python_version < '3.11'"] -build-backend = "setuptools.build_meta" +requires = ["hatchling"] +build-backend = "hatchling.build" -[tool.setuptools.packages.find] -namespaces = true -include = ["dapr.*"] -exclude = ["tests*"] +[tool.hatch.version] +source = "regex" +path = "../../VERSION" +pattern = '(?P\S+)' -[tool.setuptools.package-data] -"dapr.ext.fastapi" = ["py.typed"] - -[tool.setuptools.dynamic] -version = {attr = "dapr.ext.fastapi.version.__version__"} +[tool.hatch.build.targets.wheel] +only-include = ["dapr/ext/fastapi"] [tool.uv.sources] dapr = { workspace = true } diff --git a/ext/dapr-ext-grpc/dapr/ext/grpc/version.py b/ext/dapr-ext-grpc/dapr/ext/grpc/version.py deleted file mode 100644 index dc8e17fbf..000000000 --- a/ext/dapr-ext-grpc/dapr/ext/grpc/version.py +++ /dev/null @@ -1,16 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -Copyright 2023 The Dapr Authors -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - -__version__ = '1.18.0.dev' diff --git a/ext/dapr-ext-grpc/pyproject.toml b/ext/dapr-ext-grpc/pyproject.toml index 4eb6e5f77..393c99476 100644 --- a/ext/dapr-ext-grpc/pyproject.toml +++ b/ext/dapr-ext-grpc/pyproject.toml @@ -28,19 +28,16 @@ Documentation = "https://github.com/dapr/docs" Source = "https://github.com/dapr/python-sdk" [build-system] -requires = ["setuptools>=61.0", "wheel", "packaging", "tomli; python_version < '3.11'"] -build-backend = "setuptools.build_meta" +requires = ["hatchling"] +build-backend = "hatchling.build" -[tool.setuptools.packages.find] -namespaces = true -include = ["dapr.*"] -exclude = ["tests*"] +[tool.hatch.version] +source = "regex" +path = "../../VERSION" +pattern = '(?P\S+)' -[tool.setuptools.package-data] -"dapr.ext.grpc" = ["py.typed"] - -[tool.setuptools.dynamic] -version = {attr = "dapr.ext.grpc.version.__version__"} +[tool.hatch.build.targets.wheel] +only-include = ["dapr/ext/grpc"] [tool.uv.sources] dapr = { workspace = true } diff --git a/ext/dapr-ext-langgraph/dapr/ext/langgraph/version.py b/ext/dapr-ext-langgraph/dapr/ext/langgraph/version.py deleted file mode 100644 index 65bc828bf..000000000 --- a/ext/dapr-ext-langgraph/dapr/ext/langgraph/version.py +++ /dev/null @@ -1,16 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -Copyright 2025 The Dapr Authors -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - -__version__ = '1.18.0.dev' diff --git a/ext/dapr-ext-langgraph/pyproject.toml b/ext/dapr-ext-langgraph/pyproject.toml index 9c5b49908..acb7e0014 100644 --- a/ext/dapr-ext-langgraph/pyproject.toml +++ b/ext/dapr-ext-langgraph/pyproject.toml @@ -31,19 +31,16 @@ Documentation = "https://github.com/dapr/docs" Source = "https://github.com/dapr/python-sdk" [build-system] -requires = ["setuptools>=61.0", "wheel", "packaging", "tomli; python_version < '3.11'"] -build-backend = "setuptools.build_meta" +requires = ["hatchling"] +build-backend = "hatchling.build" -[tool.setuptools.packages.find] -namespaces = true -include = ["dapr.*"] -exclude = ["tests*"] +[tool.hatch.version] +source = "regex" +path = "../../VERSION" +pattern = '(?P\S+)' -[tool.setuptools.package-data] -"dapr.ext.langgraph" = ["py.typed"] - -[tool.setuptools.dynamic] -version = {attr = "dapr.ext.langgraph.version.__version__"} +[tool.hatch.build.targets.wheel] +only-include = ["dapr/ext/langgraph"] [tool.uv.sources] dapr = { workspace = true } diff --git a/ext/dapr-ext-strands/dapr/ext/strands/version.py b/ext/dapr-ext-strands/dapr/ext/strands/version.py deleted file mode 100644 index 65bc828bf..000000000 --- a/ext/dapr-ext-strands/dapr/ext/strands/version.py +++ /dev/null @@ -1,16 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -Copyright 2025 The Dapr Authors -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - -__version__ = '1.18.0.dev' diff --git a/ext/dapr-ext-strands/pyproject.toml b/ext/dapr-ext-strands/pyproject.toml index 883348cac..1ff0de72b 100644 --- a/ext/dapr-ext-strands/pyproject.toml +++ b/ext/dapr-ext-strands/pyproject.toml @@ -31,19 +31,16 @@ Documentation = "https://github.com/dapr/docs" Source = "https://github.com/dapr/python-sdk" [build-system] -requires = ["setuptools>=61.0", "wheel", "packaging", "tomli; python_version < '3.11'"] -build-backend = "setuptools.build_meta" +requires = ["hatchling"] +build-backend = "hatchling.build" -[tool.setuptools.packages.find] -namespaces = true -include = ["dapr.*"] -exclude = ["tests*"] +[tool.hatch.version] +source = "regex" +path = "../../VERSION" +pattern = '(?P\S+)' -[tool.setuptools.package-data] -"dapr.ext.strands" = ["py.typed"] - -[tool.setuptools.dynamic] -version = {attr = "dapr.ext.strands.version.__version__"} +[tool.hatch.build.targets.wheel] +only-include = ["dapr/ext/strands"] [tool.uv.sources] dapr = { workspace = true } diff --git a/ext/dapr-ext-workflow/dapr/ext/workflow/version.py b/ext/dapr-ext-workflow/dapr/ext/workflow/version.py deleted file mode 100644 index dc8e17fbf..000000000 --- a/ext/dapr-ext-workflow/dapr/ext/workflow/version.py +++ /dev/null @@ -1,16 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -Copyright 2023 The Dapr Authors -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - -__version__ = '1.18.0.dev' diff --git a/ext/dapr-ext-workflow/pyproject.toml b/ext/dapr-ext-workflow/pyproject.toml index 6086ee7ad..93baaf554 100644 --- a/ext/dapr-ext-workflow/pyproject.toml +++ b/ext/dapr-ext-workflow/pyproject.toml @@ -27,19 +27,16 @@ Documentation = "https://github.com/dapr/docs" Source = "https://github.com/dapr/python-sdk" [build-system] -requires = ["setuptools>=61.0", "wheel", "packaging", "tomli; python_version < '3.11'"] -build-backend = "setuptools.build_meta" +requires = ["hatchling"] +build-backend = "hatchling.build" -[tool.setuptools.packages.find] -namespaces = true -include = ["dapr.*"] -exclude = ["tests*"] +[tool.hatch.version] +source = "regex" +path = "../../VERSION" +pattern = '(?P\S+)' -[tool.setuptools.package-data] -"dapr.ext.workflow" = ["py.typed"] - -[tool.setuptools.dynamic] -version = {attr = "dapr.ext.workflow.version.__version__"} +[tool.hatch.build.targets.wheel] +only-include = ["dapr/ext/workflow"] [tool.uv.sources] dapr = { workspace = true } diff --git a/ext/flask_dapr/flask_dapr/version.py b/ext/flask_dapr/flask_dapr/version.py deleted file mode 100644 index dc8e17fbf..000000000 --- a/ext/flask_dapr/flask_dapr/version.py +++ /dev/null @@ -1,16 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -Copyright 2023 The Dapr Authors -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - -__version__ = '1.18.0.dev' diff --git a/ext/flask_dapr/pyproject.toml b/ext/flask_dapr/pyproject.toml index 988516ce5..66f86806c 100644 --- a/ext/flask_dapr/pyproject.toml +++ b/ext/flask_dapr/pyproject.toml @@ -28,17 +28,16 @@ Documentation = "https://github.com/dapr/docs" Source = "https://github.com/dapr/python-sdk" [build-system] -requires = ["setuptools>=61.0", "wheel", "packaging", "tomli; python_version < '3.11'"] -build-backend = "setuptools.build_meta" +requires = ["hatchling"] +build-backend = "hatchling.build" -[tool.setuptools.packages.find] -include = ["flask_dapr*"] +[tool.hatch.version] +source = "regex" +path = "../../VERSION" +pattern = '(?P\S+)' -[tool.setuptools.package-data] -"flask_dapr" = ["py.typed"] - -[tool.setuptools.dynamic] -version = {attr = "flask_dapr.version.__version__"} +[tool.hatch.build.targets.wheel] +only-include = ["flask_dapr"] [tool.uv.sources] dapr = { workspace = true } diff --git a/pyproject.toml b/pyproject.toml index 8c4e886ee..c726d1f71 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,19 +32,16 @@ Documentation = "https://github.com/dapr/docs" Source = "https://github.com/dapr/python-sdk" [build-system] -requires = ["setuptools>=61.0", "wheel"] -build-backend = "setuptools.build_meta" +requires = ["hatchling"] +build-backend = "hatchling.build" -[tool.setuptools.packages.find] -namespaces = true -include = ["dapr", "dapr.*"] -exclude = ["tests*", "ext*", "examples*"] +[tool.hatch.version] +source = "regex" +path = "VERSION" +pattern = '(?P\S+)' -[tool.setuptools.package-data] -"dapr" = ["py.typed"] - -[tool.setuptools.dynamic] -version = {attr = "dapr.version.version.__version__"} +[tool.hatch.build.targets.wheel] +packages = ["dapr"] [tool.uv.workspace] members = [ @@ -120,16 +117,10 @@ warn_unused_configs = true warn_redundant_casts = true show_error_codes = true check_untyped_defs = true -files = [ - "dapr/actor/**/*.py", - "dapr/aio/**/*.py", - "dapr/clients/**/*.py", - "dapr/conf/**/*.py", - "dapr/serializers/**/*.py", - "ext/dapr-ext-grpc/dapr/**/*.py", - "ext/dapr-ext-fastapi/dapr/**/*.py", - "ext/flask_dapr/flask_dapr/*.py", - "examples/demo_actor/**/*.py", +namespace_packages = true +packages = [ + "dapr", + "flask_dapr", ] [[tool.mypy.overrides]] From f73f9a10b91b6353c8879f203e07b31bb501f022 Mon Sep 17 00:00:00 2001 From: Sergio Herrera <627709+seherv@users.noreply.github.com> Date: Thu, 7 May 2026 22:22:21 +0200 Subject: [PATCH 05/10] Ignore minor mypy errors Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com> --- dapr/clients/exceptions.py | 2 +- dapr/clients/grpc/subscription.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dapr/clients/exceptions.py b/dapr/clients/exceptions.py index f6358cb85..02d0d020b 100644 --- a/dapr/clients/exceptions.py +++ b/dapr/clients/exceptions.py @@ -164,7 +164,7 @@ def __init__(self, err: RpcError): self._err_message = err.details() self._details = StatusDetails() - self._grpc_status = rpc_status.from_call(err) + self._grpc_status = rpc_status.from_call(err) # type: ignore[arg-type] self._parse_details() def _parse_details(self): diff --git a/dapr/clients/grpc/subscription.py b/dapr/clients/grpc/subscription.py index dfdc0b2f8..cd5798321 100644 --- a/dapr/clients/grpc/subscription.py +++ b/dapr/clients/grpc/subscription.py @@ -63,7 +63,7 @@ def outgoing_request_iterator(): self._stream = self._stub.SubscribeTopicEventsAlpha1(outgoing_request_iterator()) self._set_stream_active() try: - next(self._stream) # discard the initial message + next(self._stream) # type: ignore[arg-type] # discard the initial message except Exception as e: raise Exception(f'Error while initializing stream: {e}') @@ -84,7 +84,7 @@ def next_message(self): try: # Read the next message from the stream directly - message = next(self._stream) + message = next(self._stream) # type: ignore[call-overload] return SubscriptionMessage(message.event_message) except RpcError as e: # If Dapr can't be reached, wait until it's ready and reconnect the stream. From b1d8a1129b4fa2764a560d28a398853be15dcacf Mon Sep 17 00:00:00 2001 From: Sergio Herrera <627709+seherv@users.noreply.github.com> Date: Fri, 8 May 2026 12:36:31 +0200 Subject: [PATCH 06/10] Test setup with TestPyPI Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com> --- .github/workflows/build-tag.yaml | 15 ++- VERSION | 2 +- dapr/version/__init__.py | 2 +- ext/dapr-ext-fastapi/pyproject.toml | 6 +- ext/dapr-ext-grpc/pyproject.toml | 6 +- ext/dapr-ext-langgraph/README.rst | 2 +- ext/dapr-ext-langgraph/pyproject.toml | 6 +- ext/dapr-ext-strands/README.rst | 2 +- ext/dapr-ext-strands/pyproject.toml | 6 +- ext/dapr-ext-workflow/pyproject.toml | 6 +- ext/flask_dapr/README.rst | 22 ++-- ext/flask_dapr/pyproject.toml | 6 +- pyproject.toml | 2 +- uv.lock | 182 +++++++++++++------------- 14 files changed, 133 insertions(+), 132 deletions(-) diff --git a/.github/workflows/build-tag.yaml b/.github/workflows/build-tag.yaml index a3a3ef868..5abbf956b 100644 --- a/.github/workflows/build-tag.yaml +++ b/.github/workflows/build-tag.yaml @@ -83,6 +83,7 @@ jobs: runs-on: ubuntu-latest env: TWINE_USERNAME: "__token__" + TWINE_REPOSITORY_URL: "https://test.pypi.org/legacy/" steps: - uses: actions/checkout@v6 - name: Set up Python 3.10 @@ -98,46 +99,46 @@ jobs: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | python -m build --wheel - twine upload dist/* + twine upload --verbose dist/* - name: Build and publish dapr-ext-workflow env: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | cd ext/dapr-ext-workflow python -m build --wheel - twine upload dist/* + twine upload --verbose dist/* - name: Build and publish Dapr Flask Extension env: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | cd ext/flask_dapr python -m build --wheel - twine upload dist/* + twine upload --verbose dist/* - name: Build and publish dapr-ext-grpc env: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | cd ext/dapr-ext-grpc python -m build --wheel - twine upload dist/* + twine upload --verbose dist/* - name: Build and publish dapr-ext-fastapi env: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | cd ext/dapr-ext-fastapi python -m build --wheel - twine upload dist/* + twine upload --verbose dist/* - name: Build and publish dapr-ext-langgraph env: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | cd ext/dapr-ext-langgraph python -m build --wheel - twine upload dist/* + twine upload --verbose dist/* - name: Build and publish dapr-ext-strands env: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | cd ext/dapr-ext-strands python -m build --wheel - twine upload dist/* + twine upload --verbose dist/* diff --git a/VERSION b/VERSION index 4773ce833..03651c731 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.18.0.dev \ No newline at end of file +1.18.0rc100 \ No newline at end of file diff --git a/dapr/version/__init__.py b/dapr/version/__init__.py index af4518bb5..df9bf09b3 100644 --- a/dapr/version/__init__.py +++ b/dapr/version/__init__.py @@ -1,4 +1,4 @@ from importlib.metadata import version -__version__ = version('dapr') +__version__ = version('dapr-seherv-test') __all__ = ['__version__'] diff --git a/ext/dapr-ext-fastapi/pyproject.toml b/ext/dapr-ext-fastapi/pyproject.toml index 2d272c329..3d3d66d1d 100644 --- a/ext/dapr-ext-fastapi/pyproject.toml +++ b/ext/dapr-ext-fastapi/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "dapr-ext-fastapi" +name = "dapr-ext-fastapi-seherv-test" dynamic = ["version"] description = "Dapr FastAPI Extension for the Dapr Python SDK." readme = "README.rst" @@ -19,7 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.14", ] dependencies = [ - "dapr", + "dapr-seherv-test", "uvicorn>=0.11.6,<1.0.0", "fastapi>=0.60.1,<1.0.0", ] @@ -41,4 +41,4 @@ pattern = '(?P\S+)' only-include = ["dapr/ext/fastapi"] [tool.uv.sources] -dapr = { workspace = true } +dapr-seherv-test = { workspace = true } diff --git a/ext/dapr-ext-grpc/pyproject.toml b/ext/dapr-ext-grpc/pyproject.toml index 393c99476..205a758cc 100644 --- a/ext/dapr-ext-grpc/pyproject.toml +++ b/ext/dapr-ext-grpc/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "dapr-ext-grpc" +name = "dapr-ext-grpc-seherv-test" dynamic = ["version"] description = "Dapr gRPC AppCallback Extension for the Dapr Python SDK." readme = "README.rst" @@ -19,7 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.14", ] dependencies = [ - "dapr", + "dapr-seherv-test", "cloudevents>=1.0.0,<2.0.0", ] @@ -40,4 +40,4 @@ pattern = '(?P\S+)' only-include = ["dapr/ext/grpc"] [tool.uv.sources] -dapr = { workspace = true } +dapr-seherv-test = { workspace = true } diff --git a/ext/dapr-ext-langgraph/README.rst b/ext/dapr-ext-langgraph/README.rst index 85c101a65..dbd75edce 100644 --- a/ext/dapr-ext-langgraph/README.rst +++ b/ext/dapr-ext-langgraph/README.rst @@ -1,5 +1,5 @@ dapr-ext-langgraph extension -======================= +============================ |pypi| diff --git a/ext/dapr-ext-langgraph/pyproject.toml b/ext/dapr-ext-langgraph/pyproject.toml index acb7e0014..f316755b8 100644 --- a/ext/dapr-ext-langgraph/pyproject.toml +++ b/ext/dapr-ext-langgraph/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "dapr-ext-langgraph" +name = "dapr-ext-langgraph-seherv-test" dynamic = ["version"] description = "Dapr LangGraph Checkpointer Extension for the Dapr Python SDK." readme = "README.rst" @@ -19,7 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.14", ] dependencies = [ - "dapr", + "dapr-seherv-test", "langgraph>=0.3.6,<2.0.0", "langchain>=0.1.17,<2.0.0", "python-ulid>=3.0.0,<4.0.0", @@ -43,4 +43,4 @@ pattern = '(?P\S+)' only-include = ["dapr/ext/langgraph"] [tool.uv.sources] -dapr = { workspace = true } +dapr-seherv-test = { workspace = true } diff --git a/ext/dapr-ext-strands/README.rst b/ext/dapr-ext-strands/README.rst index 882ae13b6..d45a1a40c 100644 --- a/ext/dapr-ext-strands/README.rst +++ b/ext/dapr-ext-strands/README.rst @@ -1,5 +1,5 @@ dapr-ext-strands extension -======================= +========================== |pypi| diff --git a/ext/dapr-ext-strands/pyproject.toml b/ext/dapr-ext-strands/pyproject.toml index 1ff0de72b..8393a4fc7 100644 --- a/ext/dapr-ext-strands/pyproject.toml +++ b/ext/dapr-ext-strands/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "dapr-ext-strands" +name = "dapr-ext-strands-seherv-test" dynamic = ["version"] description = "Dapr Strands Agent Sessions Extension for the Dapr Python SDK." readme = "README.rst" @@ -19,7 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.14", ] dependencies = [ - "dapr", + "dapr-seherv-test", "strands-agents>=1.30.0,<2.0.0", "strands-agents-tools>=0.2.22,<1.0.0", "python-ulid>=3.0.0,<4.0.0", @@ -43,4 +43,4 @@ pattern = '(?P\S+)' only-include = ["dapr/ext/strands"] [tool.uv.sources] -dapr = { workspace = true } +dapr-seherv-test = { workspace = true } diff --git a/ext/dapr-ext-workflow/pyproject.toml b/ext/dapr-ext-workflow/pyproject.toml index 93baaf554..fae9da3b7 100644 --- a/ext/dapr-ext-workflow/pyproject.toml +++ b/ext/dapr-ext-workflow/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "dapr-ext-workflow" +name = "dapr-ext-workflow-seherv-test" dynamic = ["version"] description = "Dapr Workflow Authoring Extension for the Dapr Python SDK." readme = "README.rst" @@ -19,7 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.14", ] dependencies = [ - "dapr", + "dapr-seherv-test", ] [project.urls] @@ -39,4 +39,4 @@ pattern = '(?P\S+)' only-include = ["dapr/ext/workflow"] [tool.uv.sources] -dapr = { workspace = true } +dapr-seherv-test = { workspace = true } diff --git a/ext/flask_dapr/README.rst b/ext/flask_dapr/README.rst index 015025eb6..a44d11898 100644 --- a/ext/flask_dapr/README.rst +++ b/ext/flask_dapr/README.rst @@ -20,17 +20,17 @@ Installation PubSub Events ------------- -```python -from flask import Flask, request -from flask_dapr import DaprApp - -app = Flask('myapp') -dapr_app = DaprApp(app) -@dapr_app.subscribe(pubsub='pubsub', topic='some_topic', route='/some_endpoint') -def my_event_handler(): - # request.data contains pubsub event - pass -``` +.. code-block:: python + + from flask import Flask, request + from flask_dapr import DaprApp + + app = Flask('myapp') + dapr_app = DaprApp(app) + @dapr_app.subscribe(pubsub='pubsub', topic='some_topic', route='/some_endpoint') + def my_event_handler(): + # request.data contains pubsub event + pass References ---------- diff --git a/ext/flask_dapr/pyproject.toml b/ext/flask_dapr/pyproject.toml index 66f86806c..bfc6789d1 100644 --- a/ext/flask_dapr/pyproject.toml +++ b/ext/flask_dapr/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "flask-dapr" +name = "flask-dapr-seherv-test" dynamic = ["version"] description = "Dapr Flask Extension for the Dapr Python SDK." readme = "README.rst" @@ -20,7 +20,7 @@ classifiers = [ ] dependencies = [ "Flask>=1.1.4,<4.0.0", - "dapr", + "dapr-seherv-test", ] [project.urls] @@ -40,4 +40,4 @@ pattern = '(?P\S+)' only-include = ["flask_dapr"] [tool.uv.sources] -dapr = { workspace = true } +dapr-seherv-test = { workspace = true } diff --git a/pyproject.toml b/pyproject.toml index c726d1f71..08c926806 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "dapr" +name = "dapr-seherv-test" dynamic = ["version"] description = "The official release of Dapr Python SDK." readme = "README.md" diff --git a/uv.lock b/uv.lock index bc5e9a7d7..db1e44882 100644 --- a/uv.lock +++ b/uv.lock @@ -8,13 +8,13 @@ resolution-markers = [ [manifest] members = [ - "dapr", - "dapr-ext-fastapi", - "dapr-ext-grpc", - "dapr-ext-langgraph", - "dapr-ext-strands", - "dapr-ext-workflow", - "flask-dapr", + "dapr-ext-fastapi-seherv-test", + "dapr-ext-grpc-seherv-test", + "dapr-ext-langgraph-seherv-test", + "dapr-ext-strands-seherv-test", + "dapr-ext-workflow-seherv-test", + "dapr-seherv-test", + "flask-dapr-seherv-test", ] [[package]] @@ -667,7 +667,87 @@ wheels = [ ] [[package]] -name = "dapr" +name = "dapr-ext-fastapi-seherv-test" +source = { editable = "ext/dapr-ext-fastapi" } +dependencies = [ + { name = "dapr-seherv-test" }, + { name = "fastapi" }, + { name = "uvicorn" }, +] + +[package.metadata] +requires-dist = [ + { name = "dapr-seherv-test", editable = "." }, + { name = "fastapi", specifier = ">=0.60.1,<1.0.0" }, + { name = "uvicorn", specifier = ">=0.11.6,<1.0.0" }, +] + +[[package]] +name = "dapr-ext-grpc-seherv-test" +source = { editable = "ext/dapr-ext-grpc" } +dependencies = [ + { name = "cloudevents" }, + { name = "dapr-seherv-test" }, +] + +[package.metadata] +requires-dist = [ + { name = "cloudevents", specifier = ">=1.0.0,<2.0.0" }, + { name = "dapr-seherv-test", editable = "." }, +] + +[[package]] +name = "dapr-ext-langgraph-seherv-test" +source = { editable = "ext/dapr-ext-langgraph" } +dependencies = [ + { name = "dapr-seherv-test" }, + { name = "langchain" }, + { name = "langgraph" }, + { name = "msgpack-python" }, + { name = "python-ulid" }, +] + +[package.metadata] +requires-dist = [ + { name = "dapr-seherv-test", editable = "." }, + { name = "langchain", specifier = ">=0.1.17,<2.0.0" }, + { name = "langgraph", specifier = ">=0.3.6,<2.0.0" }, + { name = "msgpack-python", specifier = ">=0.4.5,<1.0.0" }, + { name = "python-ulid", specifier = ">=3.0.0,<4.0.0" }, +] + +[[package]] +name = "dapr-ext-strands-seherv-test" +source = { editable = "ext/dapr-ext-strands" } +dependencies = [ + { name = "dapr-seherv-test" }, + { name = "msgpack-python" }, + { name = "python-ulid" }, + { name = "strands-agents" }, + { name = "strands-agents-tools" }, +] + +[package.metadata] +requires-dist = [ + { name = "dapr-seherv-test", editable = "." }, + { name = "msgpack-python", specifier = ">=0.4.5,<1.0.0" }, + { name = "python-ulid", specifier = ">=3.0.0,<4.0.0" }, + { name = "strands-agents", specifier = ">=1.30.0,<2.0.0" }, + { name = "strands-agents-tools", specifier = ">=0.2.22,<1.0.0" }, +] + +[[package]] +name = "dapr-ext-workflow-seherv-test" +source = { editable = "ext/dapr-ext-workflow" } +dependencies = [ + { name = "dapr-seherv-test" }, +] + +[package.metadata] +requires-dist = [{ name = "dapr-seherv-test", editable = "." }] + +[[package]] +name = "dapr-seherv-test" source = { editable = "." } dependencies = [ { name = "aiohttp" }, @@ -792,86 +872,6 @@ tests = [ { name = "wheel", specifier = "~=0.46.3" }, ] -[[package]] -name = "dapr-ext-fastapi" -source = { editable = "ext/dapr-ext-fastapi" } -dependencies = [ - { name = "dapr" }, - { name = "fastapi" }, - { name = "uvicorn" }, -] - -[package.metadata] -requires-dist = [ - { name = "dapr", editable = "." }, - { name = "fastapi", specifier = ">=0.60.1,<1.0.0" }, - { name = "uvicorn", specifier = ">=0.11.6,<1.0.0" }, -] - -[[package]] -name = "dapr-ext-grpc" -source = { editable = "ext/dapr-ext-grpc" } -dependencies = [ - { name = "cloudevents" }, - { name = "dapr" }, -] - -[package.metadata] -requires-dist = [ - { name = "cloudevents", specifier = ">=1.0.0,<2.0.0" }, - { name = "dapr", editable = "." }, -] - -[[package]] -name = "dapr-ext-langgraph" -source = { editable = "ext/dapr-ext-langgraph" } -dependencies = [ - { name = "dapr" }, - { name = "langchain" }, - { name = "langgraph" }, - { name = "msgpack-python" }, - { name = "python-ulid" }, -] - -[package.metadata] -requires-dist = [ - { name = "dapr", editable = "." }, - { name = "langchain", specifier = ">=0.1.17,<2.0.0" }, - { name = "langgraph", specifier = ">=0.3.6,<2.0.0" }, - { name = "msgpack-python", specifier = ">=0.4.5,<1.0.0" }, - { name = "python-ulid", specifier = ">=3.0.0,<4.0.0" }, -] - -[[package]] -name = "dapr-ext-strands" -source = { editable = "ext/dapr-ext-strands" } -dependencies = [ - { name = "dapr" }, - { name = "msgpack-python" }, - { name = "python-ulid" }, - { name = "strands-agents" }, - { name = "strands-agents-tools" }, -] - -[package.metadata] -requires-dist = [ - { name = "dapr", editable = "." }, - { name = "msgpack-python", specifier = ">=0.4.5,<1.0.0" }, - { name = "python-ulid", specifier = ">=3.0.0,<4.0.0" }, - { name = "strands-agents", specifier = ">=1.30.0,<2.0.0" }, - { name = "strands-agents-tools", specifier = ">=0.2.22,<1.0.0" }, -] - -[[package]] -name = "dapr-ext-workflow" -source = { editable = "ext/dapr-ext-workflow" } -dependencies = [ - { name = "dapr" }, -] - -[package.metadata] -requires-dist = [{ name = "dapr", editable = "." }] - [[package]] name = "deprecation" version = "2.1.0" @@ -948,16 +948,16 @@ wheels = [ ] [[package]] -name = "flask-dapr" +name = "flask-dapr-seherv-test" source = { editable = "ext/flask_dapr" } dependencies = [ - { name = "dapr" }, + { name = "dapr-seherv-test" }, { name = "flask" }, ] [package.metadata] requires-dist = [ - { name = "dapr", editable = "." }, + { name = "dapr-seherv-test", editable = "." }, { name = "flask", specifier = ">=1.1.4,<4.0.0" }, ] From 400634eac3025e33e8e993ff231f5015180b8d97 Mon Sep 17 00:00:00 2001 From: Sergio Herrera <627709+seherv@users.noreply.github.com> Date: Fri, 8 May 2026 14:16:00 +0200 Subject: [PATCH 07/10] Revert "Test setup with TestPyPI" This reverts commit 34dc7b222f9a3c2b931156cdc6f9dff89c1e5d6a. Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com> --- .github/workflows/build-tag.yaml | 15 +-- VERSION | 2 +- dapr/version/__init__.py | 2 +- ext/dapr-ext-fastapi/pyproject.toml | 6 +- ext/dapr-ext-grpc/pyproject.toml | 6 +- ext/dapr-ext-langgraph/README.rst | 2 +- ext/dapr-ext-langgraph/pyproject.toml | 6 +- ext/dapr-ext-strands/README.rst | 2 +- ext/dapr-ext-strands/pyproject.toml | 6 +- ext/dapr-ext-workflow/pyproject.toml | 6 +- ext/flask_dapr/README.rst | 22 ++-- ext/flask_dapr/pyproject.toml | 6 +- pyproject.toml | 2 +- uv.lock | 182 +++++++++++++------------- 14 files changed, 132 insertions(+), 133 deletions(-) diff --git a/.github/workflows/build-tag.yaml b/.github/workflows/build-tag.yaml index 5abbf956b..a3a3ef868 100644 --- a/.github/workflows/build-tag.yaml +++ b/.github/workflows/build-tag.yaml @@ -83,7 +83,6 @@ jobs: runs-on: ubuntu-latest env: TWINE_USERNAME: "__token__" - TWINE_REPOSITORY_URL: "https://test.pypi.org/legacy/" steps: - uses: actions/checkout@v6 - name: Set up Python 3.10 @@ -99,46 +98,46 @@ jobs: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | python -m build --wheel - twine upload --verbose dist/* + twine upload dist/* - name: Build and publish dapr-ext-workflow env: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | cd ext/dapr-ext-workflow python -m build --wheel - twine upload --verbose dist/* + twine upload dist/* - name: Build and publish Dapr Flask Extension env: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | cd ext/flask_dapr python -m build --wheel - twine upload --verbose dist/* + twine upload dist/* - name: Build and publish dapr-ext-grpc env: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | cd ext/dapr-ext-grpc python -m build --wheel - twine upload --verbose dist/* + twine upload dist/* - name: Build and publish dapr-ext-fastapi env: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | cd ext/dapr-ext-fastapi python -m build --wheel - twine upload --verbose dist/* + twine upload dist/* - name: Build and publish dapr-ext-langgraph env: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | cd ext/dapr-ext-langgraph python -m build --wheel - twine upload --verbose dist/* + twine upload dist/* - name: Build and publish dapr-ext-strands env: TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }} run: | cd ext/dapr-ext-strands python -m build --wheel - twine upload --verbose dist/* + twine upload dist/* diff --git a/VERSION b/VERSION index 03651c731..4773ce833 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.18.0rc100 \ No newline at end of file +1.18.0.dev \ No newline at end of file diff --git a/dapr/version/__init__.py b/dapr/version/__init__.py index df9bf09b3..af4518bb5 100644 --- a/dapr/version/__init__.py +++ b/dapr/version/__init__.py @@ -1,4 +1,4 @@ from importlib.metadata import version -__version__ = version('dapr-seherv-test') +__version__ = version('dapr') __all__ = ['__version__'] diff --git a/ext/dapr-ext-fastapi/pyproject.toml b/ext/dapr-ext-fastapi/pyproject.toml index 3d3d66d1d..2d272c329 100644 --- a/ext/dapr-ext-fastapi/pyproject.toml +++ b/ext/dapr-ext-fastapi/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "dapr-ext-fastapi-seherv-test" +name = "dapr-ext-fastapi" dynamic = ["version"] description = "Dapr FastAPI Extension for the Dapr Python SDK." readme = "README.rst" @@ -19,7 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.14", ] dependencies = [ - "dapr-seherv-test", + "dapr", "uvicorn>=0.11.6,<1.0.0", "fastapi>=0.60.1,<1.0.0", ] @@ -41,4 +41,4 @@ pattern = '(?P\S+)' only-include = ["dapr/ext/fastapi"] [tool.uv.sources] -dapr-seherv-test = { workspace = true } +dapr = { workspace = true } diff --git a/ext/dapr-ext-grpc/pyproject.toml b/ext/dapr-ext-grpc/pyproject.toml index 205a758cc..393c99476 100644 --- a/ext/dapr-ext-grpc/pyproject.toml +++ b/ext/dapr-ext-grpc/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "dapr-ext-grpc-seherv-test" +name = "dapr-ext-grpc" dynamic = ["version"] description = "Dapr gRPC AppCallback Extension for the Dapr Python SDK." readme = "README.rst" @@ -19,7 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.14", ] dependencies = [ - "dapr-seherv-test", + "dapr", "cloudevents>=1.0.0,<2.0.0", ] @@ -40,4 +40,4 @@ pattern = '(?P\S+)' only-include = ["dapr/ext/grpc"] [tool.uv.sources] -dapr-seherv-test = { workspace = true } +dapr = { workspace = true } diff --git a/ext/dapr-ext-langgraph/README.rst b/ext/dapr-ext-langgraph/README.rst index dbd75edce..85c101a65 100644 --- a/ext/dapr-ext-langgraph/README.rst +++ b/ext/dapr-ext-langgraph/README.rst @@ -1,5 +1,5 @@ dapr-ext-langgraph extension -============================ +======================= |pypi| diff --git a/ext/dapr-ext-langgraph/pyproject.toml b/ext/dapr-ext-langgraph/pyproject.toml index f316755b8..acb7e0014 100644 --- a/ext/dapr-ext-langgraph/pyproject.toml +++ b/ext/dapr-ext-langgraph/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "dapr-ext-langgraph-seherv-test" +name = "dapr-ext-langgraph" dynamic = ["version"] description = "Dapr LangGraph Checkpointer Extension for the Dapr Python SDK." readme = "README.rst" @@ -19,7 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.14", ] dependencies = [ - "dapr-seherv-test", + "dapr", "langgraph>=0.3.6,<2.0.0", "langchain>=0.1.17,<2.0.0", "python-ulid>=3.0.0,<4.0.0", @@ -43,4 +43,4 @@ pattern = '(?P\S+)' only-include = ["dapr/ext/langgraph"] [tool.uv.sources] -dapr-seherv-test = { workspace = true } +dapr = { workspace = true } diff --git a/ext/dapr-ext-strands/README.rst b/ext/dapr-ext-strands/README.rst index d45a1a40c..882ae13b6 100644 --- a/ext/dapr-ext-strands/README.rst +++ b/ext/dapr-ext-strands/README.rst @@ -1,5 +1,5 @@ dapr-ext-strands extension -========================== +======================= |pypi| diff --git a/ext/dapr-ext-strands/pyproject.toml b/ext/dapr-ext-strands/pyproject.toml index 8393a4fc7..1ff0de72b 100644 --- a/ext/dapr-ext-strands/pyproject.toml +++ b/ext/dapr-ext-strands/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "dapr-ext-strands-seherv-test" +name = "dapr-ext-strands" dynamic = ["version"] description = "Dapr Strands Agent Sessions Extension for the Dapr Python SDK." readme = "README.rst" @@ -19,7 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.14", ] dependencies = [ - "dapr-seherv-test", + "dapr", "strands-agents>=1.30.0,<2.0.0", "strands-agents-tools>=0.2.22,<1.0.0", "python-ulid>=3.0.0,<4.0.0", @@ -43,4 +43,4 @@ pattern = '(?P\S+)' only-include = ["dapr/ext/strands"] [tool.uv.sources] -dapr-seherv-test = { workspace = true } +dapr = { workspace = true } diff --git a/ext/dapr-ext-workflow/pyproject.toml b/ext/dapr-ext-workflow/pyproject.toml index fae9da3b7..93baaf554 100644 --- a/ext/dapr-ext-workflow/pyproject.toml +++ b/ext/dapr-ext-workflow/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "dapr-ext-workflow-seherv-test" +name = "dapr-ext-workflow" dynamic = ["version"] description = "Dapr Workflow Authoring Extension for the Dapr Python SDK." readme = "README.rst" @@ -19,7 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.14", ] dependencies = [ - "dapr-seherv-test", + "dapr", ] [project.urls] @@ -39,4 +39,4 @@ pattern = '(?P\S+)' only-include = ["dapr/ext/workflow"] [tool.uv.sources] -dapr-seherv-test = { workspace = true } +dapr = { workspace = true } diff --git a/ext/flask_dapr/README.rst b/ext/flask_dapr/README.rst index a44d11898..015025eb6 100644 --- a/ext/flask_dapr/README.rst +++ b/ext/flask_dapr/README.rst @@ -20,17 +20,17 @@ Installation PubSub Events ------------- -.. code-block:: python - - from flask import Flask, request - from flask_dapr import DaprApp - - app = Flask('myapp') - dapr_app = DaprApp(app) - @dapr_app.subscribe(pubsub='pubsub', topic='some_topic', route='/some_endpoint') - def my_event_handler(): - # request.data contains pubsub event - pass +```python +from flask import Flask, request +from flask_dapr import DaprApp + +app = Flask('myapp') +dapr_app = DaprApp(app) +@dapr_app.subscribe(pubsub='pubsub', topic='some_topic', route='/some_endpoint') +def my_event_handler(): + # request.data contains pubsub event + pass +``` References ---------- diff --git a/ext/flask_dapr/pyproject.toml b/ext/flask_dapr/pyproject.toml index bfc6789d1..66f86806c 100644 --- a/ext/flask_dapr/pyproject.toml +++ b/ext/flask_dapr/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "flask-dapr-seherv-test" +name = "flask-dapr" dynamic = ["version"] description = "Dapr Flask Extension for the Dapr Python SDK." readme = "README.rst" @@ -20,7 +20,7 @@ classifiers = [ ] dependencies = [ "Flask>=1.1.4,<4.0.0", - "dapr-seherv-test", + "dapr", ] [project.urls] @@ -40,4 +40,4 @@ pattern = '(?P\S+)' only-include = ["flask_dapr"] [tool.uv.sources] -dapr-seherv-test = { workspace = true } +dapr = { workspace = true } diff --git a/pyproject.toml b/pyproject.toml index 08c926806..c726d1f71 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "dapr-seherv-test" +name = "dapr" dynamic = ["version"] description = "The official release of Dapr Python SDK." readme = "README.md" diff --git a/uv.lock b/uv.lock index db1e44882..bc5e9a7d7 100644 --- a/uv.lock +++ b/uv.lock @@ -8,13 +8,13 @@ resolution-markers = [ [manifest] members = [ - "dapr-ext-fastapi-seherv-test", - "dapr-ext-grpc-seherv-test", - "dapr-ext-langgraph-seherv-test", - "dapr-ext-strands-seherv-test", - "dapr-ext-workflow-seherv-test", - "dapr-seherv-test", - "flask-dapr-seherv-test", + "dapr", + "dapr-ext-fastapi", + "dapr-ext-grpc", + "dapr-ext-langgraph", + "dapr-ext-strands", + "dapr-ext-workflow", + "flask-dapr", ] [[package]] @@ -667,87 +667,7 @@ wheels = [ ] [[package]] -name = "dapr-ext-fastapi-seherv-test" -source = { editable = "ext/dapr-ext-fastapi" } -dependencies = [ - { name = "dapr-seherv-test" }, - { name = "fastapi" }, - { name = "uvicorn" }, -] - -[package.metadata] -requires-dist = [ - { name = "dapr-seherv-test", editable = "." }, - { name = "fastapi", specifier = ">=0.60.1,<1.0.0" }, - { name = "uvicorn", specifier = ">=0.11.6,<1.0.0" }, -] - -[[package]] -name = "dapr-ext-grpc-seherv-test" -source = { editable = "ext/dapr-ext-grpc" } -dependencies = [ - { name = "cloudevents" }, - { name = "dapr-seherv-test" }, -] - -[package.metadata] -requires-dist = [ - { name = "cloudevents", specifier = ">=1.0.0,<2.0.0" }, - { name = "dapr-seherv-test", editable = "." }, -] - -[[package]] -name = "dapr-ext-langgraph-seherv-test" -source = { editable = "ext/dapr-ext-langgraph" } -dependencies = [ - { name = "dapr-seherv-test" }, - { name = "langchain" }, - { name = "langgraph" }, - { name = "msgpack-python" }, - { name = "python-ulid" }, -] - -[package.metadata] -requires-dist = [ - { name = "dapr-seherv-test", editable = "." }, - { name = "langchain", specifier = ">=0.1.17,<2.0.0" }, - { name = "langgraph", specifier = ">=0.3.6,<2.0.0" }, - { name = "msgpack-python", specifier = ">=0.4.5,<1.0.0" }, - { name = "python-ulid", specifier = ">=3.0.0,<4.0.0" }, -] - -[[package]] -name = "dapr-ext-strands-seherv-test" -source = { editable = "ext/dapr-ext-strands" } -dependencies = [ - { name = "dapr-seherv-test" }, - { name = "msgpack-python" }, - { name = "python-ulid" }, - { name = "strands-agents" }, - { name = "strands-agents-tools" }, -] - -[package.metadata] -requires-dist = [ - { name = "dapr-seherv-test", editable = "." }, - { name = "msgpack-python", specifier = ">=0.4.5,<1.0.0" }, - { name = "python-ulid", specifier = ">=3.0.0,<4.0.0" }, - { name = "strands-agents", specifier = ">=1.30.0,<2.0.0" }, - { name = "strands-agents-tools", specifier = ">=0.2.22,<1.0.0" }, -] - -[[package]] -name = "dapr-ext-workflow-seherv-test" -source = { editable = "ext/dapr-ext-workflow" } -dependencies = [ - { name = "dapr-seherv-test" }, -] - -[package.metadata] -requires-dist = [{ name = "dapr-seherv-test", editable = "." }] - -[[package]] -name = "dapr-seherv-test" +name = "dapr" source = { editable = "." } dependencies = [ { name = "aiohttp" }, @@ -872,6 +792,86 @@ tests = [ { name = "wheel", specifier = "~=0.46.3" }, ] +[[package]] +name = "dapr-ext-fastapi" +source = { editable = "ext/dapr-ext-fastapi" } +dependencies = [ + { name = "dapr" }, + { name = "fastapi" }, + { name = "uvicorn" }, +] + +[package.metadata] +requires-dist = [ + { name = "dapr", editable = "." }, + { name = "fastapi", specifier = ">=0.60.1,<1.0.0" }, + { name = "uvicorn", specifier = ">=0.11.6,<1.0.0" }, +] + +[[package]] +name = "dapr-ext-grpc" +source = { editable = "ext/dapr-ext-grpc" } +dependencies = [ + { name = "cloudevents" }, + { name = "dapr" }, +] + +[package.metadata] +requires-dist = [ + { name = "cloudevents", specifier = ">=1.0.0,<2.0.0" }, + { name = "dapr", editable = "." }, +] + +[[package]] +name = "dapr-ext-langgraph" +source = { editable = "ext/dapr-ext-langgraph" } +dependencies = [ + { name = "dapr" }, + { name = "langchain" }, + { name = "langgraph" }, + { name = "msgpack-python" }, + { name = "python-ulid" }, +] + +[package.metadata] +requires-dist = [ + { name = "dapr", editable = "." }, + { name = "langchain", specifier = ">=0.1.17,<2.0.0" }, + { name = "langgraph", specifier = ">=0.3.6,<2.0.0" }, + { name = "msgpack-python", specifier = ">=0.4.5,<1.0.0" }, + { name = "python-ulid", specifier = ">=3.0.0,<4.0.0" }, +] + +[[package]] +name = "dapr-ext-strands" +source = { editable = "ext/dapr-ext-strands" } +dependencies = [ + { name = "dapr" }, + { name = "msgpack-python" }, + { name = "python-ulid" }, + { name = "strands-agents" }, + { name = "strands-agents-tools" }, +] + +[package.metadata] +requires-dist = [ + { name = "dapr", editable = "." }, + { name = "msgpack-python", specifier = ">=0.4.5,<1.0.0" }, + { name = "python-ulid", specifier = ">=3.0.0,<4.0.0" }, + { name = "strands-agents", specifier = ">=1.30.0,<2.0.0" }, + { name = "strands-agents-tools", specifier = ">=0.2.22,<1.0.0" }, +] + +[[package]] +name = "dapr-ext-workflow" +source = { editable = "ext/dapr-ext-workflow" } +dependencies = [ + { name = "dapr" }, +] + +[package.metadata] +requires-dist = [{ name = "dapr", editable = "." }] + [[package]] name = "deprecation" version = "2.1.0" @@ -948,16 +948,16 @@ wheels = [ ] [[package]] -name = "flask-dapr-seherv-test" +name = "flask-dapr" source = { editable = "ext/flask_dapr" } dependencies = [ - { name = "dapr-seherv-test" }, + { name = "dapr" }, { name = "flask" }, ] [package.metadata] requires-dist = [ - { name = "dapr-seherv-test", editable = "." }, + { name = "dapr", editable = "." }, { name = "flask", specifier = ">=1.1.4,<4.0.0" }, ] From a1567d5812189b9a8be35e3fba7567f778f09687 Mon Sep 17 00:00:00 2001 From: Sergio Herrera <627709+seherv@users.noreply.github.com> Date: Fri, 8 May 2026 14:18:43 +0200 Subject: [PATCH 08/10] Fix RST rendering in extension READMEs PyPI's strict description renderer rejected the previous markup, blocking publish. Caught by a TestPyPI dry-run. - dapr-ext-langgraph, dapr-ext-strands: title underline length matches title - flask_dapr: replace markdown code fence with .. code-block:: python Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com> --- ext/dapr-ext-langgraph/README.rst | 2 +- ext/dapr-ext-strands/README.rst | 2 +- ext/flask_dapr/README.rst | 22 +++++++++++----------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ext/dapr-ext-langgraph/README.rst b/ext/dapr-ext-langgraph/README.rst index 85c101a65..dbd75edce 100644 --- a/ext/dapr-ext-langgraph/README.rst +++ b/ext/dapr-ext-langgraph/README.rst @@ -1,5 +1,5 @@ dapr-ext-langgraph extension -======================= +============================ |pypi| diff --git a/ext/dapr-ext-strands/README.rst b/ext/dapr-ext-strands/README.rst index 882ae13b6..d45a1a40c 100644 --- a/ext/dapr-ext-strands/README.rst +++ b/ext/dapr-ext-strands/README.rst @@ -1,5 +1,5 @@ dapr-ext-strands extension -======================= +========================== |pypi| diff --git a/ext/flask_dapr/README.rst b/ext/flask_dapr/README.rst index 015025eb6..a44d11898 100644 --- a/ext/flask_dapr/README.rst +++ b/ext/flask_dapr/README.rst @@ -20,17 +20,17 @@ Installation PubSub Events ------------- -```python -from flask import Flask, request -from flask_dapr import DaprApp - -app = Flask('myapp') -dapr_app = DaprApp(app) -@dapr_app.subscribe(pubsub='pubsub', topic='some_topic', route='/some_endpoint') -def my_event_handler(): - # request.data contains pubsub event - pass -``` +.. code-block:: python + + from flask import Flask, request + from flask_dapr import DaprApp + + app = Flask('myapp') + dapr_app = DaprApp(app) + @dapr_app.subscribe(pubsub='pubsub', topic='some_topic', route='/some_endpoint') + def my_event_handler(): + # request.data contains pubsub event + pass References ---------- From 9bf6c2b7b7b0ea28d7e51b249e6955b400f2235a Mon Sep 17 00:00:00 2001 From: Sergio Herrera <627709+seherv@users.noreply.github.com> Date: Fri, 8 May 2026 14:24:58 +0200 Subject: [PATCH 09/10] Fix .dev check on main Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com> --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 808c94da2..984597d03 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -42,8 +42,8 @@ jobs: run: | uv run python -c " from dapr.version import __version__ - assert __version__.endswith('.dev'), ( - f'main __version__ must end in .dev (got {__version__!r}); see RELEASE.md' + assert '.dev' in __version__, ( + f'main __version__ must contain .dev (got {__version__!r}); see RELEASE.md' ) " From b68c1268c36169815ece6f40ca8393ffe7462c12 Mon Sep 17 00:00:00 2001 From: Sergio Herrera <627709+seherv@users.noreply.github.com> Date: Fri, 8 May 2026 17:35:53 +0200 Subject: [PATCH 10/10] Address PR feedback (1) Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com> --- .github/workflows/build-tag.yaml | 23 +++++++++-------------- .github/workflows/build.yaml | 7 ++++--- dapr/version/__init__.py | 11 +++++++++-- 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build-tag.yaml b/.github/workflows/build-tag.yaml index a3a3ef868..31bbc69ba 100644 --- a/.github/workflows/build-tag.yaml +++ b/.github/workflows/build-tag.yaml @@ -19,25 +19,20 @@ jobs: uses: astral-sh/setup-uv@v7 - name: Install dependencies run: uv sync --frozen --all-packages --group dev - - name: Verify version.py matches tag + - name: Verify tag matches a stable VERSION if: startsWith(github.ref, 'refs/tags/v') run: | uv run python -c " import os - from dapr.version import __version__ - tag_version = os.environ['GITHUB_REF'].removeprefix('refs/tags/v') - assert tag_version == __version__, ( - f'Tag {os.environ[\"GITHUB_REF\"]!r} expects __version__={tag_version!r}, ' - f'got {__version__!r}. Bump version files before tagging, see RELEASE.md' + from importlib.metadata import version + tag = os.environ['GITHUB_REF'].removeprefix('refs/tags/v') + package_version = version('dapr') + assert tag == package_version, ( + f'Tag {os.environ[\"GITHUB_REF\"]!r} expects version={tag!r}, got {package_version!r}. ' + 'Bump VERSION before tagging, see RELEASE.md' ) - " - - name: Verify release version is not a .dev - if: startsWith(github.ref, 'refs/tags/v') - run: | - uv run python -c " - from dapr.version import __version__ - assert '.dev' not in __version__, ( - f'__version__ {__version__!r} contains ".dev". Release tags must point to a stable or rc version' + assert '.dev' not in package_version, ( + f'Version {package_version!r} contains .dev. Release tags must point to a stable or rc version' ) " - name: Run Autoformatter diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 984597d03..8b394a75d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -41,9 +41,10 @@ jobs: if: github.ref == 'refs/heads/main' || github.base_ref == 'main' run: | uv run python -c " - from dapr.version import __version__ - assert '.dev' in __version__, ( - f'main __version__ must contain .dev (got {__version__!r}); see RELEASE.md' + from importlib.metadata import version + package_version = version('dapr') + assert '.dev' in package_version, ( + f'main version must contain .dev (got {package_version!r}); see RELEASE.md' ) " diff --git a/dapr/version/__init__.py b/dapr/version/__init__.py index af4518bb5..8293226b9 100644 --- a/dapr/version/__init__.py +++ b/dapr/version/__init__.py @@ -1,4 +1,11 @@ -from importlib.metadata import version +from importlib.metadata import PackageNotFoundError, version + +try: + __version__ = version('dapr') +except PackageNotFoundError as e: + raise RuntimeError( + "dapr package metadata not found. Run 'uv sync --all-packages' or " + "'pip install -e .' from the repo root before importing dapr." + ) from e -__version__ = version('dapr') __all__ = ['__version__']