scrapinghub / slackbot

A chat bot for Slack (https://slack.com).
MIT License
1.26k stars 395 forks source link

Migrate from slacker to slack-sdk #229

Open jacobtruman opened 2 years ago

jacobtruman commented 2 years ago

A newly created legacy bot token fails to authenticate using the older auth method used by the slacker module. The rtm.start method has also been deprecated, so migrated to rtm.connect. The slack-sdk module also provides blocks support.

Resolves #227. Resolves #210. Resolves #209.

alpine-digger commented 2 years ago

Please could you merge this PR. Or is there something preventing it?

jacobtruman commented 2 years ago

Please could you merge this PR. Or is there something preventing it?

I would if I could, I am not real sure who all has merge rights for this repo...

amuraru commented 2 years ago

/cc @lucywang000

jacobtruman commented 2 years ago

/cc @lins05

jacobtruman commented 2 years ago

/cc @jtatum

tobias-urdin commented 2 years ago

I really wished I checked the PR page earlier... wasted time on https://github.com/scrapinghub/slackbot/pull/230 will close in favor of this one, still using https://github.com/scrapinghub/slackbot/pull/230 in production until this is merged and released.

jacobtruman commented 2 years ago

@tobias-urdin I have more or less given up hope that anyone will merge this PR and basically pulled the functionality I need into my own project - you might have to do the same :(

lior-parsi commented 2 years ago

can anyone merge this?

amuraru commented 2 years ago

I merged this in my fork at https://github.com/amuraru/slackbot I am also maintaining slackbotng pypi package built out of that fork for those who may be interested

vumdao commented 2 years ago

@amuraru thanks for your help in this issue, hope there will be permanent fix for this

daveluong commented 2 years ago

@amuraru Thanks for the fork. I'm encountering this error, do you happen to know why?

(env) jenkins@jenkins-slave-01:/opt/bot/jobs$ pip install -r requirements.txt
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
Requirement already satisfied: certifi==2017.7.27.1 in ./env/lib/python3.5/site-packages (from -r requirements.txt (line 1)) (2017.7.27.1)
Requirement already satisfied: chardet==3.0.4 in ./env/lib/python3.5/site-packages (from -r requirements.txt (line 2)) (3.0.4)
Requirement already satisfied: idna==2.6 in ./env/lib/python3.5/site-packages (from -r requirements.txt (line 3)) (2.6)
Requirement already satisfied: requests==2.18.4 in ./env/lib/python3.5/site-packages (from -r requirements.txt (line 4)) (2.18.4)
Requirement already satisfied: six==1.10.0 in ./env/lib/python3.5/site-packages (from -r requirements.txt (line 5)) (1.10.0)
Collecting slackbotng==1.1.2
  Using cached slackbotng-1.1.2-py2.py3-none-any.whl (16 kB)
Requirement already satisfied: slacker==0.9.50 in ./env/lib/python3.5/site-packages (from -r requirements.txt (line 7)) (0.9.50)
Requirement already satisfied: urllib3==1.22 in ./env/lib/python3.5/site-packages (from -r requirements.txt (line 8)) (1.22)
Requirement already satisfied: websocket-client==0.44.0 in ./env/lib/python3.5/site-packages (from -r requirements.txt (line 9)) (0.44.0)
INFO: pip is looking at multiple versions of six to determine which version is compatible with other requirements. This could take a while.
Collecting six==1.10.0
  Using cached six-1.10.0-py2.py3-none-any.whl (10 kB)
INFO: pip is looking at multiple versions of requests to determine which version is compatible with other requirements. This could take a while.
Collecting requests==2.18.4
  Using cached requests-2.18.4-py2.py3-none-any.whl (88 kB)
INFO: pip is looking at multiple versions of idna to determine which version is compatible with other requirements. This could take a while.
Collecting idna==2.6
  Using cached idna-2.6-py2.py3-none-any.whl (56 kB)
INFO: pip is looking at multiple versions of chardet to determine which version is compatible with other requirements. This could take a while.
Collecting chardet==3.0.4
  Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
INFO: pip is looking at multiple versions of certifi to determine which version is compatible with other requirements. This could take a while.
Collecting certifi==2017.7.27.1
  Using cached certifi-2017.7.27.1-py2.py3-none-any.whl (349 kB)
ERROR: Could not find a version that satisfies the requirement slack-sdk (from slackbotng)
ERROR: No matching distribution found for slack-sdk
jacobtruman commented 2 years ago

@amuraru Thanks for the fork. I'm encountering this error, do you happen to know why?

(env) jenkins@jenkins-slave-01:/opt/bot/jobs$ pip install -r requirements.txt
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
Requirement already satisfied: certifi==2017.7.27.1 in ./env/lib/python3.5/site-packages (from -r requirements.txt (line 1)) (2017.7.27.1)
Requirement already satisfied: chardet==3.0.4 in ./env/lib/python3.5/site-packages (from -r requirements.txt (line 2)) (3.0.4)
Requirement already satisfied: idna==2.6 in ./env/lib/python3.5/site-packages (from -r requirements.txt (line 3)) (2.6)
Requirement already satisfied: requests==2.18.4 in ./env/lib/python3.5/site-packages (from -r requirements.txt (line 4)) (2.18.4)
Requirement already satisfied: six==1.10.0 in ./env/lib/python3.5/site-packages (from -r requirements.txt (line 5)) (1.10.0)
Collecting slackbotng==1.1.2
  Using cached slackbotng-1.1.2-py2.py3-none-any.whl (16 kB)
Requirement already satisfied: slacker==0.9.50 in ./env/lib/python3.5/site-packages (from -r requirements.txt (line 7)) (0.9.50)
Requirement already satisfied: urllib3==1.22 in ./env/lib/python3.5/site-packages (from -r requirements.txt (line 8)) (1.22)
Requirement already satisfied: websocket-client==0.44.0 in ./env/lib/python3.5/site-packages (from -r requirements.txt (line 9)) (0.44.0)
INFO: pip is looking at multiple versions of six to determine which version is compatible with other requirements. This could take a while.
Collecting six==1.10.0
  Using cached six-1.10.0-py2.py3-none-any.whl (10 kB)
INFO: pip is looking at multiple versions of requests to determine which version is compatible with other requirements. This could take a while.
Collecting requests==2.18.4
  Using cached requests-2.18.4-py2.py3-none-any.whl (88 kB)
INFO: pip is looking at multiple versions of idna to determine which version is compatible with other requirements. This could take a while.
Collecting idna==2.6
  Using cached idna-2.6-py2.py3-none-any.whl (56 kB)
INFO: pip is looking at multiple versions of chardet to determine which version is compatible with other requirements. This could take a while.
Collecting chardet==3.0.4
  Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
INFO: pip is looking at multiple versions of certifi to determine which version is compatible with other requirements. This could take a while.
Collecting certifi==2017.7.27.1
  Using cached certifi-2017.7.27.1-py2.py3-none-any.whl (349 kB)
ERROR: Could not find a version that satisfies the requirement slack-sdk (from slackbotng)
ERROR: No matching distribution found for slack-sdk

@daveluong the slack sdk is only for python >= 3.6 - you appear to be using python 3.5

lins05 commented 1 year ago

Thanks for the patch, it looks excellent. I'll take a look soon.

hawkeye217 commented 1 year ago

Any news on when this might be merged?