reflex 0.6.6a1__py3-none-any.whl → 0.6.6a2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of reflex might be problematic. Click here for more details.

reflex/app.py CHANGED
@@ -1462,10 +1462,10 @@ class EventNamespace(AsyncNamespace):
1462
1462
  app: App
1463
1463
 
1464
1464
  # Keep a mapping between socket ID and client token.
1465
- token_to_sid: dict[str, str] = {}
1465
+ token_to_sid: dict[str, str]
1466
1466
 
1467
1467
  # Keep a mapping between client token and socket ID.
1468
- sid_to_token: dict[str, str] = {}
1468
+ sid_to_token: dict[str, str]
1469
1469
 
1470
1470
  def __init__(self, namespace: str, app: App):
1471
1471
  """Initialize the event namespace.
@@ -1475,6 +1475,8 @@ class EventNamespace(AsyncNamespace):
1475
1475
  app: The application object.
1476
1476
  """
1477
1477
  super().__init__(namespace)
1478
+ self.token_to_sid = {}
1479
+ self.sid_to_token = {}
1478
1480
  self.app = app
1479
1481
 
1480
1482
  def on_connect(self, sid, environ):
@@ -255,7 +255,7 @@ const extractPoints = (points) => {
255
255
 
256
256
  def _render(self):
257
257
  tag = super()._render()
258
- figure = self.data.to(dict)
258
+ figure = self.data.to(dict) if self.data is not None else Var.create({})
259
259
  merge_dicts = [] # Data will be merged and spread from these dict Vars
260
260
  if self.layout is not None:
261
261
  # Why is this not a literal dict? Great question... it didn't work
reflex/reflex.py CHANGED
@@ -404,7 +404,7 @@ def logoutv2(
404
404
 
405
405
  hosting.log_out_on_browser()
406
406
  console.debug("Deleting access token from config locally")
407
- hosting.delete_token_from_config(include_invitation_code=True)
407
+ hosting.delete_token_from_config()
408
408
 
409
409
 
410
410
  db_cli = typer.Typer()
reflex/state.py CHANGED
@@ -1748,7 +1748,11 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow):
1748
1748
  if value is None:
1749
1749
  continue
1750
1750
  hinted_args = value_inside_optional(hinted_args)
1751
- if isinstance(value, dict) and inspect.isclass(hinted_args):
1751
+ if (
1752
+ isinstance(value, dict)
1753
+ and inspect.isclass(hinted_args)
1754
+ and not types.is_generic_alias(hinted_args) # py3.9-py3.10
1755
+ ):
1752
1756
  if issubclass(hinted_args, Model):
1753
1757
  # Remove non-fields from the payload
1754
1758
  payload[arg] = hinted_args(
@@ -1759,7 +1763,7 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow):
1759
1763
  }
1760
1764
  )
1761
1765
  elif dataclasses.is_dataclass(hinted_args) or issubclass(
1762
- hinted_args, Base
1766
+ hinted_args, (Base, BaseModelV1, BaseModelV2)
1763
1767
  ):
1764
1768
  payload[arg] = hinted_args(**value)
1765
1769
  if isinstance(value, list) and (hinted_args is set or hinted_args is Set):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: reflex
3
- Version: 0.6.6a1
3
+ Version: 0.6.6a2
4
4
  Summary: Web apps in pure Python.
5
5
  Home-page: https://reflex.dev
6
6
  License: Apache-2.0
@@ -39,7 +39,7 @@ reflex/__init__.py,sha256=4R4EdOqGs60L9YmqrOpVhm39VDOpF9sGQ6ir4S-YGiY,10708
39
39
  reflex/__init__.pyi,sha256=K-xiTA024j_a9twP4H8nmbl82GGskoyQ66FJ2QqyXl4,11233
40
40
  reflex/__main__.py,sha256=6cVrGEyT3j3tEvlEVUatpaYfbB5EF3UVY-6vc_Z7-hw,108
41
41
  reflex/admin.py,sha256=_3pkkauMiTGJJ0kwAEBnsUWAgZZ_1WNnCaaObbhpmUI,374
42
- reflex/app.py,sha256=UtJWlkIhybwSF5W2qypkvekMnqtfvwHmW1SDkkG-G9Q,54698
42
+ reflex/app.py,sha256=fi3pqTWP3dZx_AoBCs3GdwrQ_73NMwzIGNuknEyW8uM,54750
43
43
  reflex/app_mixins/__init__.py,sha256=Oegz3-gZLP9p2OAN5ALNbsgxuNQfS6lGZgQA8cc-9mQ,137
44
44
  reflex/app_mixins/lifespan.py,sha256=IG72wp1Kas2polEP6Y1nB0wFPN3J4Kh0JAHvbQ-7wZ8,3185
45
45
  reflex/app_mixins/middleware.py,sha256=V5J06Ux9qZIHFX0pnz8qd3EuHHI8KIvtEKpfave_kjI,3209
@@ -159,7 +159,7 @@ reflex/components/next/link.pyi,sha256=A8jQIkj-vHrDqTVbuam3Y8eazLHGwqhynqLYr_9Nv
159
159
  reflex/components/next/video.py,sha256=GngxgHvAfGwRHkPUBNp6_GfGarP5mMN6KFA_-VizDOI,735
160
160
  reflex/components/next/video.pyi,sha256=JOmKt7-I20YlF_htFI-H5RpOM_9dMw16IShFG52xtRA,2556
161
161
  reflex/components/plotly/__init__.py,sha256=OX-Ly11fIg0uRTQHfqNVKV4M9xqMqLOqXzZIfKNYE0w,77
162
- reflex/components/plotly/plotly.py,sha256=TAjHwZaZsYQC1bvbF4vq23AMFtFxudx6mnEC8DO4058,8715
162
+ reflex/components/plotly/plotly.py,sha256=p3BU476paTJEmCpL0IKniH6eR6VCc7ue8S_cDrmYrKY,8760
163
163
  reflex/components/plotly/plotly.pyi,sha256=BZGDMPg8aJmKJX2E_dtHOULR4Oz3tJLR279YMxdHz8k,7284
164
164
  reflex/components/props.py,sha256=mBwSby1aFmpnD3gfy92pqFITvNikj0hSE6HUMa5sBm4,2482
165
165
  reflex/components/radix/__init__.py,sha256=fRsLvIO3MrTtPOXtmnxYDB9phvzlcbyB_utgpafYMho,474
@@ -356,9 +356,9 @@ reflex/middleware/hydrate_middleware.py,sha256=KvFppl4ca75bsjos5boy8EGwsRBZ9jI6Z
356
356
  reflex/middleware/middleware.py,sha256=9eASK3MrbK1AvT2Sx5GFxXNwSuNW8_LTRGvPY1JccU4,1171
357
357
  reflex/model.py,sha256=AaCs6V9iWFj-EZI7zfXL1LTy-TrnNfJKVit2MPqLM8M,14139
358
358
  reflex/page.py,sha256=N85R5tTI-NoFd9ArwYCN8OcV9aSPZIPrJI2ZFbH8ytk,2389
359
- reflex/reflex.py,sha256=mTfc1GpG8QxpctjCwvkr5xuUsfXWIsRZwjiYUKb-t3Y,21896
359
+ reflex/reflex.py,sha256=ejJKZDYscjCYL1lMIPmPCbvqd5Gosw4FwbRsupyEIm4,21868
360
360
  reflex/route.py,sha256=WZS7stKgO94nekFFYHaOqNgN3zZGpJb3YpGF4ViTHmw,4198
361
- reflex/state.py,sha256=PR7ACv96OfssFazmMsKoQe5XMP7Cu8a2i1MuL-oJH6M,133929
361
+ reflex/state.py,sha256=VxDHkkvNLzAZOe0e_sPwztoiOcBMXqomWF1-fQobi4w,134081
362
362
  reflex/style.py,sha256=-mBrpaq23jiNJIwgCir6Fzj182u9rGpp3qZ2cUt5aZs,12695
363
363
  reflex/testing.py,sha256=qkLVNeLcD3uxTg95WuV1IYoEhkmEdJ7o8Fbc8NaeoRQ,34792
364
364
  reflex/utils/__init__.py,sha256=y-AHKiRQAhk2oAkvn7W8cRVTZVK625ff8tTwvZtO7S4,24
@@ -388,8 +388,8 @@ reflex/vars/function.py,sha256=w_Xa7GGVHbcfP7nMqKG5-q9Y7Uj3Yinj1Csjqxz_leg,14596
388
388
  reflex/vars/number.py,sha256=BeHQr4Cj2gdXekEWcxSzLTIuRAC3sf6YvsdHlADETpQ,27499
389
389
  reflex/vars/object.py,sha256=dTfkkUGDmoxu7iPcKSnNJ-lTI48yoXbagUyA-lKwDDo,14335
390
390
  reflex/vars/sequence.py,sha256=mlmOkSV8FIxwdJHzQdu3NzHAoNB4KcGc93dcmdviIoo,49916
391
- reflex-0.6.6a1.dist-info/LICENSE,sha256=dw3zLrp9f5ObD7kqS32vWfhcImfO52PMmRqvtxq_YEE,11358
392
- reflex-0.6.6a1.dist-info/METADATA,sha256=-0e9vXm_gZ0wV_W7GVf5bd6yeCLQuEMQoyfQnpZjPqo,12101
393
- reflex-0.6.6a1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
394
- reflex-0.6.6a1.dist-info/entry_points.txt,sha256=H1Z5Yat_xJfy0dRT1Frk2PkO_p41Xy7fCKlj4FcdL9o,44
395
- reflex-0.6.6a1.dist-info/RECORD,,
391
+ reflex-0.6.6a2.dist-info/LICENSE,sha256=dw3zLrp9f5ObD7kqS32vWfhcImfO52PMmRqvtxq_YEE,11358
392
+ reflex-0.6.6a2.dist-info/METADATA,sha256=5fc1UxT1T6-ePqCYZBPdLLcKQvMZVu9gqJDoFDYjKQg,12101
393
+ reflex-0.6.6a2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
394
+ reflex-0.6.6a2.dist-info/entry_points.txt,sha256=H1Z5Yat_xJfy0dRT1Frk2PkO_p41Xy7fCKlj4FcdL9o,44
395
+ reflex-0.6.6a2.dist-info/RECORD,,