-
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Branch: refs/heads/main Date: 2023-09-21T14:15:10-07:00 Author: Timo Stollenwerk (tisto) <[email protected]> Commit: plone/plone.restapi@3e3f58a Undeprecate token param on vocabularies endpoint (#1708) Files changed: A news/1697.bugfix M src/plone/restapi/serializer/vocabularies.py
- Loading branch information
Showing
1 changed file
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,15 +2,15 @@ Repository: plone.restapi | |
|
||
|
||
Branch: refs/heads/main | ||
Date: 2023-09-21T14:11:39-07:00 | ||
Date: 2023-09-21T14:15:10-07:00 | ||
Author: Timo Stollenwerk (tisto) <[email protected]> | ||
Commit: https://github.com/plone/plone.restapi/commit/863d9a20ce22e63843848a76ffcde5c139674be5 | ||
Commit: https://github.com/plone/plone.restapi/commit/3e3f58a0a3780addf59a8862c957a0f15038b1a1 | ||
|
||
Undeprecate comma-separated list of expansion (#1707) | ||
Undeprecate token param on vocabularies endpoint (#1708) | ||
|
||
Files changed: | ||
A news/1696.bugfix | ||
M src/plone/restapi/serializer/expansion.py | ||
A news/1697.bugfix | ||
M src/plone/restapi/serializer/vocabularies.py | ||
|
||
b'diff --git a/news/1696.bugfix b/news/1696.bugfix\nnew file mode 100644\nindex 000000000..39b4c8ade\n--- /dev/null\n+++ b/news/1696.bugfix\n@@ -0,0 +1 @@\n+Undeprecate comma separated expansion parameters (that were deprecated in plone.restapi 8) @tisto\n\\ No newline at end of file\ndiff --git a/src/plone/restapi/serializer/expansion.py b/src/plone/restapi/serializer/expansion.py\nindex b7d10fa30..6c0db6826 100644\n--- a/src/plone/restapi/serializer/expansion.py\n+++ b/src/plone/restapi/serializer/expansion.py\n@@ -1,19 +1,14 @@\n from plone.restapi.interfaces import IExpandableElement\n from zope.component import getAdapters\n \n-import warnings\n-\n \n def expandable_elements(context, request):\n """Returns a dict containing all expandable elements."""\n expands = request.form.get("expand", [])\n if isinstance(expands, str):\n if "," in expands:\n- # deprecated use of expands (with commas)\n- warnings.warn(\n- "``expand`` as a string parameter separated with commas is deprecated and will be removed in plone.restapi 9.0. Use ``expand:list`` instead.",\n- DeprecationWarning,\n- )\n+ # use of expands (with commas) was deprecated in plone.restapi 8\n+ # undeprecated with plone.restapi 9\n expands = expands.split(",")\n else:\n # allow still the use of non marked :list parameters present\n' | ||
b'diff --git a/news/1697.bugfix b/news/1697.bugfix\nnew file mode 100644\nindex 000000000..3789f81a1\n--- /dev/null\n+++ b/news/1697.bugfix\n@@ -0,0 +1 @@\n+Undeprecate token parameter from vocabularies endpoint @tisto\n\\ No newline at end of file\ndiff --git a/src/plone/restapi/serializer/vocabularies.py b/src/plone/restapi/serializer/vocabularies.py\nindex 380040f2c..a8f7e6110 100644\n--- a/src/plone/restapi/serializer/vocabularies.py\n+++ b/src/plone/restapi/serializer/vocabularies.py\n@@ -11,8 +11,6 @@\n from zope.schema.interfaces import ITokenizedTerm\n from zope.schema.interfaces import IVocabulary\n \n-import warnings\n-\n \n @implementer(ISerializeToJson)\n class SerializeVocabLikeToJson:\n@@ -44,10 +42,8 @@ def __call__(self, vocabulary_id):\n )\n \n if token:\n- warnings.warn(\n- "``token`` parameter is deprecated and will be removed in plone.restapi 9.0. Use ``tokens`` parameter instead.",\n- DeprecationWarning,\n- )\n+ # the token parameter was deprecated in plone.restapi 8\n+ # undeprecated in plone.restapi 9\n if token.lower() != term.token.lower():\n continue\n terms.append(term)\n' | ||
|