Merge extensions into core package as PEP 771 extras#1054
Draft
seherv wants to merge 3 commits into
Draft
Conversation
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1054 +/- ##
==========================================
- Coverage 86.63% 81.70% -4.93%
==========================================
Files 84 116 +32
Lines 4473 9276 +4803
==========================================
+ Hits 3875 7579 +3704
- Misses 598 1697 +1099 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 121 out of 201 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (2)
pyproject.toml:1
- The dependency was renamed from
msgpack-python(legacy, last release 0.5.6, capped at<1.0.0in the deletedext/*/pyproject.toml) tomsgpackwith>=1.0,<2.0. These are distinct PyPI projects with different APIs —msgpack1.x removedencoding=/use_bin_typedefaults and changedUnpacker/packbkeyword arguments. Confirm thatdapr/ext/langgraph/dapr_checkpointer.pyanddapr/ext/strands/dapr_session_manager.pyactually use themsgpack(1.x) API and not themsgpack-python(0.x) API; otherwise serialization of existing checkpoints/sessions in production state stores will break silently on upgrade.
flask_dapr/init.py:1 - Importing
actorandappas names fromdapr.ext.flaskonly works if those submodules have already been bound as attributes of the parent package.dapr/ext/flask/__init__.pydoesfrom .actor import DaprActor/from .app import DaprApp, which sets the attributes as a side effect — but only when those imports succeed. If the optionalflaskdependency is missing,dapr.ext.flask.__init__raises a newImportErrorbefore bindingactor/app, and this line will then raiseImportError: cannot import name 'actor' from 'dapr.ext.flask', masking the intendedFutureWarning-then-helpful-error path. Consider importing the submodules explicitly (from dapr.ext.flask import actor, appon its own line, orimport dapr.ext.flask.actor as actor) and/or wrapping in a try/except that surfaces the original cause.
Comment on lines
+116
to
+118
| init_file = dapr_root / bundled_path_prefix[len('dapr/') :] / '__init__.py' | ||
| else: | ||
| init_file = site_root / bundled_path_prefix / '__init__.py' |
Comment on lines
+96
to
+99
| # --skip-existing makes the step retry-safe: if a previous attempt | ||
| # partially succeeded and the workflow is re-run, twine treats an | ||
| # already-uploaded file as success instead of failing the step. | ||
| twine upload --skip-existing dist/* |
| ├── dapr-ext-langgraph/ # LangGraph checkpointer ← see ext/dapr-ext-langgraph/AGENTS.md | ||
| ├── dapr-ext-strands/ # Strands agent sessions ← see ext/dapr-ext-strands/AGENTS.md | ||
| └── flask_dapr/ # Flask integration ← see ext/flask_dapr/AGENTS.md | ||
| flask_dapr/ # Deprecation shim: re-exports dapr.ext.flask with FutureWarning |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Moves all the
dapr-ext*packages into the maindaprpackage, and exposes them as extras.pip install dapr-ext-pkgnameis nowpip install "dapr[pkgname]".IMPORTANT: this is a breaking change, unlike the
dapr*-devremoval. All the old extension packages must be uninstalled manually before re-installing dapr. More info indapr/__init__.py,README.mdandRELEASE.md.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: #1026
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: