Skip to content

Commit

Permalink
Add deprecation notice to Slack and SlackRTM backends (#1526)
Browse files Browse the repository at this point in the history
* fix: add deprecation notice to Slack backend

* fix: add deprecation notice to SlackRTM backend

* docs: Add backend deprecation to CHANGES
  • Loading branch information
sijis authored Dec 11, 2021
1 parent be469b1 commit db9e0bc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ fixes:
- chore: various minor formatting improvements (#1541)
- docs: update spark plugin reference (#1546)
- fix: python 2 version references in docs and init template (#1543)
- backends: deprecate built-in Slack and SlackRTM (#1526)

v6.1.8 (2021-06-21)
-------------------
Expand Down
6 changes: 6 additions & 0 deletions errbot/backends/slack.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,12 @@ def update_alternate_prefixes(self):
log.debug("Converted bot_alt_prefixes: %s", self.bot_config.BOT_ALT_PREFIXES)

def serve_once(self):
log.warning(
"This backend is deprecated and will be removed in a future release."
" No future updates, bug fixes or enhancements will be included."
" We strongly advise migrating to SlackV3, which is available"
" at https://github.com/errbotio/err-backend-slackv3."
)
self.sc = SlackClient(self.token, proxies=self.proxies)

log.info("Verifying authentication token")
Expand Down
6 changes: 6 additions & 0 deletions errbot/backends/slack_rtm.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,12 @@ def serve_presences(**payload):
self._presence_change_event_handler(payload["web_client"], payload["data"])

def serve_forever(self):
log.warning(
"This backend is deprecated and will be removed in a future release."
" No future updates, bug fixes or enhancements will be included."
" We strongly advise migrating to SlackV3, which is available"
" at https://github.com/errbotio/err-backend-slackv3."
)
self.sc = RTMClient(token=self.token, proxy=self.proxies)

@RTMClient.run_on(event="open")
Expand Down

0 comments on commit db9e0bc

Please sign in to comment.