From 798b39123e9324ce49dc3827435bb521b3b39fdd Mon Sep 17 00:00:00 2001 From: Daniel Gaspar Date: Fri, 4 Sep 2020 15:11:08 +0100 Subject: [PATCH 1/3] fix: disallow uuid package on jinja2 --- docs/sqllab.rst | 5 ++++- superset/extensions.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/sqllab.rst b/docs/sqllab.rst index b582c53e209e0..27711cbfd0414 100644 --- a/docs/sqllab.rst +++ b/docs/sqllab.rst @@ -73,7 +73,10 @@ Superset's Jinja context: - ``time``: ``time`` - ``datetime``: ``datetime.datetime`` -- ``uuid``: ``uuid`` +- ``uuid1``: ``uuid1`` +- ``uuid3``: ``uuid3`` +- ``uuid4``: ``uuid4`` +- ``uuid5``: ``uuid5`` - ``random``: ``random`` - ``relativedelta``: ``dateutil.relativedelta.relativedelta`` diff --git a/superset/extensions.py b/superset/extensions.py index 06d55c8a17247..bd66bd4e6b755 100644 --- a/superset/extensions.py +++ b/superset/extensions.py @@ -50,7 +50,10 @@ def __init__(self) -> None: "relativedelta": relativedelta, "time": time, "timedelta": timedelta, - "uuid": uuid, + "uuid1": uuid.uuid1, + "uuid3": uuid.uuid3, + "uuid4": uuid.uuid4, + "uuid5": uuid.uuid5, } self._template_processors: Dict[str, Type["BaseTemplateProcessor"]] = {} From b2fa7118d122501c55834e46a3bafb4c8e67ccda Mon Sep 17 00:00:00 2001 From: Daniel Gaspar Date: Fri, 4 Sep 2020 15:37:20 +0100 Subject: [PATCH 2/3] update UPDATING.md --- UPDATING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/UPDATING.md b/UPDATING.md index 47a5dd396e1ec..337093e96d9fd 100644 --- a/UPDATING.md +++ b/UPDATING.md @@ -23,6 +23,8 @@ assists people when migrating to a new version. ## Next +* [10794](https://github.com/apache/incubator-superset/pull/10794): Breaking change: `uuid` python package is not supported on Jinja2 anymore, only uuid functions are expose eg: `uuid1`, `uuid3`, `uuid4`, `uuid5`. + * [10674](https://github.com/apache/incubator-superset/pull/10674): Breaking change: PUBLIC_ROLE_LIKE_GAMMA was removed is favour of the new PUBLIC_ROLE_LIKE so it can be set it whatever role you want. * [10590](https://github.com/apache/incubator-superset/pull/10590): Breaking change: this PR will convert iframe chart into dashboard markdown component, and remove all `iframe`, `separator`, and `markup` slices (and support) from Superset. If you have important data in those slices, please backup manually. From 281b6a5da49d669c18be2627732855e434a7b74b Mon Sep 17 00:00:00 2001 From: Daniel Vaz Gaspar Date: Fri, 4 Sep 2020 15:51:50 +0100 Subject: [PATCH 3/3] Update UPDATING.md Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com> --- UPDATING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPDATING.md b/UPDATING.md index 337093e96d9fd..b533ed7ebe360 100644 --- a/UPDATING.md +++ b/UPDATING.md @@ -23,7 +23,7 @@ assists people when migrating to a new version. ## Next -* [10794](https://github.com/apache/incubator-superset/pull/10794): Breaking change: `uuid` python package is not supported on Jinja2 anymore, only uuid functions are expose eg: `uuid1`, `uuid3`, `uuid4`, `uuid5`. +* [10794](https://github.com/apache/incubator-superset/pull/10794): Breaking change: `uuid` python package is not supported on Jinja2 anymore, only uuid functions are exposed eg: `uuid1`, `uuid3`, `uuid4`, `uuid5`. * [10674](https://github.com/apache/incubator-superset/pull/10674): Breaking change: PUBLIC_ROLE_LIKE_GAMMA was removed is favour of the new PUBLIC_ROLE_LIKE so it can be set it whatever role you want.