Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undeprecate token param on vocabularies endpoint #1708

Merged
merged 1 commit into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/1697.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Undeprecate token parameter from vocabularies endpoint @tisto
8 changes: 2 additions & 6 deletions src/plone/restapi/serializer/vocabularies.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
from zope.schema.interfaces import ITokenizedTerm
from zope.schema.interfaces import IVocabulary

import warnings


@implementer(ISerializeToJson)
class SerializeVocabLikeToJson:
Expand Down Expand Up @@ -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)
Expand Down