From dca50c6b2939f2917b73fb5c4326bc23ca31b015 Mon Sep 17 00:00:00 2001 From: Erik Cederstrand Date: Mon, 26 Sep 2022 10:02:48 +0200 Subject: [PATCH 1/6] Unpin slackclient dependency which is now deprecated. Move to it's successor slack_sdk with fewer dependencies. --- requirements/base.txt | 22 +--------------------- setup.py | 2 +- superset/reports/notifications/slack.py | 4 ++-- superset/tasks/slack_util.py | 6 +++--- 4 files changed, 7 insertions(+), 27 deletions(-) diff --git a/requirements/base.txt b/requirements/base.txt index cf257c4bdbdfa..58c7890a87608 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -7,21 +7,14 @@ # -e file:. # via -r requirements/base.in -aiohttp==3.8.1 - # via slackclient -aiosignal==1.2.0 - # via aiohttp alembic==1.6.5 # via flask-migrate amqp==5.1.0 # via kombu apispec[yaml]==3.3.2 # via flask-appbuilder -async-timeout==4.0.2 - # via aiohttp attrs==21.2.0 # via - # aiohttp # jsonschema babel==2.9.1 # via flask-babel @@ -39,8 +32,6 @@ celery==5.2.2 # via apache-superset cffi==1.14.6 # via cryptography -charset-normalizer==2.0.4 - # via aiohttp click==8.0.4 # via # apache-superset @@ -110,10 +101,6 @@ flask-wtf==0.14.3 # via # apache-superset # flask-appbuilder -frozenlist==1.3.0 - # via - # aiohttp - # aiosignal func-timeout==4.3.5 # via apache-superset geographiclib==1.52 @@ -135,7 +122,6 @@ humanize==3.11.0 idna==3.2 # via # email-validator - # yarl isodate==0.6.0 # via apache-superset itsdangerous==2.1.1 @@ -172,10 +158,6 @@ marshmallow-sqlalchemy==0.23.1 # via flask-appbuilder msgpack==1.0.2 # via apache-superset -multidict==5.1.0 - # via - # aiohttp - # yarl numpy==1.22.1 # via # apache-superset @@ -259,7 +241,7 @@ six==1.16.0 # python-dateutil # sqlalchemy-utils # wtforms-json -slackclient==2.5.0 +slack_sdk==3.18.3 # via apache-superset sqlalchemy==1.4.36 # via @@ -301,8 +283,6 @@ wtforms==2.3.3 # wtforms-json wtforms-json==0.3.3 # via apache-superset -yarl==1.6.3 - # via aiohttp # The following packages are considered to be unsafe in a requirements file: # setuptools diff --git a/setup.py b/setup.py index e62f8cdfa78af..b406a1fe87434 100644 --- a/setup.py +++ b/setup.py @@ -114,7 +114,7 @@ def get_git_sha() -> str: "redis", "selenium>=3.141.0", "simplejson>=3.15.0", - "slackclient==2.5.0", # PINNED! slack changes file upload api in the future versions + "slack_sdk>=3.1.1", "sqlalchemy>=1.4, <2", "sqlalchemy-utils>=0.38.3, <0.39", "sqlparse==0.3.0", # PINNED! see https://github.com/andialbrecht/sqlparse/issues/562 diff --git a/superset/reports/notifications/slack.py b/superset/reports/notifications/slack.py index d4bed7fed8063..2ac311c7fbac6 100644 --- a/superset/reports/notifications/slack.py +++ b/superset/reports/notifications/slack.py @@ -22,8 +22,8 @@ import backoff from flask_babel import gettext as __ -from slack import WebClient -from slack.errors import SlackApiError, SlackClientError +from slack_sdk import WebClient +from slack_sdk.errors import SlackApiError, SlackClientError from superset import app from superset.reports.models import ReportRecipientType diff --git a/superset/tasks/slack_util.py b/superset/tasks/slack_util.py index 2f44d92605272..652fd89b6f589 100644 --- a/superset/tasks/slack_util.py +++ b/superset/tasks/slack_util.py @@ -23,9 +23,9 @@ import backoff from flask import current_app -from slack import WebClient -from slack.errors import SlackApiError -from slack.web.slack_response import SlackResponse +from slack_sdk import WebClient +from slack_sdk.errors import SlackApiError +from slack_sdk.web.slack_response import SlackResponse # Globals logger = logging.getLogger("tasks.slack_util") From 3299f029cf06b584cc0ce10116b99fc0cc349822 Mon Sep 17 00:00:00 2001 From: Erik Cederstrand Date: Mon, 26 Sep 2022 10:23:43 +0200 Subject: [PATCH 2/6] Make holidays dep open-ended, missed in #21091. While here, also make tabulate dep open-ended. --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index b406a1fe87434..0ba2356abd787 100644 --- a/setup.py +++ b/setup.py @@ -94,7 +94,7 @@ def get_git_sha() -> str: "graphlib-backport", "gunicorn>=20.1.0", "hashids>=1.3.1, <2", - "holidays==0.14.2", + "holidays>=0.14.2", "humanize", "isodate", "markdown>=3.0", @@ -118,7 +118,7 @@ def get_git_sha() -> str: "sqlalchemy>=1.4, <2", "sqlalchemy-utils>=0.38.3, <0.39", "sqlparse==0.3.0", # PINNED! see https://github.com/andialbrecht/sqlparse/issues/562 - "tabulate==0.8.9", + "tabulate>=0.8.9", # needed to support Literal (3.8) and TypeGuard (3.10) "typing-extensions>=3.10, <4", "wtforms-json", From e493f2224f3e1e0f7feeeed994146aabd036f54f Mon Sep 17 00:00:00 2001 From: Erik Cederstrand Date: Mon, 26 Sep 2022 12:14:31 +0200 Subject: [PATCH 3/6] Add upper bounds Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com> --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 0ba2356abd787..4aafc53885685 100644 --- a/setup.py +++ b/setup.py @@ -114,7 +114,7 @@ def get_git_sha() -> str: "redis", "selenium>=3.141.0", "simplejson>=3.15.0", - "slack_sdk>=3.1.1", + "slack_sdk>=3.1.1, <4", "sqlalchemy>=1.4, <2", "sqlalchemy-utils>=0.38.3, <0.39", "sqlparse==0.3.0", # PINNED! see https://github.com/andialbrecht/sqlparse/issues/562 From 53f21a723dcb94238808623b1a64e28e922356f0 Mon Sep 17 00:00:00 2001 From: Erik Cederstrand Date: Mon, 26 Sep 2022 12:14:46 +0200 Subject: [PATCH 4/6] Add upper bounds Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com> --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 4aafc53885685..e83fd221054d2 100644 --- a/setup.py +++ b/setup.py @@ -118,7 +118,7 @@ def get_git_sha() -> str: "sqlalchemy>=1.4, <2", "sqlalchemy-utils>=0.38.3, <0.39", "sqlparse==0.3.0", # PINNED! see https://github.com/andialbrecht/sqlparse/issues/562 - "tabulate>=0.8.9", + "tabulate>=0.8.9, <0.9", # needed to support Literal (3.8) and TypeGuard (3.10) "typing-extensions>=3.10, <4", "wtforms-json", From ca84554aac0718bd26b24ddae6951679beda87c9 Mon Sep 17 00:00:00 2001 From: Erik Cederstrand Date: Mon, 26 Sep 2022 13:42:16 +0200 Subject: [PATCH 5/6] Bump holidays and add upper limit Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com> --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e83fd221054d2..caca3e3cf8019 100644 --- a/setup.py +++ b/setup.py @@ -94,7 +94,7 @@ def get_git_sha() -> str: "graphlib-backport", "gunicorn>=20.1.0", "hashids>=1.3.1, <2", - "holidays>=0.14.2", + "holidays>=0.16.0, <0.17", "humanize", "isodate", "markdown>=3.0", From db7688bd9661576d2df99f5431eec3fe80a64ce2 Mon Sep 17 00:00:00 2001 From: Erik Cederstrand Date: Mon, 26 Sep 2022 14:59:52 +0200 Subject: [PATCH 6/6] Update base.txt after ca84554a --- requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/base.txt b/requirements/base.txt index 58c7890a87608..5984c38d3022c 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -115,7 +115,7 @@ gunicorn==20.1.0 # via apache-superset hashids==1.3.1 # via apache-superset -holidays==0.14.2 +holidays==0.16.0 # via apache-superset humanize==3.11.0 # via apache-superset