From 3e3f58a0a3780addf59a8862c957a0f15038b1a1 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Thu, 21 Sep 2023 23:15:10 +0200 Subject: [PATCH] Undeprecate token param on vocabularies endpoint (#1708) --- news/1697.bugfix | 1 + src/plone/restapi/serializer/vocabularies.py | 8 ++------ 2 files changed, 3 insertions(+), 6 deletions(-) create mode 100644 news/1697.bugfix diff --git a/news/1697.bugfix b/news/1697.bugfix new file mode 100644 index 0000000000..3789f81a13 --- /dev/null +++ b/news/1697.bugfix @@ -0,0 +1 @@ +Undeprecate token parameter from vocabularies endpoint @tisto \ No newline at end of file diff --git a/src/plone/restapi/serializer/vocabularies.py b/src/plone/restapi/serializer/vocabularies.py index 380040f2ca..a8f7e61104 100644 --- a/src/plone/restapi/serializer/vocabularies.py +++ b/src/plone/restapi/serializer/vocabularies.py @@ -11,8 +11,6 @@ from zope.schema.interfaces import ITokenizedTerm from zope.schema.interfaces import IVocabulary -import warnings - @implementer(ISerializeToJson) class SerializeVocabLikeToJson: @@ -44,10 +42,8 @@ def __call__(self, vocabulary_id): ) if token: - warnings.warn( - "``token`` parameter is deprecated and will be removed in plone.restapi 9.0. Use ``tokens`` parameter instead.", - DeprecationWarning, - ) + # the token parameter was deprecated in plone.restapi 8 + # undeprecated in plone.restapi 9 if token.lower() != term.token.lower(): continue terms.append(term)