mirror of https://github.com/apache/superset.git
chore(🦾): bump python flask-session 0.5.0 -> 0.8.0 (#27751)
Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Maxime Beauchemin <maximebeauchemin@gmail.com>
This commit is contained in:
parent
ca47717eb0
commit
0d0e47acf7
|
@ -35,6 +35,9 @@ assists people when migrating to a new version.
|
|||
files for production use cases! While we never really supported
|
||||
or should have tried to support docker-compose for production use cases, we now actively
|
||||
have taken a stance against supporting it. See the PR for details.
|
||||
- [27697](https://github.com/apache/superset/pull/27697) [minor] flask-session bump leads to them
|
||||
deprecating `SESSION_USE_SIGNER`, check your configs as this flag won't do anything moving
|
||||
forward.
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ flask-login==0.6.3
|
|||
# flask-appbuilder
|
||||
flask-migrate==3.1.0
|
||||
# via apache-superset
|
||||
flask-session==0.5.0
|
||||
flask-session==0.8.0
|
||||
# via apache-superset
|
||||
flask-sqlalchemy==2.5.1
|
||||
# via
|
||||
|
@ -214,6 +214,8 @@ mdurl==0.1.2
|
|||
# via markdown-it-py
|
||||
msgpack==1.0.8
|
||||
# via apache-superset
|
||||
msgspec==0.18.6
|
||||
# via flask-session
|
||||
nh3==0.2.17
|
||||
# via apache-superset
|
||||
numba==0.57.1
|
||||
|
|
|
@ -20,6 +20,7 @@ All configuration in this file can be overridden by providing a superset_config
|
|||
in your PYTHONPATH as there is a ``from superset_config import *``
|
||||
at the end of this file.
|
||||
"""
|
||||
# mypy: ignore-errors
|
||||
# pylint: disable=too-many-lines
|
||||
from __future__ import annotations
|
||||
|
||||
|
@ -940,7 +941,7 @@ class CeleryConfig: # pylint: disable=too-few-public-methods
|
|||
}
|
||||
|
||||
|
||||
CELERY_CONFIG = CeleryConfig # pylint: disable=invalid-name
|
||||
CELERY_CONFIG: type[CeleryConfig] = CeleryConfig
|
||||
|
||||
# Set celery config to None to disable all the above configuration
|
||||
# CELERY_CONFIG = None
|
||||
|
@ -1474,7 +1475,6 @@ SESSION_SERVER_SIDE = False
|
|||
# from flask_session import RedisSessionInterface
|
||||
#
|
||||
# SESSION_SERVER_SIDE = True
|
||||
# SESSION_USE_SIGNER = True
|
||||
# SESSION_TYPE = "redis"
|
||||
# SESSION_REDIS = Redis(host="localhost", port=6379, db=0)
|
||||
#
|
||||
|
@ -1704,7 +1704,7 @@ elif importlib.util.find_spec("superset_config") and not is_test():
|
|||
try:
|
||||
# pylint: disable=import-error,wildcard-import,unused-wildcard-import
|
||||
import superset_config
|
||||
from superset_config import * # type: ignore
|
||||
from superset_config import * # noqa: F403, F401
|
||||
|
||||
print(f"Loaded your LOCAL configuration at [{superset_config.__file__}]")
|
||||
except Exception:
|
||||
|
|
|
@ -51,7 +51,7 @@ from superset.viz import BaseViz, viz_types
|
|||
if TYPE_CHECKING:
|
||||
from superset.common.query_context import QueryContext
|
||||
from superset.common.query_context_factory import QueryContextFactory
|
||||
from superset.connectors.sqla.models import BaseDatasource
|
||||
from superset.connectors.sqla.models import SqlaTable
|
||||
|
||||
metadata = Model.metadata # pylint: disable=no-member
|
||||
slice_user = Table(
|
||||
|
@ -139,14 +139,14 @@ class Slice( # pylint: disable=too-many-public-methods
|
|||
return self.slice_name or str(self.id)
|
||||
|
||||
@property
|
||||
def cls_model(self) -> type[BaseDatasource]:
|
||||
def cls_model(self) -> type[SqlaTable]:
|
||||
# pylint: disable=import-outside-toplevel
|
||||
from superset.daos.datasource import DatasourceDAO
|
||||
|
||||
return DatasourceDAO.sources[self.datasource_type]
|
||||
|
||||
@property
|
||||
def datasource(self) -> BaseDatasource | None:
|
||||
def datasource(self) -> SqlaTable | None:
|
||||
return self.get_datasource
|
||||
|
||||
def clone(self) -> Slice:
|
||||
|
@ -163,7 +163,7 @@ class Slice( # pylint: disable=too-many-public-methods
|
|||
|
||||
# pylint: disable=using-constant-test
|
||||
@datasource.getter # type: ignore
|
||||
def get_datasource(self) -> BaseDatasource | None:
|
||||
def get_datasource(self) -> SqlaTable | None:
|
||||
return (
|
||||
db.session.query(self.cls_model)
|
||||
.filter_by(id=self.datasource_id)
|
||||
|
|
|
@ -173,7 +173,7 @@ class TestExportChartsCommand(SupersetTestCase):
|
|||
class TestImportChartsCommand(SupersetTestCase):
|
||||
@patch("superset.utils.core.g")
|
||||
@patch("superset.security.manager.g")
|
||||
def test_import_v1_chart(self, sm_g, utils_g):
|
||||
def test_import_v1_chart(self, sm_g, utils_g) -> None:
|
||||
"""Test that we can import a chart"""
|
||||
admin = sm_g.user = utils_g.user = security_manager.find_user("admin")
|
||||
contents = {
|
||||
|
@ -192,7 +192,7 @@ class TestImportChartsCommand(SupersetTestCase):
|
|||
assert json.loads(chart.params) == {
|
||||
"annotation_layers": [],
|
||||
"color_picker": {"a": 1, "b": 135, "g": 122, "r": 0},
|
||||
"datasource": dataset.uid,
|
||||
"datasource": dataset.uid if dataset else None,
|
||||
"js_columns": ["color"],
|
||||
"js_data_mutator": "data => data.map(d => ({\\n ...d,\\n color: colors.hexToRGB(d.extraProps.color)\\n}));",
|
||||
"js_onclick_href": "",
|
||||
|
@ -228,7 +228,8 @@ class TestImportChartsCommand(SupersetTestCase):
|
|||
dataset = (
|
||||
db.session.query(SqlaTable).filter_by(uuid=dataset_config["uuid"]).one()
|
||||
)
|
||||
assert dataset.table_name == "imported_dataset"
|
||||
table_name = dataset.table_name if dataset else None
|
||||
assert table_name == "imported_dataset"
|
||||
assert chart.table == dataset
|
||||
|
||||
database = (
|
||||
|
|
Loading…
Reference in New Issue