python-slack-sdk icon indicating copy to clipboard operation
python-slack-sdk copied to clipboard

Add TypedDict to slack_sdk.models classes

Open ya7010 opened this issue 1 year ago • 2 comments

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)

ya7010 avatar Jun 23 '24 02:06 ya7010

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 avatar Jun 24 '24 13:06 seratch

@seratch Thanks for explaining the situation.

Looking forward to the v4 release ;)

ya7010 avatar Jun 24 '24 17:06 ya7010