Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ dependencies = [
"rich >=13,<16",
"starlette >=1.3.1",
"typing_extensions >=4.13.0",
# Faster event loop, picked up automatically by granian (loop='auto') and uvicorn.
# Only where uvloop ships wheels (CPython on linux/macOS x86_64+arm64; 3.14 wheels
# start at 0.22.1) so installs never fall back to a source build.
"uvloop >=0.21.0; python_version < '3.14' and (sys_platform == 'linux' or sys_platform == 'darwin') and (platform_machine == 'x86_64' or platform_machine == 'aarch64' or platform_machine == 'arm64') and platform_python_implementation == 'CPython'",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep uvloop opt-in for existing asyncio apps

On Linux/macOS CPython <3.14 this installs uvloop for every Reflex app. The existing Uvicorn paths (reflex/utils/exec.py::run_uvicorn_backend and prod) do not pass a loop= override, so Uvicorn's default auto switches those processes to uvloop as soon as the dependency is present. uvloop 0.22 raises RuntimeError from asyncio.get_event_loop() when no loop is already set, while the stdlib policy on Python 3.10–3.13 still creates one; apps or imported libraries that do this during module import/startup can fail before the backend serves. Please make uvloop opt-in or explicitly select it only where this compatibility change is acceptable.

Useful? React with 👍 / 👎.

"uvloop >=0.22.1; python_version >= '3.14' and (sys_platform == 'linux' or sys_platform == 'darwin') and (platform_machine == 'x86_64' or platform_machine == 'aarch64' or platform_machine == 'arm64') and platform_python_implementation == 'CPython'",
Comment thread
greptile-apps[bot] marked this conversation as resolved.
"wrapt >=1.17.0,<2.2",
"reflex-base >= 0.9.6",
"reflex-components-code >= 0.9.0",
Expand Down
Loading
Loading