Make Granian the default backend and Uvicorn/Gunicorn explicit opt-in
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- python
- Domain
- backend, documentation, release, testing
Research direction
Locate the backend-selection logic, the REFLEX_USE_GRANIAN default and documentation, and the Uvicorn fallback warning. Read the existing backend tests first, then add coverage for each selection-matrix row, update user-facing documentation and the news fragment, and confirm whether the change belongs in 0.9.x or 0.10.0.
Written by the indexing model from the issue text.
Description
Context
Reflex was intended to default to Granian in 0.9, but the current automatic selection still chooses the Uvicorn/Gunicorn backend when both packages are importable and REFLEX_USE_GRANIAN is unset. This is especially visible in upgraded environments that retain the old backend dependencies.
PR #6758 only updates the resulting warning. The underlying selection behavior should be fixed instead.
Proposed behavior
- Default
REFLEX_USE_GRANIANtoTrue. - Use Granian when
REFLEX_USE_GRANIANis unset or true, regardless of whether Uvicorn/Gunicorn happen to be installed. - Use the Uvicorn/Gunicorn backend only when
REFLEX_USE_GRANIAN=0and its required packages are installed. - Remove the Uvicorn fallback warning because that backend becomes fully opt-in.
Expected selection matrix
REFLEX_USE_GRANIAN |
Result |
|---|---|
| Unset | Granian |
1 / true |
Granian |
0 / false, Uvicorn/Gunicorn available |
Uvicorn/Gunicorn |
0 / false, required packages missing |
Define and test an actionable failure or fallback behavior |
Acceptance criteria
- Update backend-selection logic and the environment-variable default/documentation.
- Remove the obsolete Uvicorn fallback warning.
- Add unit coverage for every row in the selection matrix.
- Update user-facing documentation and add the appropriate news fragment.
- Confirm whether this ships in the next 0.9.x release or requires 0.10.0 before implementation.
Supersedes #6758.
- Dominant language
- Python
- Stars
- 28.9k
- Forks
- 1.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 173
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from reflex-dev/reflex
-
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
reflex-dev/reflex#7149 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
reflex-dev/reflex#7148 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
reflex-dev/reflex#7103 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
reflex-dev/reflex#6823 · 1 comment ·
-
support redis v8 Openfeature request
Difficulty 1/5 Under an hour Newbie friendliness 88/100
reflex-dev/reflex#6764 · 3 comments · 1 reaction ·
All issues in reflex-dev/reflex
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100