* Throw warnings when Redis lock is held for more than the allowed threshold
* initial tests
* fix tests and address comments
* fix tests fr, and use pydantic validators
* darglint fix
* increase lock expiration in tests to 2500
* remove print statement
---------
Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
* Avoid double JSON encode/decode for socket.io
socket.io (python and js) already has a built in mechanism for JSON encoding
and decoding messages over the websocket. To use it, we pass a custom `json`
namespace which uses `format.json_dumps` (leveraging reflex serializers) to encode the
messages. This avoids sending a JSON-encoded string of JSON over the wire, and
reduces the number of serialization/deserialization passes over the message
data.
The side benefit is that debugging websocket messages in browser tools displays
the parsed JSON hierarchy and is much easier to work with.
* JSON5.parse in on_upload_progress handler responses
* add eradicate rules for commented out code
* remove output change
* fix pyi messed up indent
* fix pyi again
* fix layout docstring
* fix pyi_generator to remove commented out props from docs
* fix pyi_generator and regenerate some pyi
* fix double strip
* update all pyi
* try to fix stuff in pyi_gen
* whatever
* remove that maybe? i don't know
* fix that shit?
* fix more shit, idk
* better not see you ever again, extra line
* fix: handle default_factory in get_attribute_access_type, add tests for sqla dataclasses
* only test classes which have default_factory + add test for no default
* [ENG-3953] Support pydantic BaseModel (v1 and v2) as state var
Provide serializers and mutable proxy tracking for pydantic models directly.
* conditionally define v2 serializer
Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
* Add `MutableProxy._is_mutable_value` to avoid duplicate logic
* Conditionally import BaseModel to handle older pydantic v1 versions
* pre-commit fu
---------
Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
* Rework Init workflow
* minor format
* refactor
* add comments
* fix pyright alongside some improvements
* add demolink for blank template
* fix darglint
* Add more templates and keep template name in kebab case
* revert getting other templates since we'll use the submodules approach
* remove debug statement
* Improvements based on standup comments
* Add redirect logic
* changes based on new flow
---------
Co-authored-by: Masen Furer <m_github@0x26.net>
* Handle Var passed to `rx.toast`
If the user provides a `Var` for `message` then apply it as `props["title"]` to
avoid a var operations error.
* remove unnecessary parentheses
* remove weird hacks
* get it right pyright
---------
Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
* add typing to function vars
* import ParamSpec from typing_extensions
* remove ellipsis as they are not supported in 3.9
* try importing everything from extensions
* special case 3.9
* don't use Any from extensions
* get typevar from extensions
* allow for event handlers to ignore args
* use a constant
* dang it darglint
* forgor
* keep the tests but move them to valid place
* add metainfo to keyevent
* format code
* fix pyi files
* generate all prefixes of event types
* change format rule
* fix and test bug in config env loading
* streamline env var interpretation with @adhami3310
* improve error messages, fix invalid value for TELEMETRY_ENABLED
* just a small hint
* ruffing
* fix typo from review
* refactor - ruff broke the imports..
* cleanup imports
* more
* add internal and enum env var support
* ruff cleanup
* more global imports
* revert telemetry, it lives in rx.Config
* minor fixes/cleanup
* i missed some refs
* fix darglint
* reload config is internal
* fix EnvVar name
* add test for EnvVar + minor typing improvement
* bool tests
* was this broken?
* retain old behavior
* migrate APP_HARNESS_HEADLESS to new env var system
* migrate more APP_HARNESS env vars to new config system
* migrate SCREENSHOT_DIR to new env var system
* refactor EnvVar.get to be a method
* readd deleted functions and deprecate them
* improve EnvVar api, cleanup RELOAD_CONFIG question
* move is_prod_mode back to where it was
* improve object var symantics
* add case for serializers
* check against serializer with to = dict
* add tests
* fix typing issues
* remove default value
* older version of python doesn't have assert type
* add base to rx field cases
* get it from typing_extension
* Refactor initialize_gitignore to support list type for files_to_ignore and improve current ignore handling. Dont sort the gitignore file.
* more consistent list comprehension var
* raise error when get package manager is not found
* add escape hatch
* handle installing frontend packages more gracefully
* fix no return
* dang it darglint
* type check for event handler if spec arg are typed
* fix the typecheck logic
* rearrange logic pieces
* add try except
* add try except around compare
* change form and improve type checking
* print key instead
* dang it darglint
* change wording
* add basic test to cover it
* add a slightly more complicated test
* challenge it a bit by doing small capital list
* add multiple argspec
* fix slider event order
* i hate 3.9
* add note for UnionType
* move function to types
* add a test for type hint is subclass
* make on submit dict str any
* add testing for dict cases
* add check against any
* accept dict str str
* bruh i used i twice
* escape strings and print actual error message
* disable the error and print deprecation warning instead
* disable tests
* fix doc message
---------
Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
* Shiki codeblock support decorations
* add decorations to useEffect
* fix pyright
* validate decorations dict
* Fix exception message plus unit tests
* possible test fix
* fix pyright
* possible tests fix
* cast decorations before creating codeblock
* `plain` is not a valid theme
* pyi fix
* address PR comment
* use $ syntax
* missing test case change
* try being a little smart
* improve merge imports logic
* add public as well
* oops missed that one
* last one there
* add on progress typing to react player
* fix pyi file
* have the pyi here as well
* more pyi changes
* fix imports
* run pyi
* for some reason it want event on three lines no clue why
* simplify case for when type is in the same module
* run pyi
* remove last missing type for datadisplay
* move all environment variables to the same place
* reorder things around
* move more variables to environment
* remove cyclical imports
* forgot default value for field
* for some reason type hints aren't being interpreted
* put the field type *before* not after
* make it get
* move a bit more
* add more fields
* move reflex dir
* add return
* put things somewhere else
* add custom error