mirror of https://github.com/apache/superset.git
chore: remove marshmallow-enum dependency and bump FAB (#24499)
This commit is contained in:
parent
036294a191
commit
0ddc0a6738
|
@ -11,7 +11,7 @@ alembic==1.6.5
|
|||
# via flask-migrate
|
||||
amqp==5.1.0
|
||||
# via kombu
|
||||
apispec[yaml]==3.3.2
|
||||
apispec[yaml]==6.3.0
|
||||
# via flask-appbuilder
|
||||
async-timeout==4.0.2
|
||||
# via redis
|
||||
|
@ -88,7 +88,7 @@ flask==2.2.5
|
|||
# flask-migrate
|
||||
# flask-sqlalchemy
|
||||
# flask-wtf
|
||||
flask-appbuilder==4.3.2
|
||||
flask-appbuilder==4.3.3
|
||||
# via apache-superset
|
||||
flask-babel==1.0.0
|
||||
# via flask-appbuilder
|
||||
|
@ -122,8 +122,6 @@ geographiclib==1.52
|
|||
# via geopy
|
||||
geopy==2.2.0
|
||||
# via apache-superset
|
||||
greenlet==2.0.2
|
||||
# via sqlalchemy
|
||||
gunicorn==20.1.0
|
||||
# via apache-superset
|
||||
hashids==1.3.1
|
||||
|
@ -172,13 +170,10 @@ markupsafe==2.1.1
|
|||
# mako
|
||||
# werkzeug
|
||||
# wtforms
|
||||
marshmallow==3.13.0
|
||||
marshmallow==3.19.0
|
||||
# via
|
||||
# flask-appbuilder
|
||||
# marshmallow-enum
|
||||
# marshmallow-sqlalchemy
|
||||
marshmallow-enum==1.5.1
|
||||
# via flask-appbuilder
|
||||
marshmallow-sqlalchemy==0.23.1
|
||||
# via flask-appbuilder
|
||||
mdurl==0.1.2
|
||||
|
@ -197,8 +192,10 @@ ordered-set==4.1.0
|
|||
packaging==23.1
|
||||
# via
|
||||
# apache-superset
|
||||
# apispec
|
||||
# deprecation
|
||||
# limits
|
||||
# marshmallow
|
||||
pandas==1.5.3
|
||||
# via apache-superset
|
||||
paramiko==2.11.0
|
||||
|
|
|
@ -12,6 +12,10 @@
|
|||
# -r requirements/docker.in
|
||||
gevent==22.10.2
|
||||
# via -r requirements/docker.in
|
||||
greenlet==2.0.2
|
||||
# via
|
||||
# -r requirements/docker.in
|
||||
# gevent
|
||||
psycopg2-binary==2.9.6
|
||||
# via apache-superset
|
||||
zope-event==4.5.0
|
||||
|
|
|
@ -35,7 +35,7 @@ packaging==23.1
|
|||
# pyproject-api
|
||||
# tox
|
||||
pip-compile-multi==2.6.3
|
||||
# via -r integration.in
|
||||
# via -r requirements/integration.in
|
||||
pip-tools==6.13.0
|
||||
# via pip-compile-multi
|
||||
platformdirs==3.5.3
|
||||
|
@ -45,17 +45,22 @@ platformdirs==3.5.3
|
|||
pluggy==1.0.0
|
||||
# via tox
|
||||
pre-commit==3.3.3
|
||||
# via -r integration.in
|
||||
# via -r requirements/integration.in
|
||||
pyproject-api==1.5.1
|
||||
# via tox
|
||||
pyproject-hooks==1.0.0
|
||||
# via build
|
||||
pyyaml==5.4.1
|
||||
# via pre-commit
|
||||
tomli==2.0.1
|
||||
# via
|
||||
# build
|
||||
# pyproject-api
|
||||
# tox
|
||||
toposort==1.10
|
||||
# via pip-compile-multi
|
||||
tox==4.6.1
|
||||
# via -r integration.in
|
||||
# via -r requirements/integration.in
|
||||
virtualenv==20.23.0
|
||||
# via
|
||||
# pre-commit
|
||||
|
|
|
@ -30,7 +30,7 @@ combine_as_imports = true
|
|||
include_trailing_comma = true
|
||||
line_length = 88
|
||||
known_first_party = superset
|
||||
known_third_party =alembic,apispec,backoff,cachelib,celery,click,colorama,cron_descriptor,croniter,cryptography,dateutil,deprecation,flask,flask_appbuilder,flask_babel,flask_caching,flask_compress,flask_jwt_extended,flask_login,flask_migrate,flask_sqlalchemy,flask_talisman,flask_testing,flask_wtf,freezegun,geohash,geopy,holidays,humanize,isodate,jinja2,jwt,markdown,markupsafe,marshmallow,marshmallow_enum,msgpack,nh3,numpy,pandas,parameterized,parsedatetime,pgsanity,pkg_resources,polyline,prison,progress,pyarrow,sqlalchemy_bigquery,pyhive,pyparsing,pytest,pytest_mock,pytz,redis,requests,selenium,setuptools,simplejson,slack,sqlalchemy,sqlalchemy_utils,sqlparse,typing_extensions,urllib3,werkzeug,wtforms,wtforms_json,yaml
|
||||
known_third_party =alembic,apispec,backoff,cachelib,celery,click,colorama,cron_descriptor,croniter,cryptography,dateutil,deprecation,flask,flask_appbuilder,flask_babel,flask_caching,flask_compress,flask_jwt_extended,flask_login,flask_migrate,flask_sqlalchemy,flask_talisman,flask_testing,flask_wtf,freezegun,geohash,geopy,holidays,humanize,isodate,jinja2,jwt,markdown,markupsafe,marshmallow,msgpack,nh3,numpy,pandas,parameterized,parsedatetime,pgsanity,pkg_resources,polyline,prison,progress,pyarrow,sqlalchemy_bigquery,pyhive,pyparsing,pytest,pytest_mock,pytz,redis,requests,selenium,setuptools,simplejson,slack,sqlalchemy,sqlalchemy_utils,sqlparse,typing_extensions,urllib3,werkzeug,wtforms,wtforms_json,yaml
|
||||
multi_line_output = 3
|
||||
order_by_type = false
|
||||
|
||||
|
|
2
setup.py
2
setup.py
|
@ -81,7 +81,7 @@ setup(
|
|||
"cryptography>=39.0.1, <40",
|
||||
"deprecation>=2.1.0, <2.2.0",
|
||||
"flask>=2.2.5, <3.0.0",
|
||||
"flask-appbuilder>=4.3.2, <5.0.0",
|
||||
"flask-appbuilder>=4.3.3, <5.0.0",
|
||||
"flask-caching>=1.10.1, <1.11",
|
||||
"flask-compress>=1.13, <2.0",
|
||||
"flask-talisman>=1.0.0, <2.0",
|
||||
|
|
|
@ -23,7 +23,6 @@ from typing import Any, TYPE_CHECKING
|
|||
from flask_babel import gettext as _
|
||||
from marshmallow import EXCLUDE, fields, post_load, Schema, validate
|
||||
from marshmallow.validate import Length, Range
|
||||
from marshmallow_enum import EnumField
|
||||
|
||||
from superset import app
|
||||
from superset.common.chart_data import ChartDataResultFormat, ChartDataResultType
|
||||
|
@ -153,7 +152,7 @@ openapi_spec_methods_override = {
|
|||
class TagSchema(Schema):
|
||||
id = fields.Int()
|
||||
name = fields.String()
|
||||
type = EnumField(TagTypes, by_value=True)
|
||||
type = fields.Enum(TagTypes, by_value=True)
|
||||
|
||||
|
||||
class ChartEntityResponseSchema(Schema):
|
||||
|
@ -1127,7 +1126,7 @@ class ChartDataQueryObjectSchema(Schema):
|
|||
unknown = EXCLUDE
|
||||
|
||||
datasource = fields.Nested(ChartDataDatasourceSchema, allow_none=True)
|
||||
result_type = EnumField(ChartDataResultType, by_value=True, allow_none=True)
|
||||
result_type = fields.Enum(ChartDataResultType, by_value=True, allow_none=True)
|
||||
|
||||
annotation_layers = fields.List(
|
||||
fields.Nested(AnnotationLayerSchema),
|
||||
|
@ -1369,8 +1368,8 @@ class ChartDataQueryContextSchema(Schema):
|
|||
allow_none=True,
|
||||
)
|
||||
|
||||
result_type = EnumField(ChartDataResultType, by_value=True)
|
||||
result_format = EnumField(ChartDataResultFormat, by_value=True)
|
||||
result_type = fields.Enum(ChartDataResultType, by_value=True)
|
||||
result_format = fields.Enum(ChartDataResultFormat, by_value=True)
|
||||
|
||||
form_data = fields.Raw(allow_none=True, required=False)
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ from typing import Any, Union
|
|||
|
||||
from marshmallow import fields, post_load, pre_load, Schema
|
||||
from marshmallow.validate import Length, ValidationError
|
||||
from marshmallow_enum import EnumField
|
||||
|
||||
from superset.exceptions import SupersetException
|
||||
from superset.tags.models import TagTypes
|
||||
|
@ -174,7 +173,7 @@ class RolesSchema(Schema):
|
|||
class TagSchema(Schema):
|
||||
id = fields.Int()
|
||||
name = fields.String()
|
||||
type = EnumField(TagTypes, by_value=True)
|
||||
type = fields.Enum(TagTypes, by_value=True)
|
||||
|
||||
|
||||
class DashboardGetResponseSchema(Schema):
|
||||
|
|
|
@ -25,7 +25,6 @@ from flask import current_app
|
|||
from flask_babel import lazy_gettext as _
|
||||
from marshmallow import EXCLUDE, fields, pre_load, Schema, validates_schema
|
||||
from marshmallow.validate import Length, ValidationError
|
||||
from marshmallow_enum import EnumField
|
||||
from sqlalchemy import MetaData
|
||||
|
||||
from superset import db, is_feature_enabled
|
||||
|
@ -254,7 +253,7 @@ class DatabaseParametersSchemaMixin: # pylint: disable=too-few-public-methods
|
|||
values=fields.Raw(),
|
||||
metadata={"description": "DB-specific parameters for configuration"},
|
||||
)
|
||||
configuration_method = EnumField(
|
||||
configuration_method = fields.Enum(
|
||||
ConfigurationMethod,
|
||||
by_value=True,
|
||||
metadata={"description": configuration_method_description},
|
||||
|
@ -387,7 +386,7 @@ class DatabaseValidateParametersSchema(Schema):
|
|||
allow_none=True,
|
||||
validate=server_cert_validator,
|
||||
)
|
||||
configuration_method = EnumField(
|
||||
configuration_method = fields.Enum(
|
||||
ConfigurationMethod,
|
||||
by_value=True,
|
||||
required=True,
|
||||
|
|
|
@ -20,7 +20,6 @@ from croniter import croniter
|
|||
from flask_babel import gettext as _
|
||||
from marshmallow import fields, Schema, validate, validates_schema
|
||||
from marshmallow.validate import Length, Range, ValidationError
|
||||
from marshmallow_enum import EnumField
|
||||
from pytz import all_timezones
|
||||
|
||||
from superset.reports.models import (
|
||||
|
@ -168,7 +167,7 @@ class ReportSchedulePostSchema(Schema):
|
|||
}
|
||||
)
|
||||
chart = fields.Integer(required=False, allow_none=True)
|
||||
creation_method = EnumField(
|
||||
creation_method = fields.Enum(
|
||||
ReportCreationMethod,
|
||||
by_value=True,
|
||||
required=False,
|
||||
|
@ -265,7 +264,7 @@ class ReportSchedulePutSchema(Schema):
|
|||
allow_none=True,
|
||||
)
|
||||
chart = fields.Integer(required=False, allow_none=True)
|
||||
creation_method = EnumField(
|
||||
creation_method = fields.Enum(
|
||||
ReportCreationMethod,
|
||||
by_value=True,
|
||||
allow_none=True,
|
||||
|
|
|
@ -23,7 +23,6 @@ from flask_appbuilder.api import safe
|
|||
from flask_appbuilder.security.decorators import permission_name, protect
|
||||
from flask_wtf.csrf import generate_csrf
|
||||
from marshmallow import EXCLUDE, fields, post_load, Schema, ValidationError
|
||||
from marshmallow_enum import EnumField
|
||||
|
||||
from superset.embedded_dashboard.commands.exceptions import (
|
||||
EmbeddedDashboardNotFoundError,
|
||||
|
@ -51,7 +50,7 @@ class UserSchema(PermissiveSchema):
|
|||
|
||||
|
||||
class ResourceSchema(PermissiveSchema):
|
||||
type = EnumField(GuestTokenResourceType, by_value=True, required=True)
|
||||
type = fields.Enum(GuestTokenResourceType, by_value=True, required=True)
|
||||
id = fields.String(required=True)
|
||||
|
||||
@post_load
|
||||
|
|
|
@ -115,7 +115,7 @@ class TestBaseModelRestApi(SupersetTestCase):
|
|||
self.assertEqual(rv.status_code, 200)
|
||||
response = json.loads(rv.data.decode("utf-8"))
|
||||
expected_mutation_spec = {
|
||||
"properties": {"id": {"format": "int32", "type": "integer"}},
|
||||
"properties": {"id": {"type": "integer"}},
|
||||
"type": "object",
|
||||
}
|
||||
self.assertEqual(
|
||||
|
|
|
@ -711,7 +711,11 @@ class TestDatabaseApi(SupersetTestCase):
|
|||
rv = self.client.post(uri, json=database_data)
|
||||
response = json.loads(rv.data.decode("utf-8"))
|
||||
assert response == {
|
||||
"message": {"configuration_method": ["Invalid enum value BAD_FORM"]}
|
||||
"message": {
|
||||
"configuration_method": [
|
||||
"Must be one of: sqlalchemy_form, dynamic_form."
|
||||
]
|
||||
}
|
||||
}
|
||||
assert rv.status_code == 400
|
||||
|
||||
|
@ -1113,7 +1117,11 @@ class TestDatabaseApi(SupersetTestCase):
|
|||
rv = self.client.put(uri, json=database_data)
|
||||
response = json.loads(rv.data.decode("utf-8"))
|
||||
assert response == {
|
||||
"message": {"configuration_method": ["Invalid enum value BAD_FORM"]}
|
||||
"message": {
|
||||
"configuration_method": [
|
||||
"Must be one of: sqlalchemy_form, dynamic_form."
|
||||
]
|
||||
}
|
||||
}
|
||||
assert rv.status_code == 400
|
||||
|
||||
|
@ -2873,7 +2881,6 @@ class TestDatabaseApi(SupersetTestCase):
|
|||
},
|
||||
"port": {
|
||||
"description": "Database port",
|
||||
"format": "int32",
|
||||
"maximum": 65536,
|
||||
"minimum": 0,
|
||||
"type": "integer",
|
||||
|
@ -2948,7 +2955,6 @@ class TestDatabaseApi(SupersetTestCase):
|
|||
},
|
||||
"port": {
|
||||
"description": "Database port",
|
||||
"format": "int32",
|
||||
"maximum": 65536,
|
||||
"minimum": 0,
|
||||
"type": "integer",
|
||||
|
@ -3023,7 +3029,6 @@ class TestDatabaseApi(SupersetTestCase):
|
|||
},
|
||||
"port": {
|
||||
"description": "Database port",
|
||||
"format": "int32",
|
||||
"maximum": 65536,
|
||||
"minimum": 0,
|
||||
"type": "integer",
|
||||
|
|
|
@ -501,7 +501,6 @@ def test_base_parameters_mixin():
|
|||
"database": {"type": "string", "description": "Database name"},
|
||||
"port": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"minimum": 0,
|
||||
"maximum": 65536,
|
||||
"description": "Database port",
|
||||
|
|
|
@ -1249,7 +1249,11 @@ class TestReportSchedulesApi(SupersetTestCase):
|
|||
rv = self.post_assert_metric(uri, report_schedule_data, "post")
|
||||
response = json.loads(rv.data.decode("utf-8"))
|
||||
assert response == {
|
||||
"message": {"creation_method": ["Invalid enum value BAD_CREATION_METHOD"]}
|
||||
"message": {
|
||||
"creation_method": [
|
||||
"Must be one of: charts, dashboards, alerts_reports."
|
||||
]
|
||||
}
|
||||
}
|
||||
assert rv.status_code == 400
|
||||
|
||||
|
|
|
@ -102,7 +102,6 @@ def test_parameters_json_schema() -> None:
|
|||
"http_path": {"type": "string"},
|
||||
"port": {
|
||||
"description": "Database port",
|
||||
"format": "int32",
|
||||
"maximum": 65536,
|
||||
"minimum": 0,
|
||||
"type": "integer",
|
||||
|
|
Loading…
Reference in New Issue