Commit Graph

1603 Commits

Author SHA1 Message Date
Masen Furer
7fee5d9e8d
Radix 3.0 tweaks (#3257)
* radix themes progress: expose `max` prop

It doesn't work yet, but PR filed for radix-ui/themes:
https://github.com/radix-ui/themes/pull/492

* Move `progress` and `toast` to `_x`

[REF-2779] Expose skeleton and data_list in top level namespace.
2024-05-08 14:02:37 -07:00
benedikt-bartscher
1324947f3c
minor test exp_not_equal fixup (#3256) 2024-05-08 13:34:17 -07:00
benedikt-bartscher
38c46ec4d5
copy background task marker (#3255) 2024-05-08 13:31:20 -07:00
Thomas Brandého
bdcbe006a2
update blank template (#3219)
* update blank template

* update CONTRIBUTING.md

* adjust min_height of main stack

* simplify stuff

* fix import order for blank template and tell ruff to ignore it
2024-05-08 13:30:14 -07:00
Elijah Ahianyo
1d093486b9
[REF-2622] Throw warning for incompatible uvicorn version on windows (#3246) 2024-05-08 10:52:37 -07:00
benedikt-bartscher
f0a772d08c
fix screenshot filenames (#3241) 2024-05-07 19:31:37 -07:00
Masen Furer
6b8a6f353b
icon_button: Icon size should be specified as int pixels, not str (#3247) 2024-05-07 19:31:01 -07:00
Masen Furer
ea0f490030
[REF-2764] dep update 0.5.0 (#3245)
* upgrade to latest pip for in_docker_test_script.sh

* Bump gunicorn to 22.0.0 (security)

Changelog: https://docs.gunicorn.org/en/stable/news.html#id1

use utime to notify workers liveness
migrate setup to pyproject.toml
fix numerous security vulnerabilities in HTTP parser (closing some request smuggling vectors)
parsing additional requests is no longer attempted past unsupported request framing
on HTTP versions < 1.1 support for chunked transfer is refused (only used in exploits)
requests conflicting configured or passed SCRIPT_NAME now produce a verbose error
Trailer fields are no longer inspected for headers indicating secure scheme
support Python 3.12

** Breaking changes **
minimum version is Python 3.7
the limitations on valid characters in the HTTP method have been bounded to Internet Standards
requests specifying unsupported transfer coding (order) are refused by default (rare)
HTTP methods are no longer casefolded by default (IANA method registry contains none affected)
HTTP methods containing the number sign (#) are no longer accepted by default (rare)
HTTP versions < 1.0 or >= 2.0 are no longer accepted by default (rare, only HTTP/1.1 is supported)
HTTP versions consisting of multiple digits or containing a prefix/suffix are no longer accepted
HTTP header field names Gunicorn cannot safely map to variables are silently dropped, as in other software
HTTP headers with empty field name are refused by default (no legitimate use cases, used in exploits)
requests with both Transfer-Encoding and Content-Length are refused by default (such a message might indicate an attempt to perform request smuggling)
empty transfer codings are no longer permitted (reportedly seen with really old & broken proxies)

** SECURITY **
fix CVE-2024-1135

* Remove TYPE_CHECKING guard for pydantic v1 imports

Retain TYPE_CHECKING guard in v1 fallback to force pyright into pydantic.v1 namespace

* Run unit tests with pydantic v1 now that v2 is installed via poetry
2024-05-07 15:15:52 -07:00
Nikhil Rao
940afb2c92
Remove deprecations for 0.5.0 (#3222) 2024-05-07 08:55:42 -07:00
Masen Furer
aa8858b113
Expose color_scheme on TabsTrigger (#3112) 2024-05-06 18:36:44 -07:00
benedikt-bartscher
185ec31a71
do not access state __subclasses__, prevent issues with AppHarness (#3143) 2024-05-06 18:35:25 -07:00
Masen Furer
83371d51d3
[REF-2658] Alembic should use batch mode for autogenerate (#3223) 2024-05-06 18:34:55 -07:00
benedikt-bartscher
b3c06bd139
prevent issues with #3214 (#3237) 2024-05-06 18:34:16 -07:00
Thomas Brandého
57476966f3
add_style api (#3202) 2024-05-06 16:59:11 -07:00
PeterYusuke
d68792f7b3
Add Japanese README.md file (#3234) 2024-05-06 10:50:02 -07:00
Elijah Ahianyo
0838e5ac6a
[REF-2676][REF-2751] Windows Skip ARM devices on bun install + Telemetry (#3212) 2024-05-06 09:50:05 -07:00
Elijah Ahianyo
9c7dbdbc72
[REF-2643] Throw Errors for duplicate Routes (#3155) 2024-05-03 12:15:40 -07:00
Elijah Ahianyo
24d15acae6
Windows Pin Version followup (Use Windows Install Link) (#3193) 2024-05-03 12:14:22 -07:00
Thomas Brandého
a7355962fd
prevent shadowing of computed vars (#3221) 2024-05-03 12:13:57 -07:00
Thomas Brandého
1817c30e22
add toast component (#3186) 2024-05-03 12:09:11 -07:00
Nikhil Rao
7903a1020d
Clean up config and app API (#3197) 2024-05-02 18:15:28 -07:00
Elijah Ahianyo
db47d39979
Windows --frontend-only fix ctrl + c (#3181) 2024-05-01 17:40:27 -07:00
Masen Furer
c636c91c9c
[REF-2273] Implement .setvar special EventHandler (#3163)
* Allow EventHandler args to be partially applied

When an EventHandler is called with an incomplete set of args it creates a
partial EventSpec. This change allows Component._create_event_chain to apply
remaining args from an args_spec to an existing EventSpec to make it
functional.

Instead of requiring the use of `lambda` functions to pass arguments to an
EventHandler, they can now be passed directly and any remaining args defined in
the event trigger will be applied after those.

* [REF-2273] Implement `.setvar` special EventHandler

All State subclasses will now have a special `setvar` EventHandler which
appears in the autocomplete drop down, passes static analysis, and canbe used
to set State Vars in response to event triggers.

Before:
    rx.input(value=State.a, on_change=State.set_a)

After:
    rx.input(value=State.a, on_change=State.setvar("a"))

This reduces the "magic" because `setvar` is statically defined on all State
subclasses.

* Catch invalid Var names and types at compile time

* Add test cases for State.setvar

* Use a proper redis-compatible token
2024-05-01 17:13:55 -07:00
benedikt-bartscher
9ead091fec
Improved get_attribute_access_type tests (#3180)
* test get_attribute_access_type against attrs

* add union and hybrid_property tests
2024-05-01 17:13:23 -07:00
Masen Furer
aeca983290
Allow StatefulComponent to also be rendered via __str__ (#3211)
This makes it easier to implement React "render functions" when wrapping
components that require children to be a callable.
2024-05-01 17:03:40 -07:00
khhan0130
be93b1280c
Update CodeBlock class to accept rx.color in custom_style (#3168) 2024-05-01 14:48:33 -07:00
Elijah Ahianyo
93c4f5024e
Windows Pin Bun version (#3192) 2024-05-01 14:47:03 -07:00
Masen Furer
19d8f6c752
[REF-2523] Implement new public Component API (#3203) 2024-05-01 14:46:27 -07:00
benedikt-bartscher
e31b458a69
allow optional props with None default value (#3179) 2024-05-01 13:33:38 -07:00
benedikt-bartscher
73e9123733
migrate deprecated redis.close to redis.aclose (#3199) 2024-05-01 12:05:00 -07:00
Martin Xu
fe731e385d
custom component install as editable mode (#3200) 2024-04-30 18:12:16 -07:00
Masen Furer
b7e85ecec4
[REF-2574] Default width for Stack (+children) and default padding for container (#3104) 2024-04-30 13:15:57 -07:00
Nikhil Rao
8bb736111a
Change readme back to use 0.4.x (#3188) 2024-04-30 00:50:02 +02:00
Angelina Sheyko
4b6a7ff8e3
Fixed unused kwargs in reflex.App (#3170) 2024-04-29 13:53:27 -07:00
Masen Furer
3564df7620
Implement throttle and debounce as event actions (#3091) 2024-04-26 17:28:51 -07:00
benedikt-bartscher
c2017b295e
Improved get_attribute_access_type (#3156) 2024-04-26 17:28:30 -07:00
Masen Furer
74eaab5e19
Integration testing: Firefox compatibility (#3162)
* Integration testing: Firefox compatibility

* test_client_side_storage: ruff format
2024-04-26 13:44:08 -07:00
Thomas Brandého
92cdc15896
IconButton for color_mode with nice default and a position props to control it (#3165) 2024-04-26 12:08:09 -07:00
Elijah Ahianyo
3a58558166
Bump bun version to 1.1.5 (#3176) 2024-04-26 11:50:51 -07:00
Thomas Brandého
0ef695d842
add default underline for links (#3148) 2024-04-26 11:42:05 -07:00
Masen Furer
0a8aaea599
[REF-2682] Foreach over dict uses Tuple arg value (#3160)
* test_foreach: assert on arg _var_type

* [REF-2682] Foreach over dict uses Tuple arg value

When iterating over a Var with _var_type dict, the resulting arg value
_var_type should be Tuple[key, value] so it can be correctly used with other
var operations.

Fix #3157

* Correct _var_type for iteration over Tuple of multiple types

The arg value when iterating over a tuple could be any of the possible values
mentioned in the annotation.

When only one type is used, the Union collapses to the base type, at least in py3.11

* Add comments
2024-04-25 09:10:55 -07:00
Thomas Brandého
ac36bfc6ea
Radix 3.0 (#3159) 2024-04-25 08:33:29 -07:00
JLDev
ebb0e79232
a little correction in the "es" docs (#3127) 2024-04-24 20:58:10 -07:00
Thomas Brandého
0c0477cffb
extend rx.input allowed types (#3149) 2024-04-24 16:04:56 -07:00
Ogidi Ifechukwu
ce2bd2286e
Refactor upload component and add styled upload component (#3035) 2024-04-24 13:45:22 -07:00
Angelina Sheyko
cd1a30d758
Fixed app name validation (#3146) 2024-04-24 13:32:36 -07:00
Martin Xu
a5f9001cf9
send template info in init telemetry event (#3153) 2024-04-24 06:47:33 -07:00
Thomas Brandého
b084c805d4
sync ruff version in pyproject.toml with the precommit one (#3150) 2024-04-23 16:53:36 -07:00
Jirka Borovec
4d567b7ec1
ruff-format: unify Black with Ruff v0.1 (#2837)
* ruff-format: unify Black with Ruff

* ruff lint.

* v0.1.0

* run precommit

* hand fixing

* fix `not isinstance(...)`

Co-authored-by: Thomas Brandého <thomas.brandeho@gmail.com>

* rev isinstance(...) with noqa

* exclude = ["*.pyi"]

* apply precommit

* apply format

* revert pyi

* fixing

* Fix or

Co-authored-by: Thomas Brandého <thomas.brandeho@gmail.com>

* Update reflex/components/datadisplay/code.pyi

* Apply suggestions from code review

Co-authored-by: Thomas Brandého <thomas.brandeho@gmail.com>

* Update tests/components/core/test_colors.py

* Update reflex/app.py

* Update reflex/app.py

* Update benchmarks/test_benchmark_compile_pages.py

* Update benchmarks/test_benchmark_compile_pages.py

* Update benchmarks/test_benchmark_compile_pages.py

---------

Co-authored-by: Thomas Brandého <thomas.brandeho@gmail.com>
2024-04-23 14:40:06 -07:00
Elijah Ahianyo
8e4d6a4781
[REF-2636]Improve Error message for unsupported event trigger (#3147)
* Improve Error message for unsupported event trigger

* typo fix

* fix ci

* add tests

* Update reflex/components/component.py

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

* fix typo

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2024-04-23 14:36:26 -07:00