diff --git a/superset/explore/form_data/api.py b/superset/explore/form_data/api.py index 1ab9f1a48791..dc6ee7ea94cc 100644 --- a/superset/explore/form_data/api.py +++ b/superset/explore/form_data/api.py @@ -126,8 +126,6 @@ def post(self) -> Response: return self.response(403, message=str(ex)) except (ChartNotFoundError, DatasetNotFoundError) as ex: return self.response(404, message=str(ex)) - except Exception as ex: - raise ex @expose("/form_data/", methods=["PUT"]) @protect() diff --git a/superset/key_value/cache.py b/superset/key_value/cache.py index 9890bf2349bf..ad396ca60f67 100644 --- a/superset/key_value/cache.py +++ b/superset/key_value/cache.py @@ -14,7 +14,7 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -import pickle + from datetime import datetime, timedelta from hashlib import md5 from typing import Any, Dict, List, Optional diff --git a/superset/utils/cache_manager.py b/superset/utils/cache_manager.py index 87beb6a0e618..e30f1882c23e 100644 --- a/superset/utils/cache_manager.py +++ b/superset/utils/cache_manager.py @@ -15,10 +15,8 @@ # specific language governing permissions and limitations # under the License. import logging -import math from flask import Flask -from flask_babel import gettext as _ from flask_caching import Cache logger = logging.getLogger(__name__) @@ -43,7 +41,7 @@ def _init_cache( if required and cache_type in (None, "SupersetCache"): if cache_type is None: logger.warning( - "Falling back to built-in key-value cache for following " + "Falling back to built-in key-value cache for the following " "cache: `%s`. It is recommended to use `RedisCache`, " "`MemcachedCache` or another dedicated caching backend for " "production deployments",