Commit Graph

90 Commits

Author SHA1 Message Date
Elijah Ahianyo
625c5302dd
[REF-3562][REF-3563] Replace chakra usage (#3872) 2024-09-12 10:46:42 -07:00
benedikt-bartscher
5dcf554bd4
cleanup dead test code (#3909) 2024-09-11 11:15:49 -07:00
benedikt-bartscher
63bf1b8817
Dynamic route vars silently shadow all other vars (#3805)
* fix dynamic route vars silently shadow all other vars

* add test

* fix: allow multiple dynamic routes with the same arg

* add test for multiple dynamic args with the same name

* avoid side-effects with DynamicState tests

* fix dynamic route integration test which shadowed a var

* fix darglint

* refactor to DynamicRouteVar

* old typing stuff again

* from typing_extensions import Self

try to keep typing backward compatible with older releases we support

* Raise a specific exception when encountering dynamic route arg shadowing

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2024-09-11 09:43:18 -07:00
Khaleel Al-Adhami
a5c73ad8e5
Use old serializer system in LiteralVar (#3875)
* use serializer system

* add checks for unsupported operands

* and and or are now supported

* format

* remove unnecessary call to JSON

* put base before rest

* fix failing testcase

* add hinting to get static analysis to complain

* damn

* big changes

* get typeguard from extensions

* please darglint

* dangit darglint

* remove one from vars

* add without data and use it in plotly

* DARGLINT

* change format for special props

* add pyi

* delete instances of Var.create

* modify client state to work

* fixed so much

* remove every Var.create

* delete all basevar stuff

* checkpoint

* fix pyi

* get older python to work

* dangit darglint

* add simple fix to last failing testcase

* remove var name unwrapped and put client state on immutable var

* fix older python

* fox event issues

* change forms pyi

* make test less strict

* use rx state directly

* add typeignore to page_id

* implement foreach

* delete .web states folder silly

* update reflex chakra

* fix issue when on mount or on unmount is not set

* nuke Var

* run pyi

* import immutablevar in critical location

* delete unwrap vars

* bring back array ref

* fix style props in app

* /health endpoint for K8 Liveness and Readiness probes (#3855)

* Added API Endpoint

* Added API Endpoint

* Added Unit Tests

* Added Unit Tests

* main

* Apply suggestions from Code Review

* Fix Ruff Formatting

* Update Socket Events

* Async Functions

* Update find_replace (#3886)

* [REF-3592]Promote `rx.progress` from radix themes (#3878)

* Promote `rx.progress` from radix themes

* fix pyi

* add warning when accessing `rx._x.progress`

* Use correct flexgen backend URL (#3891)

* Remove demo template (#3888)

* gitignore .web (#3885)

* update overflowY in AUTO_HEIGHT_JS from hidden to scroll (#3882)

* Retain mutability inside `async with self` block (#3884)

When emitting a state update, restore `_self_mutable` to the value it had
previously so that `yield` in the middle of `async with self` does not result
in an immutable StateProxy.

Fix #3869

* Include child imports in markdown component_map (#3883)

If a component in the markdown component_map contains children components, use
`_get_all_imports` to recursively enumerate them.

Fix #3880

* [REF-3570] Remove deprecated REDIS_URL syntax (#3892)

* mixin computed vars should only be applied to highest level state (#3833)

* improve state hierarchy validation, drop old testing special case (#3894)

* fix var dependency dicts (#3842)

* Adding array to array pluck operation. (#3868)

* fix initial state without cv fallback (#3670)

* add fragment to foreach (#3877)

* Update docker-example (#3324)

* /health endpoint for K8 Liveness and Readiness probes (#3855)

* Added API Endpoint

* Added API Endpoint

* Added Unit Tests

* Added Unit Tests

* main

* Apply suggestions from Code Review

* Fix Ruff Formatting

* Update Socket Events

* Async Functions

* /health endpoint for K8 Liveness and Readiness probes (#3855)

* Added API Endpoint

* Added API Endpoint

* Added Unit Tests

* Added Unit Tests

* main

* Apply suggestions from Code Review

* Fix Ruff Formatting

* Update Socket Events

* Async Functions

* Merge branch 'main' into use-old-serializer-in-literalvar

* [REF-3570] Remove deprecated REDIS_URL syntax (#3892)

* /health endpoint for K8 Liveness and Readiness probes (#3855)

* Added API Endpoint

* Added API Endpoint

* Added Unit Tests

* Added Unit Tests

* main

* Apply suggestions from Code Review

* Fix Ruff Formatting

* Update Socket Events

* Async Functions

* [REF-3570] Remove deprecated REDIS_URL syntax (#3892)

* remove extra var

Co-authored-by: Masen Furer <m_github@0x26.net>

* resolve typo

* write better doc for var.create

* return var value when we know it's literal var

* fix unit test

* less bloat for ToOperations

* simplify ImmutableComputedVar.__get__ (#3902)

* simplify ImmutableComputedVar.__get__

* ruff it

---------

Co-authored-by: Samarth Bhadane <samarthbhadane119@gmail.com>
Co-authored-by: Elijah Ahianyo <elijahahianyo@gmail.com>
Co-authored-by: Masen Furer <m_github@0x26.net>
Co-authored-by: benedikt-bartscher <31854409+benedikt-bartscher@users.noreply.github.com>
Co-authored-by: Vishnu Deva <vishnu.deva12@gmail.com>
Co-authored-by: abulvenz <a.eismann@senbax.de>
2024-09-10 11:43:37 -07:00
benedikt-bartscher
99ffbc8c39
fix var dependency dicts (#3842) 2024-09-08 18:35:47 -07:00
Khaleel Al-Adhami
629850162a
implement disk state manager (#3826)
* implement disk state manager

* put states inside of a folder

* return root state all the time

* factor out code

* add docs for token expiration

* cache states directory

* call absolute on web directory

* change dir to app path when testing the backend

* remove accidental 🥒

* test disk for now

* modify schema

* only serialize specific stuff

* fix issue in types

* what is a kilometer

* create folder if it doesn't exist in write

* this code hates me

* check if the file isn't empty

* add try except clause

* add check for directory again
2024-08-30 17:26:10 -07:00
Khaleel Al-Adhami
ea15b184c0
fully migrate vars into new system (#3743)
* fully migrate vars into new system

* i hate rufffff (no i don't)

* fix silly pright issues (except colormode and state)

* remove all instances of Var.create

* create immutable callable var and get rid of more base vars

* implement hash for all functions

* get reflex-web to compile

* get it to compile reflex-web successfully

* fix tests

* fix pyi

* use override from typing_extension

* put plotly inside of a catch

* dicts are unusable sadly

* fix silly mistake

* overload equals to special case immutable var

* improve test_cond

* solve more CI issues, down to 94 failures

* down to 20 errors

* down to 13 errors

* pass all testcases

* fix pyright issues

* reorder things

* use get origin more

* use fixed_type logic

* various optimizations

* go back to passing test cases

* use less boilerplate

* remove unnecessary print message

* remove weird comment

* add test for html issue

* add type ignore

* fix another silly issue

* override get all var data for var operations call

* make integration tests pass

* fix immutable call var

* better logic for finding parent class

* use even better logic for finding state wrt computedvar

* only choose the ones that are defined in the same module

* small dict to large dict

* [REF-3591] Remove chakra-related files from immutable vars PR (#3821)

* Add comments to html metadata component (#3731)

* fix: add verification for path /404 (#3723)

Co-authored-by: coolstorm <manas.gupta@fampay.in>

* Use the new state name when setting `is_hydrated` to false (#3738)

* Use `._is_mutable()` to account for parent state proxy (#3739)

When a parent state proxy is set, also allow child StateProxy._self_mutable to
override the parent's `_is_mutable()`.

* bump to 0.5.9 (#3746)

* add message when installing requirements.txt is needed for chosen template during init (#3750)

* #3752 bugfix add domain for XAxis (#3764)

* fix appharness app_source typing (#3777)

* fix import clash between connectionToaster and hooks.useState (#3749)

* use different registry when in china, fixes #3700 (#3702)

* do not reload compilation if using local app in AppHarness (#3790)

* do not reload if using local app

* Update reflex/testing.py

Co-authored-by: Masen Furer <m_github@0x26.net>

---------

Co-authored-by: Masen Furer <m_github@0x26.net>

* Bump memory on relevant actions (#3781)

Co-authored-by: Alek Petuskey <alekpetuskey@Aleks-MacBook-Pro.local>

* [REF-3334] Validate Toast Props (#3793)

* [REF-3536][REF-3537][REF-3541] Move chakra components into its repo(reflex-chakra) (#3798)

* fix get_uuid_string_var (#3795)

* minor State cleanup (#3768)

* Fix code wrap in markdown (#3755)

---------

Co-authored-by: Alek Petuskey <alek@pynecone.io>
Co-authored-by: Manas Gupta <53006261+Manas1820@users.noreply.github.com>
Co-authored-by: coolstorm <manas.gupta@fampay.in>
Co-authored-by: Thomas Brandého <thomas.brandeho@gmail.com>
Co-authored-by: Shubhankar Dimri <dimrishubhi@gmail.com>
Co-authored-by: benedikt-bartscher <31854409+benedikt-bartscher@users.noreply.github.com>
Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
Co-authored-by: Alek Petuskey <alekpetuskey@Aleks-MacBook-Pro.local>
Co-authored-by: Elijah Ahianyo <elijahahianyo@gmail.com>

* pyproject.toml: bump to 0.6.0a1

* pyproject.toml: depend on reflex-chakra>=0.6.0a

New Var system support in reflex-chakra 0.6.0a1

* poetry.lock: relock dependencies

* integration: bump listening timeout to 1200 seconds

* integration: bump listening timeout to 1800 seconds

* Use cached_var_no_lock to avoid ImmutableVar deadlocks (#3835)

* Use cached_var_no_lock to avoid ImmutableVar deadlocks

ImmutableVar subclasses will always return the same value for a _var_name or
_get_all_var_data so there is no need to use a per-class lock to protect a
cached attribute on an instance, and doing so actually is observed to cause
deadlocks when a particular _cached_var_name creates new LiteralVar instances
and attempts to serialize them.

* remove unused module global

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
Co-authored-by: Alek Petuskey <alek@pynecone.io>
Co-authored-by: Manas Gupta <53006261+Manas1820@users.noreply.github.com>
Co-authored-by: coolstorm <manas.gupta@fampay.in>
Co-authored-by: Thomas Brandého <thomas.brandeho@gmail.com>
Co-authored-by: Shubhankar Dimri <dimrishubhi@gmail.com>
Co-authored-by: benedikt-bartscher <31854409+benedikt-bartscher@users.noreply.github.com>
Co-authored-by: Alek Petuskey <alekpetuskey@Aleks-MacBook-Pro.local>
Co-authored-by: Elijah Ahianyo <elijahahianyo@gmail.com>
2024-08-26 13:28:18 -07:00
Elijah Ahianyo
1f3779f40e
[REF-3536][REF-3537][REF-3541] Move chakra components into its repo(reflex-chakra) (#3798) 2024-08-19 13:41:31 -07:00
benedikt-bartscher
3039b54a75
add module prefix to generated state names (#3214)
* add module prefix to state names

* fix state names in test_app

* update state names in test_state

* fix state names in test_var

* fix state name in test_component

* fix state names in test_format

* fix state names in test_foreach

* fix state names in test_cond

* fix state names in test_datatable

* fix state names in test_colors

* fix state names in test_script

* fix state names in test_match

* fix state name in event1 fixture

* fix pyright and darglint

* fix state names in state_tree

* fix state names in redis only test

* fix state names in test_client_storage

* fix state name in js template

* add `get_state_name` and `get_full_state_name` helpers for `AppHarness`

* fix state names in test_dynamic_routes

* use new state name helpers in test_client_storage

* fix state names in test_event_actions

* fix state names in test_event_chain

* fix state names in test_upload

* fix state name in test_login_flow

* fix state names in test_input

* fix state names in test_form_submit

* ruff

* validate state module names

* wtf is going on here?

* remove comments leftover from refactoring

* adjust new test_add_style_embedded_vars

* fix state name in state.js

* fix integration/test_client_state.py

new SessionStorage feature was added with more full state names that need to be formatted in

* fix pre-commit issues in test_client_storage.py

* adjust test_computed_vars

* adjust safe-guards

* fix redis tests with new exception state

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2024-07-11 11:13:57 -07:00
Maxim Vlah
772a3ef893
Catch unhandled errors on both frontend and backend (#3572) 2024-07-08 19:26:11 -07:00
benedikt-bartscher
44d27f9e4c
do not validate non-cached var deps (#3576)
* do not validate non-cached var deps

* further improve Exceptions for misconfigured var deps
2024-06-27 17:00:55 -07:00
benedikt-bartscher
41efe12e9a
Validate ComputedVar dependencies, add tests (#3527) 2024-06-24 16:11:42 -07:00
Thomas Brandého
ed05f57fc9
Make .web configurable with REFLEX_WEB_WORKDIR (#3462) 2024-06-17 16:17:00 -04:00
Elijah Ahianyo
69e4bbc301
[REF-2830] server side events and stateless components should not require not require a backend (#3475)
* `rx.color_mode.icon`, `rx.color_mode.button` and `rx.color_mode.switch` should not require a backend`

* remove print statement

* unit tests and precommit fix

* add unit tests

* change logic to check if event handlers actually contain state. Also delay websocket object check in state.js so server side events can get executed for stateless apps

* make sure events are not queued for server side events particularly ones that call queueEvents(clear_local_storage, clear_cookies, remove_local_storage, remove_cookies) when the app is stateless(no ws)

* fix unit tests

* fix broken unit tests in test_app

* modify socket check in processEvent to only return if socket exists and theres any event in the queue that requires state

* Apply suggestions from code review

make queueEvent call async

Co-authored-by: Masen Furer <m_github@0x26.net>

* await queueEventIfSocketExists

* Revert "await queueEventIfSocketExists"

This reverts commit 9ef8070b87.

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2024-06-14 09:48:53 -07:00
Alexander Morgan
ad3134413b
Make better/less use of dict.keys() calls (#3455) 2024-06-07 14:28:44 -07:00
Elijah Ahianyo
34bf25071a
[REF-2821]Improve Dynamic Imports (#3345)
* Improve import times

* add lazy loading to rx.el

* add lazy loading to reflex core components

* minor refactor

* Get imports working with reflex web

* get imports to work with all reflex examples

* refactor to define imports only in the root.

* lint

* deadcode remove

* update poetry deps

* unit tests fix

* app_harness fix

* app_harness fix

* pyi file generate

* pyi file generate

* sort pyi order

* fix pyi

* fix docker ci

* rework pyi-generator

* generate pyi for __init__ files

* test pyright

* test pyright ci

* partial pyright fix

* more pyright fix

* pyright fix

* fix pyi_generator

* add rx.serializer and others

* add future annotation import which fixes container CI, then also load recharts lazily

* add new pyi files

* pyright fix

* minor fixes for reflex-web and flexdown

* forward references for py38

* ruff fix

* pyi fix

* unit tests fix

* reduce coverage to 68%

* reduce coverage to 67%

* reduce coverage to 66%as a workaround to coverage's rounding issue

* reduce coverage to 66%as a workaround to coverage's rounding issue

* exclude lazy_loader dependency review checks.

* its lazy-loader

* Add docstrings and regenerate pyi files

* add link

* address Pr comments

* CI fix

* partially address PR comments.

* edit docstrings and fix integration tests

* fix typo in docstring

* pyi fix
2024-05-31 16:43:10 +00:00
Elijah Ahianyo
9c7dbdbc72
[REF-2643] Throw Errors for duplicate Routes (#3155) 2024-05-03 12:15:40 -07:00
Nikhil Rao
7903a1020d
Clean up config and app API (#3197) 2024-05-02 18:15:28 -07:00
Masen Furer
1a11941577
[REF-2392] Expose next.config.js transpilePackages key (#3006) 2024-04-11 13:50:42 -07:00
Thomas Brandého
bf0ebb8d09
Lendemor/improve coverage (#2988)
* add more tests

* add tests to raise coverage

* more tests, bump coverage to 73

* fix up icon_button test

* fix darglint for app.py

* fix utcnow usage warning

* set threshold to 72

* fix timestamp

* fix unit tests for linux-redis

* removed commented code and put a TODO
2024-04-04 14:31:43 +02:00
Elijah Ahianyo
d43a85bab2
Unpack component tuples in a fragment (#2985) 2024-04-03 10:44:04 -07:00
Malte Klemm
86526cba51
[REF-2127] Loosen requirements (#2796)
* Remove upper bounds of most dependencies.

Also adds a import try except block for pydantic.v1 and relocks.

Keep black and ruff to not mess to much with current formatting

Make pyright see the right import as long as constraint still lock pydantiv v1

Down pin pytest-asyncio again due to known issue

Fix upload handler with latest versions of fastapi

Change comment

* Add changed lockfile

* Set max versions for deps

* Revert app.pyi

---------

Co-authored-by: Malte Klemm <malte.klemm@blueyonder.com>
Co-authored-by: Nikhil Rao <nikhil@reflex.dev>
2024-03-29 09:26:53 -07:00
Masen Furer
c809107d09
[REF-2158] Enable state when on_load or event_triggers are set. (#2815)
* [REF-2158] Enable state when `on_load` or event_triggers are set.

Basically all events in a reflex app require the backend to be up, even the
built-in server side events round trip to the backend and require "state" even
if no user-defined state classes are declared.

test_app_state_determination: checking that state is enabled at the right time

* Clear out DECORATED_PAGES when initializing a new app
2024-03-08 17:34:09 -08:00
benedikt-bartscher
19a5cdd408
Track state usage (#2441)
* rebase

* pass include_children kwarg in radix FormRoot

* respect include_children

* ruff fixes

* readd statemanager init, run pyi gen

* minor performance imporovements, fix for state changes

* fix pyi and pyright

* pass include_children for chakra

* remove old state detection

* add test for unused states in stateless app

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2024-03-07 14:25:55 -08:00
Masen Furer
deae662e2a
[REF-1988] API to Get instance of Arbitrary State class (#2678)
* WiP get_state

* Refactor get_state fast path

Rudimentary protection for state instance access from a background task
(StateProxy)

* retain dirty substate marking per `_mark_dirty` call to avoid test changes

* Find common ancestor by part instead of by character

Fix StateProxy for substates and parent_state attributes (have to handle in
__getattr__, not property)

Fix type annotation for `get_state`

* test_state: workflow test for `get_state` functionality

* Do not reset _always_dirty_substates when adding vars

Reset the substate tracking only when the class is instantiated.

* test_state_tree: test substate access in a larger state tree

Ensure that `get_state` returns the proper "branch" of the state tree depending
on what substate is requested.

* test_format: fixup broken tests from adding substates of TestState

* Fix flaky integration tests with more polling

* AppHarness: reset _always_dirty_substates on rx.State

* RuntimeError unless State is instantiated with _reflex_internal_init=True

Avoid user errors trying to directly instantiate State classes

* Helper functions for _substate_key and _split_substate_key

Unify the implementation of generating and decoding the token + state name
format used for redis state sharding.

* StateManagerRedis: use create_task in get_state and set_state

read and write substates concurrently (allow redis to shine)

* test_state_inheritance: use polling cuz life too short for flaky tests

kthnxbai ❤️

* Move _is_testing_env to reflex.utils.exec.is_testing_env

Reuse the code in app.py

* Break up `BaseState.get_state` and friends into separate methods

* Add test case for pre-fetching cached var dependency

* Move on_load_internal and update_vars_internal to substates

Avoid loading the entire state tree to process these common internal events. If
the state tree is very large, this allow page navigation to occur more quickly.

Pre-fetch substates that contain cached vars, as they may need to be recomputed
if certain vars change.

* Do not copy ROUTER_DATA into all substates.

This is a waste of time and memory, and can be handled via a special case in
__getattribute__

* Track whether State instance _was_touched

Avoid wasting time serializing states that have no modifications

* Do not persist states in `StateManagerRedis.get_state`

Wait until the state is actually modified, and then persist it as part of `set_state`.

Factor out common logic into helper methods for readability and to reduce
duplication of common logic.

To avoid having to recursively call `get_state`, which would require persisting
the instance and then getting it again, some of the initialization logic
regarding parent_state and substates is duplicated when creating a new
instance. This is for performance reasons.

* Remove stray print()

* context.js.jinja2: fix check for empty local storage / cookie vars

* Add comments for onLoadInternalEvent and initialEvents

* nit: typo

* split _get_was_touched into _update_was_touched

Improve clarity in cases where _get_was_touched was being called for its side
effects only.

* Remove extraneous information from incorrect State instantiation error

* Update missing redis exception message
2024-02-27 13:02:08 -08:00
Masen Furer
350a051a45
[REF-1741] Disallow routes with /api prefix (#2711) 2024-02-26 19:34:51 -08:00
Masen Furer
756bf9b0f4
[REF-1885] Shard Substates when serializing to Redis (#2574)
* Move sharding internal to StateManager

Avoid leaking sharding implementation details all over the State class and
breaking the API

* WiP StateManager based sharding

* Copy the state __dict__ when serializing to avoid breaking the instance

* State tests need to pass the correct substate token for redis

* state: when getting parent_state, set top_level=False

ensure that we don't end up with a broken tree

* test_app: get tests passing with redis by passing the correct token

refactor upload tests to suck less

* test_client_storage: look up substate key

* state.py: pass static checks

* test_dynamic_routes: working with redis state shard

* Update the remaining AppHarness tests to pass {token}_{state.get_full_name()}

* test_app: pass all tokens with state suffix

* StateManagerRedis: clean up commentary
2024-02-21 01:50:25 -08:00
Masen Furer
c124650082
Merge remote-tracking branch 'origin/main' into reflex-0.4.0 2024-02-07 13:53:39 -08:00
Nikhil Rao
e2c3081d1e
Remove focus-visible package (#2535) 2024-02-06 11:36:12 -08:00
Nikhil Rao
05d1be2182
Move core components to radix namespace (#2506) 2024-02-02 14:26:46 -08:00
Masen Furer
bece5bdb44
[REF-1632] Apply rx.App styles to Radix Themes root div (#2481) 2024-01-29 16:58:05 -08:00
Nikhil Rao
d68de02bc8
Revert "Individually Import Chakra Packages (#2405)" (#2472) 2024-01-28 15:39:59 -08:00
Alek Petuskey
00a8054850
Individually Import Chakra Packages (#2405)
* Base lib switch

Co-authored-by: Alek Petuskey <alekpetuskey@aleks-mbp.lan>
2024-01-25 10:22:46 -08:00
Nikhil Rao
cfb9d44e0c
Apply default theme to apps (#2320) 2023-12-20 15:17:49 -08:00
jackie-pc
7388617b72
apps should no longer call "app.compile()" (#2291) 2023-12-18 16:06:21 -08:00
benedikt-bartscher
f90982ea06
use redis-py url syntax for redis_url (#2267)
* use redis-py url syntax for redis_url

* port is optional

* Add StateManagerRedis.close method

The close helper method always calls `close_connection_pool=True` so that all
outstanding redis operations can be stopped before changing event loops.

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2023-12-12 10:54:10 -08:00
Masen Furer
0bbae2d3d5
[REF-1404] router_data not updated when processing events (#2255) 2023-12-04 16:45:22 -08:00
Masen Furer
60147dec65
[REF-201] Separate on_load handler from initial hydration (#1847) 2023-11-30 12:21:15 -08:00
Elijah Ahianyo
e3ee98098a
RED-1052/rx.State as Base State (#2146) 2023-11-29 09:43:33 -08:00
Masen Furer
3deb2cec93
code_block responds to color mode by default (#2228) 2023-11-28 13:24:38 -08:00
Masen Furer
0c55723df4
[REF-1158] Move chakra-only deps to chakra lib (#2171) 2023-11-28 00:04:07 -08:00
Masen Furer
ee87e62efa
[REF-1035] Track ComputedVar dependency per class (#2067) 2023-11-27 18:17:53 -08:00
Masen Furer
1603144c7d
[REF-889] useContext per substate (#2149) 2023-11-21 11:52:06 -08:00
Masen Furer
7eccc6d988
[REF-723+] Upload with progress and cancellation (#1899) 2023-11-16 15:46:13 -08:00
SandeshPyakurel
5e2ce46ddb
Typos fixed in multiple files (#2090) 2023-10-31 13:43:25 -07:00
Masen Furer
cbf5b61a23
Drop python3.7 support (#2003)
* Drop python3.7 support

* poetry.lock: relock without py3.7

* Update README/CONTRIBUTING to say 3.8+
2023-10-19 22:21:29 +02:00
Elijah Ahianyo
b652d40ee5
Remove Default state (#1978) 2023-10-18 09:57:27 -07:00
Masen Furer
e15710de17
test_app: cleanup state_name logic and fixup get_sid() call (#1993) 2023-10-18 12:29:24 +02:00
Masen Furer
f6a7eed359
Fix AppHarness tests (#1987)
* test_client_storage: remove race conditions for cookie assignment

Poll for default timeout for cookies to appear in the controlled browser.

* Remove use of deprecated get_token and get_sid in core

Both reflex.app and reflex.state were still using deprecated methods, which
were throwing unsolvable warnings for end users.

* Remove deprecated router functions from integration tests

Mostly removing custom "token" var and replacing with
router.session.client_token.

Also replacing `get_query_params` and `get_current_page` usage as well.

* fix upload tests

Cannot pass substate as main app state, since it blocks us from accessing
"inherited vars"

* state: do NOT reset `router` to default

When calling `.reset` to reset state vars, do NOT reset the router data, as
that could mess up internal event processing.
2023-10-18 01:46:13 +02:00
Thomas Brandého
b1bab1206d
deprecate get_ methods for router_data, use BaseVars instead (#1967) 2023-10-17 09:59:44 -07:00