* Show file and line number in deprecation warnings
* Exclude modules/packages by import
Less bespoke method of considering some packages to be part of the framework
and passed over when finding user code.
* [ENG-4351] Add mapping for lucide icons
For icon names that don't auto-translate to the correct lucide tag name,
provide manual override.
Fix#4621
* account for new mapping in unit tests
Instead of potentially defining `_LANGUAGE` constant twice in a component,
simply pass the language prop directly to the hook generator function.
If no language is passed, then it defaults to `_LANGUAGE`, which continues to
work for markdown component_map use case.
* unbreak link _hover
* add a test to catch the error
* change tmp path for harness
* add () to fixture
* add spacer to avoid initial hover
* only install chromium browser for faster ci
---------
Co-authored-by: Lendemor <thomas.brandeho@gmail.com>
* Enable automatic retry on redis errors
ExponentialBackoff 3x retry for BusyLoadingError, ConnectionError, and TimeoutError
* retry on any redis error
* Use default single-retry for any RedisError
Using the default Retry means that async and sync clients get the appropriate type of Retry
* use position in vardata to mark internal hooks
* update all render to use position
* use macros for rendering
* reduce number of iterations over hooks during rendering
* cleanup code and add typing
* add __future__
* use new macros to render component maps in markdown
* remove calls to _get_all_hooks_internal
* fix typo
* forgot to replace this
* unnecessary expand in utils.py
DeprecationWarning: Default non-cached rx.var has been deprecated in version
0.6.8 the default value will be `@rx.var(cache=True)` in a future release. To
retain uncached var, explicitly pass `@rx.var(cache=False)`. It will be
completely removed in 0.7.0
* [ENG-2157] [Refix] Allow `rx.download` to resolve `rx.get_upload_url`
Update the special case in a way that works with the new Var system and its
unstoppable determination to concatenate strings instead of using template
string
This has been broken since 0.6.0, so a regression test was added to avoid
future inadvertant breakage.
Fix#2812 (again)
* use safer indirect eval
* Proxy backend requests on '/' to the frontend
If the optional extra `proxy` is installed, then the backend can handle all
requests by proxy unrecognized routes to the frontend nextjs server.
* Update lock file
* pre-commit fu
* AppHarness: set config frontend_port and backend_port
* integration: frontend port and backend port should return the same content
with proxying enabled by default in dev mode, both frontend and backend ports
on / should return the same content.
* Retry up to 100 times when proxying to frontend
* Reduce retry attempts to 25
Fix log level passing to subprocess
* scripts/wait_for_listening_port: primarily check HTTP responses
if the port is up or not, we don't really care... the HTTP request needs to
work and not return errors
* aiohttp is an optional dep
* adapt integration.sh for --backend-only (counter integration test)
* woops
* windows WTF?
* scratching my head 🎄
* double WTF windows
* Fix remaining integration tests
The default behavior for EventSpec is to treat the spec as a partial, wherein
if additional unfilled arguments are available, and the event trigger wants to
pass additional arguments, they will be applied positionally.
However, it never makes sense to fill in `callback` with an event trigger arg.
Therefore, if the callback is not provided initially, set it to None explicitly
so that some invalid value cannot be added later.
* BaseState.get_var_value helper to get a value from a Var
When given a state Var or a LiteralVar, retrieve the actual value associated
with the Var.
For state Vars, the returned value is directly tied to the associated state and
can be modified.
Modifying LiteralVar values or ComputedVar values will have no useful effect.
* Use Var[VAR_TYPE] annotation to take advantage of generics
This requires rx.Field to pass typing where used.
* Add case where get_var_value gets something that's not a var
* [ENG-4083] Track internal changes in dataclass instances
Create a dynamic subclass of MutableProxy with `__dataclass_fields__` set
according to the dataclass being wrapped.
* support dataclasses.asdict on MutableProxy instances
The ability to convert `EventType` arguments into `EventChain` is crucial for
wrapping JS libraries that need to pass event handlers via hooks or
other non-component centric interfaces.
Improve typing such that wrapped components accepting `EventType` arguments can
be directly converted to `EventChain` / `EventChainVar` to be rendered as JS
code.
* fix memoized event trigger order
* allow to declare deps in event signature for memoized event triggers
* clean up the code to pass tests
* handle position of hooks
* clean up code
* revert test changes
* add future annotations
* remove non-necessary stuff
* reuse data_callback name if already set during first call to add_hooks
* remove HookVar and use Var with VarData instead
* remove test change
* readd removed line
* fix order of stmt for cleaner code
* fix typing
* something broke during the merge I guess
* remove hack and pass proper const for position
* oops, bad syntax in jinja
* use "hook_position" instead of "hook_positions"
match the name of the enum
---------
Co-authored-by: Masen Furer <m_github@0x26.net>
* add datetime var operations
* add future annotations
* add LiteralDatetimeVar
* remove methods that don't apply
* fix serialization
* add unit and integrations test
* oops, forgot to commit that important change