Add TypedDict to slack_sdk.models classes
The Client treats Json-format Request Bodies as dict, but can benefit from completion and static analysis if TypedDict is supported.
Category (place an x in each of the [ ])
- [x] slack_sdk.web.WebClient (sync/async) (Web API client)
- [x] slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
- [x] slack_sdk.models (UI component builders)
- [ ] slack_sdk.oauth (OAuth Flow Utilities)
- [ ] slack_sdk.socket_mode (Socket Mode client)
- [ ] slack_sdk.audit_logs (Audit Logs API client)
- [ ] slack_sdk.scim (SCIM API client)
- [ ] slack_sdk.rtm (RTM client)
- [ ] slack_sdk.signature (Request Signature Verifier)
Hi @yassun7010, thanks for sharing the idea!
TypedDict is a relatively new feature introduced in Python 3.8, and this SDK still supports Python 3.6 and 3.7. We know these older versions are already EOLed, but in reality, many apps need a certain amount of time to upgrade to a newer runtime. Therefore, we don't immediately cut support for those versions.
We may consider dropping support for the old versions starting with the next major release (v4), but we don't plan to bump the major version in the short term. We will keep this issue open as a future enhancement idea. Thanks again for sharing this!
@seratch Thanks for explaining the situation.
Looking forward to the v4 release ;)