Masen Furer
351611ca25
rx.background and StateManager.modify_state provides safe exclusive access to state ( #1676 )
2023-09-21 11:42:11 -07:00
Masen Furer
1bfb579b20
state: implement __copy__ and __deepcopy__ for MutableProxy ( #1845 )
2023-09-20 16:46:49 -07:00
Elijah Ahianyo
2750228dbb
Prevent Substate class shadowing ( #1827 )
2023-09-19 15:56:39 -07:00
Masen Furer
1430075bdc
Reassign state Var when fields on a Base instance change ( #1748 )
2023-09-18 13:52:10 -07:00
Masen Furer
71811a600c
Var: __bool__ and __iter__ always raise a TypeError ( #1750 )
2023-09-05 13:44:22 -07:00
wassaf shahzad
e99d6723bc
added changes for datetime ( #1745 )
...
* added changes for datetime
* fixed formatting
* fixed darglint issue
* test_state: check for other datetime module classes
* utils/types.py: use issubclass check
fix docstring copy/paste issue
* utils/format.py: reuse types.is_datetime check
---------
Co-authored-by: Masen Furer <m_github@0x26.net>
2023-09-04 22:29:02 -07:00
Masen Furer
b44c2176e0
Track var dependencies in comprehensions and nested functions ( #1728 )
2023-09-04 14:31:17 -07:00
Masen Furer
12e516da64
state: _init_event_handlers recursively ( #1640 )
2023-08-25 13:28:58 -07:00
Martin Xu
510b71e644
Check the yield/return from user defined event handlers are valid ( #1614 )
2023-08-18 01:36:30 -07:00
Elijah Ahianyo
2fa087a0fa
Event Handlers should not shadow base state methods ( #1543 )
2023-08-10 12:47:35 -07:00
Smit Parmar
ef78465f16
Added support for RelexSet
wrapper ( #1535 )
2023-08-10 09:59:03 -07:00
Thomas Brandého
9222bbbdf2
fix state reset() ( #1501 )
2023-08-02 11:02:05 -07:00
jackie-pc
e6f4bcdb95
Github action to run unit tests on windows ( #1444 )
2023-07-28 11:12:01 -07:00
Elijah Ahianyo
3fa33bd644
List and Dict mutation on setattr ( #1428 )
2023-07-27 12:45:57 -07:00
Masen Furer
20e2a25c9a
vars: unbox EventHandler and functools.partial for dep analysis ( #1305 )
...
When calculating the variable dependencies of a cached_var, reach into objects
with .func or .fn attributes and perform analysis on those.
Fix #1303
2023-07-05 16:05:49 -07:00
Masen Furer
cd63297fe4
state: Leading underscore functions are not backend vars ( #1268 )
2023-06-28 15:32:49 -07:00
Elijah Ahianyo
be48e13c71
Remove cookies ( #1223 )
2023-06-27 18:04:29 -07:00
Nikhil Rao
139ce38df1
Rename pynecone to reflex ( #1236 )
2023-06-25 16:56:55 -07:00
Elijah Ahianyo
b6ae225455
Get Cookies ( #1221 )
2023-06-20 14:57:33 -07:00
Nikhil Rao
fedecfdf44
Fix processing flag for generator events ( #1157 )
2023-06-09 10:50:03 -07:00
Elijah Ahianyo
278222db8f
async tests to test yield functionality ( #1163 )
2023-06-07 11:50:27 -07:00
Nikhil Rao
895719cf68
Fix processing flag for generator event handlers ( #1136 )
2023-06-05 11:30:59 -07:00
Nikhil Rao
a18c6880b5
Add async events ( #1107 )
2023-06-01 21:47:55 -07:00
Elijah Ahianyo
bb1cf4322e
Foreach support for other data structures(dict, set, tuple) ( #1029 )
2023-05-17 16:11:41 -07:00
Masen Furer
0491852a45
@pc.cached_var: explicit opt-in for ComputedVar tracking ( #1000 )
2023-05-11 17:47:54 -07:00
iron3oxide
32f3a387ae
Rename var module to vars ( #983 )
2023-05-09 23:01:25 -07:00
Masen Furer
557097e2ca
ComputedVar dependency tracking: require caller to pass objclass ( #963 )
...
Avoid issue where a ComputedVar is added to to a class dynamically, but does
not have a reference to the class its attached to, but requiring callers of the
`deps()` method to provide the objclass for looking up recursive method calls.
This allows for safer and more simplified determination of dependencies, even
in highly dynamic environments.
2023-05-09 14:36:45 -07:00
Nikhil Rao
dc2dff9323
Temp remove computed var dependency checks ( #972 )
2023-05-08 18:00:03 -07:00
Nikhil Rao
8e3daf9f5b
Clean up on_load events ( #965 )
2023-05-08 12:13:51 -07:00
Masen Furer
4515561e61
Per-instance backend variables ( #959 )
...
* test_state: check that _backend_vars are not shared between instances
Each instance of State should get its own backend vars
* per-instance backend vars
Attempt to fix #958
2023-05-07 16:23:31 -07:00
Masen Furer
c344a5c0d7
Cache ComputedVar ( #917 )
2023-05-04 00:11:39 -07:00
Nikhil Rao
a9ee9f6d44
Fix event handler calls to handlers ( #899 )
2023-04-27 19:30:52 -07:00
Elijah Ahianyo
29945504bc
Dynamic vars initialization unit tests( #880 )
2023-04-26 14:41:47 -07:00
Nikhil Rao
f504d6b4b1
Disable computed var deps ( #872 )
2023-04-25 21:24:40 -07:00
Nikhil Rao
f019e0e55a
Speed up computed var dependency tracking ( #864 )
2023-04-25 13:56:24 -07:00
Masen Furer
3c4fb256a2
Always emit a full dict() when hydrating ( #843 )
2023-04-24 21:28:30 -07:00
Alan Mond
73cfd2fdba
Modify some methods in state.py to prevent being overwritten ( #856 )
2023-04-24 10:45:35 -07:00
Masen Furer
b4755b8123
Only update ComputedVar when dependent vars change ( #840 )
2023-04-23 18:48:44 -06:00
Nikhil Rao
e4bf94464b
Fix event handler override ( #828 )
2023-04-15 11:33:52 -07:00
Elijah Ahianyo
592be487c9
Call event handlers from other event handlers ( #691 )
2023-03-16 16:57:28 -07:00
iron3oxide
7067baf176
Refactor utils module ( #666 )
2023-03-16 14:59:27 -07:00
advo-kat
8d9c75824c
Socket fixes and config options( #485 )
2023-02-09 23:59:20 -08:00
叶子
1529a23c1b
Switch linter to ruff ( #450 )
2023-02-09 11:33:18 -08:00
PeterYusuke
07289c8735
Solve windows env test fails ( #437 )
2023-02-06 13:41:59 -08:00
lawrence-axb
d1ff7d481f
Allow plotly figures as state vars ( #440 )
2023-02-04 16:13:18 -08:00
Thomas Brandého
b06f612a7d
Dynamically add vars to a State ( #381 )
2023-01-29 11:20:06 -08:00
Nikhil Rao
d376d2972b
Support dataframes as state vars ( #324 )
2023-01-23 18:47:21 -08:00
Thomas Brandého
554e6d919b
Add event token to router_data ( #316 )
2023-01-22 17:40:19 -08:00
Nikhil Rao
8be411b81b
Implement var slicing ( #289 )
2023-01-18 17:53:04 -08:00
Thomas Brandého
1124067c12
Add router data to state ( #228 )
2023-01-08 13:48:09 -08:00