Skip to content

Commit 1aac145

Browse files
Merge remote-tracking branch 'upstream' into explicit-event-id-minification
2 parents f964c7a + 7d726e9 commit 1aac145

8 files changed

Lines changed: 32 additions & 13 deletions

File tree

pyi_hashes.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"reflex/components/core/window_events.pyi": "af33ccec866b9540ee7fbec6dbfbd151",
2424
"reflex/components/datadisplay/__init__.pyi": "52755871369acbfd3a96b46b9a11d32e",
2525
"reflex/components/datadisplay/code.pyi": "b86769987ef4d1cbdddb461be88539fd",
26-
"reflex/components/datadisplay/dataeditor.pyi": "fb26f3e702fcb885539d1cf82a854be3",
26+
"reflex/components/datadisplay/dataeditor.pyi": "d2a749db7e279972d4bc1f4de63a7c41",
2727
"reflex/components/datadisplay/shiki_code_block.pyi": "1d53e75b6be0d3385a342e7b3011babd",
2828
"reflex/components/el/__init__.pyi": "0adfd001a926a2a40aee94f6fa725ecc",
2929
"reflex/components/el/element.pyi": "c5974a92fbc310e42d0f6cfdd13472f4",

reflex/components/datadisplay/dataeditor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ class DataEditor(NoSSRComponent):
240240
# Determines the height of each row.
241241
row_height: Var[int]
242242

243-
# Kind of row markers.
243+
# Kind of row markers. Options are: "none", "number", "checkbox", "both", "checkbox-visible", "clickable-number".
244244
row_markers: Var[LiteralRowMarker]
245245

246246
# Changes the starting index for row markers.

reflex/components/field.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ class FieldBasedMeta(type):
6767
PropsBaseMeta and BaseComponentMeta.
6868
"""
6969

70-
def __new__(cls, name: str, bases: tuple[type], namespace: dict[str, Any]) -> type:
70+
def __new__(
71+
cls, name: str, bases: tuple[type, ...], namespace: dict[str, Any]
72+
) -> type:
7173
"""Create a new field-based class.
7274
7375
Args:
@@ -100,7 +102,7 @@ def __new__(cls, name: str, bases: tuple[type], namespace: dict[str, Any]) -> ty
100102
return super().__new__(cls, name, bases, namespace)
101103

102104
@classmethod
103-
def _collect_inherited_fields(cls, bases: tuple[type]) -> dict[str, Any]:
105+
def _collect_inherited_fields(cls, bases: tuple[type, ...]) -> dict[str, Any]:
104106
inherited_fields: dict[str, Any] = {}
105107

106108
# Collect inherited fields from base classes

reflex/components/literals.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,6 @@
2929
]
3030

3131

32-
LiteralRowMarker = Literal["none", "number", "checkbox", "both", "clickable-number"]
32+
LiteralRowMarker = Literal[
33+
"none", "number", "checkbox", "both", "checkbox-visible", "clickable-number"
34+
]

reflex/model.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ def get_engine(url: str | None = None) -> sqlalchemy.engine.Engine:
111111

112112
if not environment.ALEMBIC_CONFIG.get().exists():
113113
console.warn(
114-
"Database is not initialized, run [bold]reflex db init[/bold] first."
114+
"Database is not initialized, run [bold]reflex db init[/bold] first.",
115+
dedupe=True,
115116
)
116117
_ENGINE[url] = sqlalchemy.engine.create_engine(
117118
url,
@@ -153,7 +154,8 @@ def get_async_engine(url: str | None) -> sqlalchemy.ext.asyncio.AsyncEngine:
153154

154155
if not environment.ALEMBIC_CONFIG.get().exists():
155156
console.warn(
156-
"Database is not initialized, run [bold]reflex db init[/bold] first."
157+
"Database is not initialized, run [bold]reflex db init[/bold] first.",
158+
dedupe=True,
157159
)
158160
_ASYNC_ENGINE[url] = sqlalchemy.ext.asyncio.create_async_engine(
159161
url,
@@ -316,8 +318,12 @@ def get_db_status() -> dict[str, bool]:
316318
engine = get_engine()
317319
with engine.connect() as connection:
318320
connection.execute(sqlalchemy.text("SELECT 1"))
319-
except sqlalchemy.exc.OperationalError:
321+
except Exception as exc:
320322
status = False
323+
console.error(
324+
f"Database health check failed: {exc} (subsequent errors will not be logged)",
325+
dedupe=True,
326+
)
321327

322328
return {"db": status}
323329

reflex/utils/exec.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,8 @@ def run_uvicorn_backend_prod(host: str, port: int, loglevel: LogLevel):
612612

613613
if constants.IS_WINDOWS:
614614
command = [
615+
sys.executable,
616+
"-m",
615617
"uvicorn",
616618
*("--host", host),
617619
*("--port", str(port)),
@@ -627,6 +629,8 @@ def run_uvicorn_backend_prod(host: str, port: int, loglevel: LogLevel):
627629

628630
# Our default args, then env args (env args win on conflicts)
629631
command = [
632+
sys.executable,
633+
"-m",
630634
"gunicorn",
631635
"--preload",
632636
*("--worker-class", "uvicorn.workers.UvicornH11Worker"),
@@ -663,6 +667,8 @@ def run_granian_backend_prod(host: str, port: int, loglevel: LogLevel):
663667
from reflex.utils import processes
664668

665669
command = [
670+
sys.executable,
671+
"-m",
666672
"granian",
667673
*("--log-level", "critical"),
668674
*("--host", host),

reflex/utils/prerequisites.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -431,8 +431,6 @@ async def get_redis_status() -> dict[str, bool | None]:
431431
Returns:
432432
The status of the Redis connection.
433433
"""
434-
from redis.exceptions import RedisError
435-
436434
try:
437435
status = True
438436
redis_client = get_redis()
@@ -442,8 +440,12 @@ async def get_redis_status() -> dict[str, bool | None]:
442440
await ping_command
443441
else:
444442
status = None
445-
except RedisError:
443+
except Exception as exc:
446444
status = False
445+
console.error(
446+
f"Redis health check failed: {exc} (subsequent errors will not be logged)",
447+
dedupe=True,
448+
)
447449

448450
return {"redis": status}
449451

@@ -645,7 +647,8 @@ def check_db_initialized() -> bool:
645647
and not environment.ALEMBIC_CONFIG.get().exists()
646648
):
647649
console.error(
648-
"Database is not initialized. Run [bold]reflex db init[/bold] first."
650+
"Database is not initialized. Run [bold]reflex db init[/bold] first.",
651+
dedupe=True,
649652
)
650653
return False
651654
return True

reflex/vars/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3537,7 +3537,7 @@ class BaseStateMeta(ABCMeta):
35373537
def __new__(
35383538
cls,
35393539
name: str,
3540-
bases: tuple[type],
3540+
bases: tuple[type, ...],
35413541
namespace: dict[str, Any],
35423542
mixin: bool = False,
35433543
) -> type:

0 commit comments

Comments
 (0)