Param 2.4.0 brings first-class static typing support to the entire Param ecosystem — all major parameter types now carry precise type information that flows through to your IDE and type checker, with types inferred directly from your existing parameter declarations. The release also adds a lazy mode to reactive expressions (rx) and includes performance optimizations that speed up parameter initialization in large class hierarchies.
Many thanks to @philippjfr, @hoxbro, @maximlt and @camriddell for their contributions to this release.
🚀 Features
- Implement descriptor factory typing system by implementing
Parametergenerics (Parameter[_T]) and add typed overloads for all major Parameter subclasses and add typing for public APIs (#1066, #1112, #1130, #1131, #1132, #1134, #1136, #1137, #1141) - Add
py.typedPEP 561 marker so type checkers automatically recognize Param's inline annotations without requiring separate stubs (#1066) - Add
rx(..., lazy=)argument (#1106)
⚡ Performance
- Add caches to speed up
Parameterinitialization (#1124) - Optimize
Parameterinstantiation (#1122) - Implement custom
__copy__forParameterto speed up instanceParametercreation (#1128)
🐛 Bug Fixes
- Use
re.searchforparam.Stringregex check (#1142)
📚 Documentation
- Add Typing user guide (#1139)