From 863d9a20ce22e63843848a76ffcde5c139674be5 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Thu, 21 Sep 2023 23:11:39 +0200 Subject: [PATCH] Undeprecate comma-separated list of expansion (#1707) --- news/1696.bugfix | 1 + src/plone/restapi/serializer/expansion.py | 9 ++------- 2 files changed, 3 insertions(+), 7 deletions(-) create mode 100644 news/1696.bugfix diff --git a/news/1696.bugfix b/news/1696.bugfix new file mode 100644 index 0000000000..39b4c8adee --- /dev/null +++ b/news/1696.bugfix @@ -0,0 +1 @@ +Undeprecate comma separated expansion parameters (that were deprecated in plone.restapi 8) @tisto \ No newline at end of file diff --git a/src/plone/restapi/serializer/expansion.py b/src/plone/restapi/serializer/expansion.py index b7d10fa303..6c0db68267 100644 --- a/src/plone/restapi/serializer/expansion.py +++ b/src/plone/restapi/serializer/expansion.py @@ -1,19 +1,14 @@ from plone.restapi.interfaces import IExpandableElement from zope.component import getAdapters -import warnings - def expandable_elements(context, request): """Returns a dict containing all expandable elements.""" expands = request.form.get("expand", []) if isinstance(expands, str): if "," in expands: - # deprecated use of expands (with commas) - warnings.warn( - "``expand`` as a string parameter separated with commas is deprecated and will be removed in plone.restapi 9.0. Use ``expand:list`` instead.", - DeprecationWarning, - ) + # use of expands (with commas) was deprecated in plone.restapi 8 + # undeprecated with plone.restapi 9 expands = expands.split(",") else: # allow still the use of non marked :list parameters present