plone.api 2.5.0__tar.gz → 2.5.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {plone_api-2.5.0 → plone_api-2.5.2}/CHANGES.md +21 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/PKG-INFO +27 -1
- {plone_api-2.5.0 → plone_api-2.5.2}/docs/addon.md +2 -1
- {plone_api-2.5.0/src/plone/api/tests/doctests → plone_api-2.5.2/docs}/content.md +3 -1
- {plone_api-2.5.0/src/plone/api/tests/doctests → plone_api-2.5.2/docs}/env.md +3 -2
- {plone_api-2.5.0/src/plone/api/tests/doctests → plone_api-2.5.2/docs}/group.md +2 -2
- {plone_api-2.5.0 → plone_api-2.5.2}/docs/portal.md +2 -2
- {plone_api-2.5.0 → plone_api-2.5.2}/docs/relation.md +2 -2
- {plone_api-2.5.0/src/plone/api/tests/doctests → plone_api-2.5.2/docs}/user.md +3 -2
- {plone_api-2.5.0 → plone_api-2.5.2}/setup.py +6 -1
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/env.py +1 -1
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/group.py +3 -3
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/tests/doctests/addon.md +2 -1
- {plone_api-2.5.0/docs → plone_api-2.5.2/src/plone/api/tests/doctests}/content.md +3 -1
- {plone_api-2.5.0/docs → plone_api-2.5.2/src/plone/api/tests/doctests}/env.md +3 -2
- {plone_api-2.5.0/docs → plone_api-2.5.2/src/plone/api/tests/doctests}/group.md +2 -2
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/tests/doctests/portal.md +2 -2
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/tests/doctests/relation.md +2 -2
- {plone_api-2.5.0/docs → plone_api-2.5.2/src/plone/api/tests/doctests}/user.md +3 -2
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/tests/test_group.py +6 -3
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/tests/test_user.py +4 -2
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/user.py +1 -1
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone.api.egg-info/PKG-INFO +27 -1
- {plone_api-2.5.0 → plone_api-2.5.2}/CONTRIBUTING.md +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/LICENSE +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/MANIFEST.in +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/README.md +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/docs/about.md +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/docs/contribute.md +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/docs/index.md +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/pyproject.toml +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/setup.cfg +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/__init__.py +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/__init__.py +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/addon.py +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/configure.zcml +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/content.py +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/exc.py +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/portal.py +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/profiles/testfixture/metadata.xml +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/profiles/testfixture/types/Dexterity_Folder.xml +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/profiles/testfixture/types/Dexterity_Item.xml +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/profiles/testfixture/types.xml +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/relation.py +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/testing.zcml +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/tests/Dexterity_Folder.xml +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/tests/Dexterity_Item.xml +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/tests/__init__.py +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/tests/base.py +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/tests/doctests/about.md +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/tests/doctests/contribute.md +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/tests/test_addon.py +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/tests/test_content.py +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/tests/test_doctests.py +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/tests/test_env.py +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/tests/test_portal.py +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/tests/test_relation.py +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/tests/test_validation.py +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/validation.py +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone.api.egg-info/SOURCES.txt +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone.api.egg-info/dependency_links.txt +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone.api.egg-info/namespace_packages.txt +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone.api.egg-info/not-zip-safe +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone.api.egg-info/requires.txt +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/src/plone.api.egg-info/top_level.txt +0 -0
- {plone_api-2.5.0 → plone_api-2.5.2}/tox.ini +0 -0
|
@@ -9,6 +9,27 @@
|
|
|
9
9
|
|
|
10
10
|
<!-- towncrier release notes start -->
|
|
11
11
|
|
|
12
|
+
## 2.5.2 (2025-06-05)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug fixes:
|
|
16
|
+
|
|
17
|
+
- Make plone.api.exc.UserNotFoundError message more informative by including the not found username [@ale-rt] #585
|
|
18
|
+
|
|
19
|
+
## 2.5.1 (2025-05-02)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Internal:
|
|
23
|
+
|
|
24
|
+
- Add project URLs to display on PyPI. @stevepiercy #582
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Documentation:
|
|
28
|
+
|
|
29
|
+
- Add missing members to API methods and sort items. @stevepiercy #579
|
|
30
|
+
- Resolve Sphinx warning `duplicate object description of plone` by using `currentmodule` instead of `module`. This avoids creating duplicate entries in the index. They are already documented in the `docs/api/*.md` files. @stevepiercy #581
|
|
31
|
+
- Pin plone-sphinx-theme to prepare for PLIP 4097. See https://github.com/plone/Products.CMFPlone/issues/4097. @stevepiercy #583
|
|
32
|
+
|
|
12
33
|
## 2.5.0 (2025-03-25)
|
|
13
34
|
|
|
14
35
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: plone.api
|
|
3
|
-
Version: 2.5.
|
|
3
|
+
Version: 2.5.2
|
|
4
4
|
Summary: A Plone API.
|
|
5
5
|
Home-page: https://github.com/plone/plone.api
|
|
6
6
|
Author: Plone Foundation
|
|
@@ -9,6 +9,11 @@ License: GPL version 2
|
|
|
9
9
|
Project-URL: Documentation, https://6.docs.plone.org/plone.api/index.html
|
|
10
10
|
Project-URL: Changelog, https://github.com/plone/plone.api/blob/main/CHANGES.md
|
|
11
11
|
Project-URL: Issue Tracker, https://github.com/plone/plone.api/issues
|
|
12
|
+
Project-URL: Repository, https://github.com/plone/plone.api
|
|
13
|
+
Project-URL: Sponsor, https://github.com/sponsors/plone
|
|
14
|
+
Project-URL: Discord, https://discord.com/channels/786421998426521600/786421998426521603
|
|
15
|
+
Project-URL: Mastodon, https://plone.social/@plone
|
|
16
|
+
Project-URL: YouTube, https://www.youtube.com/@plonecms
|
|
12
17
|
Keywords: plone api
|
|
13
18
|
Platform: Any
|
|
14
19
|
Classifier: Development Status :: 5 - Production/Stable
|
|
@@ -127,6 +132,27 @@ Continuous Integration
|
|
|
127
132
|
|
|
128
133
|
<!-- towncrier release notes start -->
|
|
129
134
|
|
|
135
|
+
## 2.5.2 (2025-06-05)
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
### Bug fixes:
|
|
139
|
+
|
|
140
|
+
- Make plone.api.exc.UserNotFoundError message more informative by including the not found username [@ale-rt] #585
|
|
141
|
+
|
|
142
|
+
## 2.5.1 (2025-05-02)
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
### Internal:
|
|
146
|
+
|
|
147
|
+
- Add project URLs to display on PyPI. @stevepiercy #582
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
### Documentation:
|
|
151
|
+
|
|
152
|
+
- Add missing members to API methods and sort items. @stevepiercy #579
|
|
153
|
+
- Resolve Sphinx warning `duplicate object description of plone` by using `currentmodule` instead of `module`. This avoids creating duplicate entries in the index. They are already documented in the `docs/api/*.md` files. @stevepiercy #581
|
|
154
|
+
- Pin plone-sphinx-theme to prepare for PLIP 4097. See https://github.com/plone/Products.CMFPlone/issues/4097. @stevepiercy #583
|
|
155
|
+
|
|
130
156
|
## 2.5.0 (2025-03-25)
|
|
131
157
|
|
|
132
158
|
|
|
@@ -8,8 +8,9 @@ myst:
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
```{eval-rst}
|
|
11
|
-
..
|
|
11
|
+
.. currentmodule:: plone.api.addon
|
|
12
12
|
```
|
|
13
|
+
% The Sphinx directive `currentmodule` is used to both run `code-block` examples via [Manuel](https://manuel.readthedocs.io/en/latest/#code-blocks-1) and to avoid duplicating an index entry that is already provided by its counterpart in `docs/api/*.md`.
|
|
13
14
|
|
|
14
15
|
(chapter-addons)=
|
|
15
16
|
|
|
@@ -8,8 +8,10 @@ myst:
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
```{eval-rst}
|
|
11
|
-
..
|
|
11
|
+
.. currentmodule:: plone.api.content
|
|
12
12
|
```
|
|
13
|
+
% The Sphinx directive `currentmodule` is used to both run `code-block` examples via [Manuel](https://manuel.readthedocs.io/en/latest/#code-blocks-1) and to avoid duplicating an index entry that is already provided by its counterpart in `docs/api/*.md`.
|
|
14
|
+
|
|
13
15
|
|
|
14
16
|
(chapter-content)=
|
|
15
17
|
|
|
@@ -8,9 +8,10 @@ myst:
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
```{eval-rst}
|
|
11
|
-
..
|
|
12
|
-
:no-index:
|
|
11
|
+
.. currentmodule:: plone.api.env
|
|
13
12
|
```
|
|
13
|
+
% The Sphinx directive `currentmodule` is used to both run `code-block` examples via [Manuel](https://manuel.readthedocs.io/en/latest/#code-blocks-1) and to avoid duplicating an index entry that is already provided by its counterpart in `docs/api/*.md`.
|
|
14
|
+
|
|
14
15
|
|
|
15
16
|
(chapter-env)=
|
|
16
17
|
|
|
@@ -8,9 +8,9 @@ myst:
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
```{eval-rst}
|
|
11
|
-
..
|
|
12
|
-
:no-index:
|
|
11
|
+
.. currentmodule:: plone.api.group
|
|
13
12
|
```
|
|
13
|
+
% The Sphinx directive `currentmodule` is used to both run `code-block` examples via [Manuel](https://manuel.readthedocs.io/en/latest/#code-blocks-1) and to avoid duplicating an index entry that is already provided by its counterpart in `docs/api/*.md`.
|
|
14
14
|
|
|
15
15
|
(chapter-groups)=
|
|
16
16
|
|
|
@@ -8,9 +8,9 @@ myst:
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
```{eval-rst}
|
|
11
|
-
..
|
|
12
|
-
:no-index:
|
|
11
|
+
.. currentmodule:: plone.api.portal
|
|
13
12
|
```
|
|
13
|
+
% The Sphinx directive `currentmodule` is used to both run `code-block` examples via [Manuel](https://manuel.readthedocs.io/en/latest/#code-blocks-1) and to avoid duplicating an index entry that is already provided by its counterpart in `docs/api/*.md`.
|
|
14
14
|
|
|
15
15
|
(chapter-portal)=
|
|
16
16
|
|
|
@@ -8,9 +8,9 @@ myst:
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
```{eval-rst}
|
|
11
|
-
..
|
|
12
|
-
:no-index:
|
|
11
|
+
.. currentmodule:: plone.api.relation
|
|
13
12
|
```
|
|
13
|
+
% The Sphinx directive `currentmodule` is used to both run `code-block` examples via [Manuel](https://manuel.readthedocs.io/en/latest/#code-blocks-1) and to avoid duplicating an index entry that is already provided by its counterpart in `docs/api/*.md`.
|
|
14
14
|
|
|
15
15
|
(chapter-relation)=
|
|
16
16
|
|
|
@@ -8,9 +8,10 @@ myst:
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
```{eval-rst}
|
|
11
|
-
..
|
|
12
|
-
:no-index:
|
|
11
|
+
.. currentmodule:: plone.api.user
|
|
13
12
|
```
|
|
13
|
+
% The Sphinx directive `currentmodule` is used to both run `code-block` examples via [Manuel](https://manuel.readthedocs.io/en/latest/#code-blocks-1) and to avoid duplicating an index entry that is already provided by its counterpart in `docs/api/*.md`.
|
|
14
|
+
|
|
14
15
|
|
|
15
16
|
(chapter-users)=
|
|
16
17
|
|
|
@@ -3,7 +3,7 @@ from setuptools import find_packages
|
|
|
3
3
|
from setuptools import setup
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
version = "2.5.
|
|
6
|
+
version = "2.5.2"
|
|
7
7
|
|
|
8
8
|
long_description = "\n".join(
|
|
9
9
|
[Path("README.md").read_text(), Path("CHANGES.md").read_text()]
|
|
@@ -84,5 +84,10 @@ setup(
|
|
|
84
84
|
"Documentation": "https://6.docs.plone.org/plone.api/index.html",
|
|
85
85
|
"Changelog": "https://github.com/plone/plone.api/blob/main/CHANGES.md",
|
|
86
86
|
"Issue Tracker": "https://github.com/plone/plone.api/issues",
|
|
87
|
+
"Repository": "https://github.com/plone/plone.api",
|
|
88
|
+
"Sponsor": "https://github.com/sponsors/plone",
|
|
89
|
+
"Discord": "https://discord.com/channels/786421998426521600/786421998426521603",
|
|
90
|
+
"Mastodon": "https://plone.social/@plone",
|
|
91
|
+
"YouTube": "https://www.youtube.com/@plonecms",
|
|
87
92
|
},
|
|
88
93
|
)
|
|
@@ -85,7 +85,7 @@ def get_groups(username=None, user=None):
|
|
|
85
85
|
if username:
|
|
86
86
|
user = user_get(username=username)
|
|
87
87
|
if not user:
|
|
88
|
-
raise UserNotFoundError
|
|
88
|
+
raise UserNotFoundError(username)
|
|
89
89
|
|
|
90
90
|
group_tool = portal.get_tool("portal_groups")
|
|
91
91
|
|
|
@@ -157,7 +157,7 @@ def add_user(groupname=None, group=None, username=None, user=None):
|
|
|
157
157
|
if username:
|
|
158
158
|
user = user_get(username=username)
|
|
159
159
|
if not user:
|
|
160
|
-
raise UserNotFoundError
|
|
160
|
+
raise UserNotFoundError(username)
|
|
161
161
|
|
|
162
162
|
user_id = user.id
|
|
163
163
|
group_id = groupname or group.id
|
|
@@ -194,7 +194,7 @@ def remove_user(groupname=None, group=None, username=None, user=None):
|
|
|
194
194
|
if username:
|
|
195
195
|
user = user_get(username=username)
|
|
196
196
|
if not user:
|
|
197
|
-
raise UserNotFoundError
|
|
197
|
+
raise UserNotFoundError(username)
|
|
198
198
|
user_id = user.id
|
|
199
199
|
group_id = groupname or group.id
|
|
200
200
|
portal_groups = portal.get_tool("portal_groups")
|
|
@@ -8,8 +8,9 @@ myst:
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
```{eval-rst}
|
|
11
|
-
..
|
|
11
|
+
.. currentmodule:: plone.api.addon
|
|
12
12
|
```
|
|
13
|
+
% The Sphinx directive `currentmodule` is used to both run `code-block` examples via [Manuel](https://manuel.readthedocs.io/en/latest/#code-blocks-1) and to avoid duplicating an index entry that is already provided by its counterpart in `docs/api/*.md`.
|
|
13
14
|
|
|
14
15
|
(chapter-addons)=
|
|
15
16
|
|
|
@@ -8,8 +8,10 @@ myst:
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
```{eval-rst}
|
|
11
|
-
..
|
|
11
|
+
.. currentmodule:: plone.api.content
|
|
12
12
|
```
|
|
13
|
+
% The Sphinx directive `currentmodule` is used to both run `code-block` examples via [Manuel](https://manuel.readthedocs.io/en/latest/#code-blocks-1) and to avoid duplicating an index entry that is already provided by its counterpart in `docs/api/*.md`.
|
|
14
|
+
|
|
13
15
|
|
|
14
16
|
(chapter-content)=
|
|
15
17
|
|
|
@@ -8,9 +8,10 @@ myst:
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
```{eval-rst}
|
|
11
|
-
..
|
|
12
|
-
:no-index:
|
|
11
|
+
.. currentmodule:: plone.api.env
|
|
13
12
|
```
|
|
13
|
+
% The Sphinx directive `currentmodule` is used to both run `code-block` examples via [Manuel](https://manuel.readthedocs.io/en/latest/#code-blocks-1) and to avoid duplicating an index entry that is already provided by its counterpart in `docs/api/*.md`.
|
|
14
|
+
|
|
14
15
|
|
|
15
16
|
(chapter-env)=
|
|
16
17
|
|
|
@@ -8,9 +8,9 @@ myst:
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
```{eval-rst}
|
|
11
|
-
..
|
|
12
|
-
:no-index:
|
|
11
|
+
.. currentmodule:: plone.api.group
|
|
13
12
|
```
|
|
13
|
+
% The Sphinx directive `currentmodule` is used to both run `code-block` examples via [Manuel](https://manuel.readthedocs.io/en/latest/#code-blocks-1) and to avoid duplicating an index entry that is already provided by its counterpart in `docs/api/*.md`.
|
|
14
14
|
|
|
15
15
|
(chapter-groups)=
|
|
16
16
|
|
|
@@ -8,9 +8,9 @@ myst:
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
```{eval-rst}
|
|
11
|
-
..
|
|
12
|
-
:no-index:
|
|
11
|
+
.. currentmodule:: plone.api.portal
|
|
13
12
|
```
|
|
13
|
+
% The Sphinx directive `currentmodule` is used to both run `code-block` examples via [Manuel](https://manuel.readthedocs.io/en/latest/#code-blocks-1) and to avoid duplicating an index entry that is already provided by its counterpart in `docs/api/*.md`.
|
|
14
14
|
|
|
15
15
|
(chapter-portal)=
|
|
16
16
|
|
|
@@ -8,9 +8,9 @@ myst:
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
```{eval-rst}
|
|
11
|
-
..
|
|
12
|
-
:no-index:
|
|
11
|
+
.. currentmodule:: plone.api.relation
|
|
13
12
|
```
|
|
13
|
+
% The Sphinx directive `currentmodule` is used to both run `code-block` examples via [Manuel](https://manuel.readthedocs.io/en/latest/#code-blocks-1) and to avoid duplicating an index entry that is already provided by its counterpart in `docs/api/*.md`.
|
|
14
14
|
|
|
15
15
|
(chapter-relation)=
|
|
16
16
|
|
|
@@ -8,9 +8,10 @@ myst:
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
```{eval-rst}
|
|
11
|
-
..
|
|
12
|
-
:no-index:
|
|
11
|
+
.. currentmodule:: plone.api.user
|
|
13
12
|
```
|
|
13
|
+
% The Sphinx directive `currentmodule` is used to both run `code-block` examples via [Manuel](https://manuel.readthedocs.io/en/latest/#code-blocks-1) and to avoid duplicating an index entry that is already provided by its counterpart in `docs/api/*.md`.
|
|
14
|
+
|
|
14
15
|
|
|
15
16
|
(chapter-users)=
|
|
16
17
|
|
|
@@ -152,8 +152,9 @@ class TestPloneApiGroup(unittest.TestCase):
|
|
|
152
152
|
"""Test retrieving of groups for a user that does not exist."""
|
|
153
153
|
from plone.api.exc import UserNotFoundError
|
|
154
154
|
|
|
155
|
-
with self.assertRaises(UserNotFoundError):
|
|
155
|
+
with self.assertRaises(UserNotFoundError) as exc:
|
|
156
156
|
api.group.get_groups(username="theurbanspaceman")
|
|
157
|
+
self.assertEqual(str(exc.exception), "theurbanspaceman")
|
|
157
158
|
|
|
158
159
|
def test_get_groups_anonymous(self):
|
|
159
160
|
from AccessControl.users import nobody
|
|
@@ -239,8 +240,9 @@ class TestPloneApiGroup(unittest.TestCase):
|
|
|
239
240
|
"""Test adding a user that does not exist to a group."""
|
|
240
241
|
from plone.api.exc import UserNotFoundError
|
|
241
242
|
|
|
242
|
-
with self.assertRaises(UserNotFoundError):
|
|
243
|
+
with self.assertRaises(UserNotFoundError) as exc:
|
|
243
244
|
api.group.add_user(username="jane", groupname="staff")
|
|
245
|
+
self.assertEqual(str(exc.exception), "jane")
|
|
244
246
|
|
|
245
247
|
def test_add_user_username(self):
|
|
246
248
|
"""Test adding a user to a group by username."""
|
|
@@ -327,8 +329,9 @@ class TestPloneApiGroup(unittest.TestCase):
|
|
|
327
329
|
|
|
328
330
|
api.group.create(groupname="staff")
|
|
329
331
|
group = api.group.get(groupname="staff")
|
|
330
|
-
with self.assertRaises(UserNotFoundError):
|
|
332
|
+
with self.assertRaises(UserNotFoundError) as exc:
|
|
331
333
|
api.group.remove_user(group=group, username="iamnothere")
|
|
334
|
+
self.assertEqual(str(exc.exception), "iamnothere")
|
|
332
335
|
|
|
333
336
|
def test_grant_roles(self):
|
|
334
337
|
"""Test grant roles."""
|
|
@@ -342,8 +342,9 @@ class TestPloneApiUser(unittest.TestCase):
|
|
|
342
342
|
"""Test get roles for a user that does not exist."""
|
|
343
343
|
from plone.api.exc import UserNotFoundError
|
|
344
344
|
|
|
345
|
-
with self.assertRaises(UserNotFoundError):
|
|
345
|
+
with self.assertRaises(UserNotFoundError) as exc:
|
|
346
346
|
api.user.get_roles(username="theurbanspaceman")
|
|
347
|
+
self.assertEqual(str(exc.exception), "theurbanspaceman")
|
|
347
348
|
|
|
348
349
|
def test_get_roles_anonymous(self):
|
|
349
350
|
"""Test get_roles for an anonymous user."""
|
|
@@ -509,8 +510,9 @@ class TestPloneApiUser(unittest.TestCase):
|
|
|
509
510
|
"""Test get_permissions for a user that does not exist."""
|
|
510
511
|
from plone.api.exc import UserNotFoundError
|
|
511
512
|
|
|
512
|
-
with self.assertRaises(UserNotFoundError):
|
|
513
|
+
with self.assertRaises(UserNotFoundError) as exc:
|
|
513
514
|
api.user.get_permissions(username="ming")
|
|
515
|
+
self.assertEqual(str(exc.exception), "ming")
|
|
514
516
|
|
|
515
517
|
def test_get_permissions_context(self):
|
|
516
518
|
"""Test get permissions on some context."""
|
|
@@ -232,7 +232,7 @@ def get_roles(username=None, user=None, obj=None, inherit=True):
|
|
|
232
232
|
user = portal_membership.getMemberById(username)
|
|
233
233
|
|
|
234
234
|
if user is None:
|
|
235
|
-
raise UserNotFoundError
|
|
235
|
+
raise UserNotFoundError(username)
|
|
236
236
|
|
|
237
237
|
if obj is not None:
|
|
238
238
|
if inherit:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: plone.api
|
|
3
|
-
Version: 2.5.
|
|
3
|
+
Version: 2.5.2
|
|
4
4
|
Summary: A Plone API.
|
|
5
5
|
Home-page: https://github.com/plone/plone.api
|
|
6
6
|
Author: Plone Foundation
|
|
@@ -9,6 +9,11 @@ License: GPL version 2
|
|
|
9
9
|
Project-URL: Documentation, https://6.docs.plone.org/plone.api/index.html
|
|
10
10
|
Project-URL: Changelog, https://github.com/plone/plone.api/blob/main/CHANGES.md
|
|
11
11
|
Project-URL: Issue Tracker, https://github.com/plone/plone.api/issues
|
|
12
|
+
Project-URL: Repository, https://github.com/plone/plone.api
|
|
13
|
+
Project-URL: Sponsor, https://github.com/sponsors/plone
|
|
14
|
+
Project-URL: Discord, https://discord.com/channels/786421998426521600/786421998426521603
|
|
15
|
+
Project-URL: Mastodon, https://plone.social/@plone
|
|
16
|
+
Project-URL: YouTube, https://www.youtube.com/@plonecms
|
|
12
17
|
Keywords: plone api
|
|
13
18
|
Platform: Any
|
|
14
19
|
Classifier: Development Status :: 5 - Production/Stable
|
|
@@ -127,6 +132,27 @@ Continuous Integration
|
|
|
127
132
|
|
|
128
133
|
<!-- towncrier release notes start -->
|
|
129
134
|
|
|
135
|
+
## 2.5.2 (2025-06-05)
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
### Bug fixes:
|
|
139
|
+
|
|
140
|
+
- Make plone.api.exc.UserNotFoundError message more informative by including the not found username [@ale-rt] #585
|
|
141
|
+
|
|
142
|
+
## 2.5.1 (2025-05-02)
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
### Internal:
|
|
146
|
+
|
|
147
|
+
- Add project URLs to display on PyPI. @stevepiercy #582
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
### Documentation:
|
|
151
|
+
|
|
152
|
+
- Add missing members to API methods and sort items. @stevepiercy #579
|
|
153
|
+
- Resolve Sphinx warning `duplicate object description of plone` by using `currentmodule` instead of `module`. This avoids creating duplicate entries in the index. They are already documented in the `docs/api/*.md` files. @stevepiercy #581
|
|
154
|
+
- Pin plone-sphinx-theme to prepare for PLIP 4097. See https://github.com/plone/Products.CMFPlone/issues/4097. @stevepiercy #583
|
|
155
|
+
|
|
130
156
|
## 2.5.0 (2025-03-25)
|
|
131
157
|
|
|
132
158
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/profiles/testfixture/types/Dexterity_Folder.xml
RENAMED
|
File without changes
|
{plone_api-2.5.0 → plone_api-2.5.2}/src/plone/api/profiles/testfixture/types/Dexterity_Item.xml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|