Skip to content

Remove development builds and centralize versions into single file#1020

Open
seherv wants to merge 10 commits into
dapr:mainfrom
seherv:remove-dev-packages
Open

Remove development builds and centralize versions into single file#1020
seherv wants to merge 10 commits into
dapr:mainfrom
seherv:remove-dev-packages

Conversation

@seherv
Copy link
Copy Markdown
Contributor

@seherv seherv commented May 7, 2026

Description

Removes the setup.py files that created separate -dev builds for all packages, and updates docs to instruct users to install directly from source if they need the latest changes in main.

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #961

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

@sicoyle
Copy link
Copy Markdown
Contributor

sicoyle commented May 7, 2026

pls resolve the conflicts @seherv

@seherv seherv force-pushed the remove-dev-packages branch from a9aa525 to 0d90170 Compare May 7, 2026 14:08
@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.52%. Comparing base (bffb749) to head (b68c126).
⚠️ Report is 125 commits behind head on main.

Files with missing lines Patch % Lines
dapr/version/__init__.py 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1020      +/-   ##
==========================================
- Coverage   86.63%   81.52%   -5.12%     
==========================================
  Files          84      137      +53     
  Lines        4473    13485    +9012     
==========================================
+ Hits         3875    10993    +7118     
- Misses        598     2492    +1894     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@seherv seherv force-pushed the remove-dev-packages branch 6 times, most recently from b94062b to 34dc7b2 Compare May 8, 2026 12:00
seherv added 8 commits May 8, 2026 14:21
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
This reverts commit 34dc7b2.

Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
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>
@seherv seherv force-pushed the remove-dev-packages branch from 3e0df2b to a1567d5 Compare May 8, 2026 12:22
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
@seherv seherv marked this pull request as ready for review May 8, 2026 13:15
@seherv seherv requested review from a team as code owners May 8, 2026 13:15
@CasperGN CasperGN requested a review from Copilot May 8, 2026 13:54
Comment thread .github/workflows/build-tag.yaml Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes the repo’s custom *-dev package publishing mechanism (and the setup.py glue that implemented it), switching to a single root VERSION file + hatchling dynamic versions, and updates docs/workflows so development installs happen directly from git instead of via separate PyPI package names.

Changes:

  • Remove per-package setup.py logic that rewrote names/versions into *-dev builds, and stop publishing anything on main.
  • Introduce a single root VERSION file and update pyproject.toml/extension pyproject.toml files to read versions from it via hatchling.
  • Update docs and CI checks to align with the new versioning/release process (including tag/version validation and main requiring a .dev version).

Reviewed changes

Copilot reviewed 33 out of 33 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
VERSION Adds root source-of-truth version string for all packages.
setup.py Removes legacy setuptools build-time renaming for dapr-dev.
RELEASE.md Updates release process docs for tag-only publishing + single VERSION workflow.
README.md Updates install docs to use git-based installs for in-development versions.
pyproject.toml Switches build backend to hatchling and reads version from VERSION; updates mypy config.
ext/flask_dapr/setup.py Removes legacy setuptools build-time renaming for flask-dapr-dev.
ext/flask_dapr/README.rst Fixes README formatting to proper RST code block.
ext/flask_dapr/pyproject.toml Switches to hatchling and reads version from root VERSION.
ext/flask_dapr/flask_dapr/version.py Removes per-package hardcoded version constant.
ext/dapr-ext-workflow/setup.py Removes legacy setuptools build-time renaming for dapr-ext-workflow-dev.
ext/dapr-ext-workflow/pyproject.toml Switches to hatchling and reads version from root VERSION.
ext/dapr-ext-workflow/dapr/ext/workflow/version.py Removes per-package hardcoded version constant.
ext/dapr-ext-strands/setup.py Removes legacy setuptools build-time renaming for dapr-ext-strands-dev.
ext/dapr-ext-strands/README.rst Fixes RST header underline length.
ext/dapr-ext-strands/pyproject.toml Switches to hatchling and reads version from root VERSION.
ext/dapr-ext-strands/dapr/ext/strands/version.py Removes per-package hardcoded version constant.
ext/dapr-ext-langgraph/setup.py Removes legacy setuptools build-time renaming for dapr-ext-langgraph-dev.
ext/dapr-ext-langgraph/README.rst Fixes RST header underline length.
ext/dapr-ext-langgraph/pyproject.toml Switches to hatchling and reads version from root VERSION.
ext/dapr-ext-langgraph/dapr/ext/langgraph/version.py Removes per-package hardcoded version constant.
ext/dapr-ext-grpc/setup.py Removes legacy setuptools build-time renaming for dapr-ext-grpc-dev.
ext/dapr-ext-grpc/pyproject.toml Switches to hatchling and reads version from root VERSION.
ext/dapr-ext-grpc/dapr/ext/grpc/version.py Removes per-package hardcoded version constant.
ext/dapr-ext-fastapi/setup.py Removes legacy setuptools build-time renaming for dapr-ext-fastapi-dev.
ext/dapr-ext-fastapi/pyproject.toml Switches to hatchling and reads version from root VERSION.
ext/dapr-ext-fastapi/dapr/ext/fastapi/version.py Removes per-package hardcoded version constant.
dapr/version/version.py Removes old version constant module previously used by setup.py.
dapr/version/init.py Derives __version__ from installed package metadata.
dapr/clients/grpc/subscription.py Adds mypy suppressions for stream iterator typing.
dapr/clients/exceptions.py Adds mypy suppression for grpc-status typing.
.github/workflows/build.yaml Ensures CI runs on main pushes and asserts main stays on a .dev version.
.github/workflows/build-tag.yaml Adds tag/version assertions and publishes wheels on tags.
.github/workflows/build-push-to-main.yaml Removes workflow that previously published dev snapshots on main.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread dapr/version/__init__.py Outdated
Comment thread .github/workflows/build-tag.yaml Outdated
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
@seherv seherv changed the title Remove development builds Remove development builds and centralize versions into single file May 8, 2026
Copy link
Copy Markdown
Contributor

@sicoyle sicoyle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few comments - overall LGTM - thank you!!

Comment on lines +32 to +41
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<version>\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"]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you share on the benefits of using hatchling instead here pls?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setuptools can't load the version number dynamically from a text file, and honestly I want to get rid of setuptools ASAP because it clashes a lot with modern pyproject.toml conventions.

Hatchling does have support for dynamic versioning and it's relatively well-known

[tool.setuptools.dynamic]
version = {attr = "flask_dapr.version.__version__"}
[tool.hatch.build.targets.wheel]
only-include = ["flask_dapr"]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this one missing the dapr/ext prefix that the others include?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package structure is a bit different, all the other exts are organized as dapr/ext/package/ but flask_dapr was the only one organized as just that, flask_dapr/ as the top level package. The package in PyPI was also called that.

Ideally we'll remove these PyPI packages entirely when we bundle the extensions as PEP 771 extras to the SDK 😄

Comment thread ext/flask_dapr/README.rst
Comment on lines +23 to +33
.. 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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why? is this format the one that should be used for rst files?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a test reupload of all the packages to my TestPyPI repo and it rejected them because the READMEs were not parsable by the rst library in strict mode 😓

Doing this fixed it, and I don't know how it worked before, but rewriting everything in Markdown to avoid this in the future is an option too

Comment thread pyproject.toml
Comment on lines +122 to +123
"dapr",
"flask_dapr",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this missing any?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hatchling is smarter than setuptools and is able to see all dapr/ext/packages as part of the dapr namespace, so they get auto included in the build. This one is the exception and we have to include it explicitly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: remove -dev packages

4 participants