plone.api 2.2.3__tar.gz → 2.2.5__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.2.3 → plone_api-2.2.5}/CHANGES.rst +32 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/MANIFEST.in +2 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/PKG-INFO +35 -6
- {plone_api-2.2.3 → plone_api-2.2.5}/README.md +0 -3
- {plone_api-2.2.3 → plone_api-2.2.5}/docs/contribute.md +16 -20
- {plone_api-2.2.3 → plone_api-2.2.5}/docs/portal.md +1 -1
- {plone_api-2.2.3 → plone_api-2.2.5}/pyproject.toml +2 -2
- {plone_api-2.2.3 → plone_api-2.2.5}/setup.py +3 -3
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/content.py +6 -1
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/portal.py +2 -2
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/relation.py +1 -1
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/testing.zcml +1 -1
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/tests/doctests/portal.md +1 -1
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/tests/test_content.py +12 -2
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/tests/test_portal.py +1 -1
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone.api.egg-info/PKG-INFO +35 -6
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone.api.egg-info/requires.txt +1 -1
- {plone_api-2.2.3 → plone_api-2.2.5}/tox.ini +13 -1
- {plone_api-2.2.3 → plone_api-2.2.5}/CONTRIBUTING.rst +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/LICENSE +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/docs/about.md +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/docs/content.md +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/docs/env.md +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/docs/group.md +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/docs/index.md +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/docs/relation.md +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/docs/user.md +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/setup.cfg +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/__init__.py +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/__init__.py +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/configure.zcml +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/env.py +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/exc.py +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/group.py +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/profiles/testfixture/metadata.xml +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/profiles/testfixture/types/Dexterity_Folder.xml +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/profiles/testfixture/types/Dexterity_Item.xml +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/profiles/testfixture/types.xml +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/tests/Dexterity_Folder.xml +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/tests/Dexterity_Item.xml +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/tests/__init__.py +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/tests/base.py +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/tests/doctests/about.md +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/tests/doctests/content.md +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/tests/doctests/env.md +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/tests/doctests/group.md +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/tests/doctests/relation.md +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/tests/doctests/user.md +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/tests/test_doctests.py +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/tests/test_env.py +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/tests/test_group.py +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/tests/test_relation.py +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/tests/test_user.py +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/tests/test_validation.py +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/user.py +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone/api/validation.py +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone.api.egg-info/SOURCES.txt +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone.api.egg-info/dependency_links.txt +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone.api.egg-info/namespace_packages.txt +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone.api.egg-info/not-zip-safe +0 -0
- {plone_api-2.2.3 → plone_api-2.2.5}/src/plone.api.egg-info/top_level.txt +0 -0
|
@@ -8,6 +8,38 @@ Changelog
|
|
|
8
8
|
|
|
9
9
|
.. towncrier release notes start
|
|
10
10
|
|
|
11
|
+
2.2.5 (2025-01-24)
|
|
12
|
+
------------------
|
|
13
|
+
|
|
14
|
+
Bug fixes:
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
- Fix api.content.get(path=path) when a item in the path is not accessible to the user.
|
|
18
|
+
[pbauer] (#549)
|
|
19
|
+
- Fix DeprecationWarnings. [maurits] (#4090)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
Documentation:
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
- Preview docs on Read the Docs instead of Netlify. @stevepiercy (#545)
|
|
26
|
+
- Remove Netlify stuff, follow up to #545. @stevepiercy
|
|
27
|
+
- Sort and remove duplicate entries in `pyproject.toml`
|
|
28
|
+
- Remove unused docs requirements.
|
|
29
|
+
- Fix comments and remove unnecessary steps from `tox.ini`.
|
|
30
|
+
- Enable copy button for code blocks.
|
|
31
|
+
- Add linkcheck to documentation of documentation. (#546)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
2.2.4 (2024-12-16)
|
|
35
|
+
------------------
|
|
36
|
+
|
|
37
|
+
Documentation:
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
- Remove references to unused Coveralls. @stevepiercy (#543)
|
|
41
|
+
|
|
42
|
+
|
|
11
43
|
2.2.3 (2024-10-23)
|
|
12
44
|
------------------
|
|
13
45
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: plone.api
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.5
|
|
4
4
|
Summary: A Plone API.
|
|
5
5
|
Home-page: https://github.com/plone/plone.api
|
|
6
6
|
Author: Plone Foundation
|
|
7
7
|
Author-email: plone-developers@lists.sourceforge.net
|
|
8
8
|
License: GPL version 2
|
|
9
9
|
Project-URL: Documentation, https://6.docs.plone.org/plone.api/index.html
|
|
10
|
-
Project-URL: Changelog, https://github.com/plone/plone.api/blob/
|
|
10
|
+
Project-URL: Changelog, https://github.com/plone/plone.api/blob/main/CHANGES.rst
|
|
11
11
|
Project-URL: Issue Tracker, https://github.com/plone/plone.api/issues
|
|
12
12
|
Keywords: plone api
|
|
13
13
|
Platform: Any
|
|
@@ -34,8 +34,8 @@ Requires-Dist: decorator
|
|
|
34
34
|
Requires-Dist: plone.app.uuid
|
|
35
35
|
Requires-Dist: plone.app.dexterity
|
|
36
36
|
Requires-Dist: plone.app.intid
|
|
37
|
-
Requires-Dist: plone.app.layout
|
|
38
37
|
Requires-Dist: plone.app.linkintegrity
|
|
38
|
+
Requires-Dist: plone.base
|
|
39
39
|
Requires-Dist: plone.dexterity
|
|
40
40
|
Requires-Dist: plone.i18n
|
|
41
41
|
Requires-Dist: plone.registry
|
|
@@ -99,9 +99,6 @@ Issues
|
|
|
99
99
|
Continuous Integration
|
|
100
100
|
tested on [GitHub Actions](https://github.com/plone/plone.api/actions).
|
|
101
101
|
|
|
102
|
-
Code Coverage
|
|
103
|
-
is measured at [Coveralls.io](https://coveralls.io/github/plone/plone.api).
|
|
104
|
-
|
|
105
102
|
|
|
106
103
|
Changelog
|
|
107
104
|
=========
|
|
@@ -113,6 +110,38 @@ Changelog
|
|
|
113
110
|
|
|
114
111
|
.. towncrier release notes start
|
|
115
112
|
|
|
113
|
+
2.2.5 (2025-01-24)
|
|
114
|
+
------------------
|
|
115
|
+
|
|
116
|
+
Bug fixes:
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
- Fix api.content.get(path=path) when a item in the path is not accessible to the user.
|
|
120
|
+
[pbauer] (#549)
|
|
121
|
+
- Fix DeprecationWarnings. [maurits] (#4090)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
Documentation:
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
- Preview docs on Read the Docs instead of Netlify. @stevepiercy (#545)
|
|
128
|
+
- Remove Netlify stuff, follow up to #545. @stevepiercy
|
|
129
|
+
- Sort and remove duplicate entries in `pyproject.toml`
|
|
130
|
+
- Remove unused docs requirements.
|
|
131
|
+
- Fix comments and remove unnecessary steps from `tox.ini`.
|
|
132
|
+
- Enable copy button for code blocks.
|
|
133
|
+
- Add linkcheck to documentation of documentation. (#546)
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
2.2.4 (2024-12-16)
|
|
137
|
+
------------------
|
|
138
|
+
|
|
139
|
+
Documentation:
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
- Remove references to unused Coveralls. @stevepiercy (#543)
|
|
143
|
+
|
|
144
|
+
|
|
116
145
|
2.2.3 (2024-10-23)
|
|
117
146
|
------------------
|
|
118
147
|
|
|
@@ -12,17 +12,14 @@ myst:
|
|
|
12
12
|
This section describes how to contribute to the `plone.api` project.
|
|
13
13
|
It extends {doc}`plone:contributing/index`.
|
|
14
14
|
|
|
15
|
-
|
|
16
15
|
## Prerequisites
|
|
17
16
|
|
|
18
17
|
Prepare your system by installing prerequisites.
|
|
19
18
|
|
|
20
|
-
|
|
21
19
|
### System libraries
|
|
22
20
|
|
|
23
21
|
You need to install system libraries, as described in {ref}`plone:plone-prerequisites-label`, with the exception of GNU make.
|
|
24
22
|
|
|
25
|
-
|
|
26
23
|
### tox
|
|
27
24
|
|
|
28
25
|
[tox](https://tox.wiki/en/stable/index.html) automates and standardizes testing in Python.
|
|
@@ -49,7 +46,6 @@ Once installed, set up the git hook scripts to run on every commit.
|
|
|
49
46
|
pre-commit install
|
|
50
47
|
```
|
|
51
48
|
|
|
52
|
-
|
|
53
49
|
## Create development environment
|
|
54
50
|
|
|
55
51
|
After satisfying the prerequisites, you are ready to create your development environment.
|
|
@@ -81,7 +77,6 @@ tox -e livehtml # build, serve, and reload changes to documentation
|
|
|
81
77
|
tox -l # list all tox environments
|
|
82
78
|
```
|
|
83
79
|
|
|
84
|
-
|
|
85
80
|
(git-workflow)=
|
|
86
81
|
|
|
87
82
|
## git
|
|
@@ -89,24 +84,22 @@ tox -l # list all tox environments
|
|
|
89
84
|
Use the following git branches when contributing to `plone.api`.
|
|
90
85
|
|
|
91
86
|
feature branches
|
|
92
|
-
:
|
|
87
|
+
: All development for a new feature or bug fix must be done on a new branch.
|
|
93
88
|
|
|
94
|
-
`
|
|
95
|
-
:
|
|
96
|
-
|
|
89
|
+
`main`
|
|
90
|
+
: Pull requests should be made from a feature branch against the `main` branch.
|
|
91
|
+
When features and bug fixes are complete and approved, they are merged into the `main` branch.
|
|
97
92
|
|
|
98
93
|
```{seealso}
|
|
99
94
|
{ref}`plone:contributing-core-work-with-git-label`
|
|
100
95
|
```
|
|
101
96
|
|
|
102
|
-
|
|
103
97
|
## Continuous integration
|
|
104
98
|
|
|
105
99
|
`plone.api` uses GitHub workflows for continuous integration.
|
|
106
|
-
On every push to the `
|
|
100
|
+
On every push to the `main` branch, GitHub runs its workflows for all tests and code quality checks.
|
|
107
101
|
GitHub workflows are configured in the directory `.github/workflows` at the root of this package.
|
|
108
102
|
|
|
109
|
-
|
|
110
103
|
## Documentation
|
|
111
104
|
|
|
112
105
|
For every feature change or addition to `plone.api`, you must add documentation of it.
|
|
@@ -128,8 +121,13 @@ Alternatively, you can automatically reload changes to the documentation as you
|
|
|
128
121
|
tox -e livehtml
|
|
129
122
|
```
|
|
130
123
|
|
|
131
|
-
|
|
124
|
+
You can run a link checker on documentation.
|
|
125
|
+
|
|
126
|
+
```shell
|
|
127
|
+
tox -e linkcheck
|
|
128
|
+
```
|
|
132
129
|
|
|
130
|
+
The [`plone.api` documentation](https://6.docs.plone.org/plone.api) is automatically generated from the documentation source files when its submodule is updated in the [main Plone `documentation` repository](https://github.com/plone/documentation/).
|
|
133
131
|
|
|
134
132
|
## Add a function to an existing module
|
|
135
133
|
|
|
@@ -171,8 +169,8 @@ def foo(path=None, UID=None):
|
|
|
171
169
|
%
|
|
172
170
|
% from plone.api.exc import InvalidParameterError
|
|
173
171
|
% self.assertRaises(
|
|
174
|
-
%
|
|
175
|
-
%
|
|
172
|
+
% InvalidParameterError,
|
|
173
|
+
% lambda: foo("/plone/blog", "abcd001")
|
|
176
174
|
% )
|
|
177
175
|
|
|
178
176
|
Add documentation in {file}`docs/api/content.md`.
|
|
@@ -235,10 +233,8 @@ The function references the narrative documentation via the label `content-foo-e
|
|
|
235
233
|
The narrative documentation references the API function documentation via `` {meth}`api.content.foo` ``.
|
|
236
234
|
The documentation is rendered with a link from the API reference to the narrative documentation, which in turn links back to the API reference.
|
|
237
235
|
|
|
238
|
-
|
|
239
236
|
## Resources
|
|
240
237
|
|
|
241
|
-
-
|
|
242
|
-
-
|
|
243
|
-
-
|
|
244
|
-
- [Code Coverage](https://coveralls.io/github/plone/plone.api)
|
|
238
|
+
- {doc}`plone:index`
|
|
239
|
+
- [Source code](https://github.com/plone/plone.api)
|
|
240
|
+
- [Issue tracker](https://github.com/plone/plone.api/issues)
|
|
@@ -45,7 +45,7 @@ Assuming there is a document `english_page` in a folder `en`, which is the navig
|
|
|
45
45
|
% invisible-code-block: python
|
|
46
46
|
%
|
|
47
47
|
% from plone import api
|
|
48
|
-
% from plone.
|
|
48
|
+
% from plone.base.interfaces import INavigationRoot
|
|
49
49
|
% from zope.interface import alsoProvides
|
|
50
50
|
%
|
|
51
51
|
% portal = api.portal.get()
|
|
@@ -140,14 +140,14 @@ ignore = [
|
|
|
140
140
|
"dependabot.yml",
|
|
141
141
|
"mx.ini",
|
|
142
142
|
"tox.ini",
|
|
143
|
-
".editorconfig",
|
|
144
143
|
"*.cfg",
|
|
144
|
+
".editorconfig",
|
|
145
|
+
".readthedocs.yaml",
|
|
145
146
|
"constraints_plone52.txt",
|
|
146
147
|
"constraints_plone60.txt",
|
|
147
148
|
"constraints.txt",
|
|
148
149
|
"fix-converted-myst.py",
|
|
149
150
|
"Makefile",
|
|
150
|
-
"netlify.toml",
|
|
151
151
|
"requirements-docs.txt",
|
|
152
152
|
"requirements.txt",
|
|
153
153
|
|
|
@@ -3,7 +3,7 @@ from setuptools import find_packages
|
|
|
3
3
|
from setuptools import setup
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
version = "2.2.
|
|
6
|
+
version = "2.2.5"
|
|
7
7
|
|
|
8
8
|
long_description = (
|
|
9
9
|
f"{Path('README.md').read_text()}\n"
|
|
@@ -36,8 +36,8 @@ setup(
|
|
|
36
36
|
"plone.app.uuid",
|
|
37
37
|
"plone.app.dexterity",
|
|
38
38
|
"plone.app.intid",
|
|
39
|
-
"plone.app.layout",
|
|
40
39
|
"plone.app.linkintegrity",
|
|
40
|
+
"plone.base",
|
|
41
41
|
"plone.dexterity",
|
|
42
42
|
"plone.i18n",
|
|
43
43
|
"plone.registry",
|
|
@@ -82,7 +82,7 @@ setup(
|
|
|
82
82
|
platforms="Any",
|
|
83
83
|
project_urls={
|
|
84
84
|
"Documentation": "https://6.docs.plone.org/plone.api/index.html",
|
|
85
|
-
"Changelog": "https://github.com/plone/plone.api/blob/
|
|
85
|
+
"Changelog": "https://github.com/plone/plone.api/blob/main/CHANGES.rst",
|
|
86
86
|
"Issue Tracker": "https://github.com/plone/plone.api/issues",
|
|
87
87
|
},
|
|
88
88
|
)
|
|
@@ -133,7 +133,12 @@ def get(path=None, UID=None):
|
|
|
133
133
|
relative_path=path,
|
|
134
134
|
)
|
|
135
135
|
try:
|
|
136
|
-
|
|
136
|
+
path = path.split("/")
|
|
137
|
+
if len(path) > 1:
|
|
138
|
+
parent = site.unrestrictedTraverse(path[:-1])
|
|
139
|
+
content = parent.restrictedTraverse(path[-1])
|
|
140
|
+
else:
|
|
141
|
+
content = site.restrictedTraverse(path[-1])
|
|
137
142
|
except (KeyError, AttributeError):
|
|
138
143
|
return None # When no object is found don't raise an error
|
|
139
144
|
else:
|
|
@@ -7,7 +7,7 @@ from logging import getLogger
|
|
|
7
7
|
from plone.api.exc import CannotGetPortalError
|
|
8
8
|
from plone.api.exc import InvalidParameterError
|
|
9
9
|
from plone.api.validation import required_parameters
|
|
10
|
-
from plone.
|
|
10
|
+
from plone.base.navigationroot import get_navigation_root_object
|
|
11
11
|
from plone.registry.interfaces import IRegistry
|
|
12
12
|
from Products.CMFCore.interfaces import ISiteRoot
|
|
13
13
|
from Products.CMFCore.utils import getToolByName
|
|
@@ -86,7 +86,7 @@ def get_navigation_root(context=None):
|
|
|
86
86
|
:Example: :ref:`portal-get-navigation-root-example`
|
|
87
87
|
"""
|
|
88
88
|
context = aq_inner(context)
|
|
89
|
-
return
|
|
89
|
+
return get_navigation_root_object(context, get())
|
|
90
90
|
|
|
91
91
|
|
|
92
92
|
@required_parameters("name")
|
|
@@ -10,8 +10,8 @@ from plone.api.validation import at_least_one_of
|
|
|
10
10
|
from plone.api.validation import required_parameters
|
|
11
11
|
from plone.app.linkintegrity.handlers import modifiedContent
|
|
12
12
|
from plone.app.linkintegrity.utils import referencedRelationship
|
|
13
|
+
from plone.base.utils import base_hasattr
|
|
13
14
|
from plone.dexterity.utils import iterSchemataForType
|
|
14
|
-
from Products.CMFPlone.utils import base_hasattr
|
|
15
15
|
from z3c.relationfield import event
|
|
16
16
|
from z3c.relationfield import RelationValue
|
|
17
17
|
from z3c.relationfield.schema import Relation
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
title="plone.api: Test fixture"
|
|
15
15
|
description="Extension profile to configure a test fixture"
|
|
16
16
|
provides="Products.GenericSetup.interfaces.EXTENSION"
|
|
17
|
-
for="
|
|
17
|
+
for="plone.base.interfaces.ITestCasePloneSiteRoot"
|
|
18
18
|
directory="profiles/testfixture"
|
|
19
19
|
/>
|
|
20
20
|
|
|
@@ -45,7 +45,7 @@ Assuming there is a document `english_page` in a folder `en`, which is the navig
|
|
|
45
45
|
% invisible-code-block: python
|
|
46
46
|
%
|
|
47
47
|
% from plone import api
|
|
48
|
-
% from plone.
|
|
48
|
+
% from plone.base.interfaces import INavigationRoot
|
|
49
49
|
% from zope.interface import alsoProvides
|
|
50
50
|
%
|
|
51
51
|
% portal = api.portal.get()
|
|
@@ -8,9 +8,9 @@ from plone import api
|
|
|
8
8
|
from plone.api.content import _parse_object_provides_query
|
|
9
9
|
from plone.api.tests.base import INTEGRATION_TESTING
|
|
10
10
|
from plone.app.contenttypes.interfaces import IFolder
|
|
11
|
-
from plone.app.layout.navigation.interfaces import INavigationRoot
|
|
12
11
|
from plone.app.linkintegrity.exceptions import LinkIntegrityNotificationException
|
|
13
12
|
from plone.app.textfield import RichTextValue
|
|
13
|
+
from plone.base.interfaces import INavigationRoot
|
|
14
14
|
from plone.indexer import indexer
|
|
15
15
|
from plone.uuid.interfaces import IMutableUUID
|
|
16
16
|
from plone.uuid.interfaces import IUUIDGenerator
|
|
@@ -192,7 +192,7 @@ class TestPloneApiContent(unittest.TestCase):
|
|
|
192
192
|
folder.setConstrainTypesMode(ENABLED)
|
|
193
193
|
folder.setLocallyAllowedTypes(("News Item",))
|
|
194
194
|
else: # DX
|
|
195
|
-
from
|
|
195
|
+
from plone.base.interfaces import ISelectableConstrainTypes
|
|
196
196
|
|
|
197
197
|
constraints = ISelectableConstrainTypes(folder)
|
|
198
198
|
constraints.setConstrainTypesMode(ENABLED)
|
|
@@ -478,6 +478,16 @@ class TestPloneApiContent(unittest.TestCase):
|
|
|
478
478
|
# title is an attribute
|
|
479
479
|
self.assertIsNone(api.content.get("/about/team/title"))
|
|
480
480
|
|
|
481
|
+
def test_get_of_content_in_inaccessible_container(self):
|
|
482
|
+
"""Test getting items in a inaccessible container.
|
|
483
|
+
Worked in Plone 5.1 but raised Unauthorized since 5.2."""
|
|
484
|
+
api.content.transition(obj=self.team, transition="publish")
|
|
485
|
+
with api.env.adopt_roles(["Member"]):
|
|
486
|
+
team_by_path = api.content.get("/about/team")
|
|
487
|
+
self.assertEqual(self.team, team_by_path)
|
|
488
|
+
team_by_uid = api.content.get(UID=self.team.UID())
|
|
489
|
+
self.assertEqual(self.team, team_by_uid)
|
|
490
|
+
|
|
481
491
|
def test_move_constraints(self):
|
|
482
492
|
"""Test the constraints for moving content."""
|
|
483
493
|
from plone.api.exc import MissingParameterError
|
|
@@ -7,7 +7,7 @@ from plone.api import content
|
|
|
7
7
|
from plone.api import env
|
|
8
8
|
from plone.api import portal
|
|
9
9
|
from plone.api.tests.base import INTEGRATION_TESTING
|
|
10
|
-
from plone.
|
|
10
|
+
from plone.base.interfaces import INavigationRoot
|
|
11
11
|
from plone.registry import field
|
|
12
12
|
from plone.registry.interfaces import IRegistry
|
|
13
13
|
from plone.registry.record import Record
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: plone.api
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.5
|
|
4
4
|
Summary: A Plone API.
|
|
5
5
|
Home-page: https://github.com/plone/plone.api
|
|
6
6
|
Author: Plone Foundation
|
|
7
7
|
Author-email: plone-developers@lists.sourceforge.net
|
|
8
8
|
License: GPL version 2
|
|
9
9
|
Project-URL: Documentation, https://6.docs.plone.org/plone.api/index.html
|
|
10
|
-
Project-URL: Changelog, https://github.com/plone/plone.api/blob/
|
|
10
|
+
Project-URL: Changelog, https://github.com/plone/plone.api/blob/main/CHANGES.rst
|
|
11
11
|
Project-URL: Issue Tracker, https://github.com/plone/plone.api/issues
|
|
12
12
|
Keywords: plone api
|
|
13
13
|
Platform: Any
|
|
@@ -34,8 +34,8 @@ Requires-Dist: decorator
|
|
|
34
34
|
Requires-Dist: plone.app.uuid
|
|
35
35
|
Requires-Dist: plone.app.dexterity
|
|
36
36
|
Requires-Dist: plone.app.intid
|
|
37
|
-
Requires-Dist: plone.app.layout
|
|
38
37
|
Requires-Dist: plone.app.linkintegrity
|
|
38
|
+
Requires-Dist: plone.base
|
|
39
39
|
Requires-Dist: plone.dexterity
|
|
40
40
|
Requires-Dist: plone.i18n
|
|
41
41
|
Requires-Dist: plone.registry
|
|
@@ -99,9 +99,6 @@ Issues
|
|
|
99
99
|
Continuous Integration
|
|
100
100
|
tested on [GitHub Actions](https://github.com/plone/plone.api/actions).
|
|
101
101
|
|
|
102
|
-
Code Coverage
|
|
103
|
-
is measured at [Coveralls.io](https://coveralls.io/github/plone/plone.api).
|
|
104
|
-
|
|
105
102
|
|
|
106
103
|
Changelog
|
|
107
104
|
=========
|
|
@@ -113,6 +110,38 @@ Changelog
|
|
|
113
110
|
|
|
114
111
|
.. towncrier release notes start
|
|
115
112
|
|
|
113
|
+
2.2.5 (2025-01-24)
|
|
114
|
+
------------------
|
|
115
|
+
|
|
116
|
+
Bug fixes:
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
- Fix api.content.get(path=path) when a item in the path is not accessible to the user.
|
|
120
|
+
[pbauer] (#549)
|
|
121
|
+
- Fix DeprecationWarnings. [maurits] (#4090)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
Documentation:
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
- Preview docs on Read the Docs instead of Netlify. @stevepiercy (#545)
|
|
128
|
+
- Remove Netlify stuff, follow up to #545. @stevepiercy
|
|
129
|
+
- Sort and remove duplicate entries in `pyproject.toml`
|
|
130
|
+
- Remove unused docs requirements.
|
|
131
|
+
- Fix comments and remove unnecessary steps from `tox.ini`.
|
|
132
|
+
- Enable copy button for code blocks.
|
|
133
|
+
- Add linkcheck to documentation of documentation. (#546)
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
2.2.4 (2024-12-16)
|
|
137
|
+
------------------
|
|
138
|
+
|
|
139
|
+
Documentation:
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
- Remove references to unused Coveralls. @stevepiercy (#543)
|
|
143
|
+
|
|
144
|
+
|
|
116
145
|
2.2.3 (2024-10-23)
|
|
117
146
|
------------------
|
|
118
147
|
|
|
@@ -255,7 +255,7 @@ allowlist_externals =
|
|
|
255
255
|
echo
|
|
256
256
|
|
|
257
257
|
[testenv:plone6docs]
|
|
258
|
-
# New docs with sphinx-
|
|
258
|
+
# New docs with plone-sphinx-theme
|
|
259
259
|
# See [testenv:docs] for classic documentation
|
|
260
260
|
basepython = python3.11
|
|
261
261
|
skip_install = False
|
|
@@ -271,6 +271,18 @@ commands =
|
|
|
271
271
|
mkdir -p {toxinidir}/_build/plone6docs
|
|
272
272
|
sphinx-build -b html -d _build/plone6docs/doctrees docs _build/plone6docs/html
|
|
273
273
|
|
|
274
|
+
[testenv:rtd-preview]
|
|
275
|
+
# Build docs on Read the Docs to preview pull requests using plone-sphinx-theme
|
|
276
|
+
basepython = python3.11
|
|
277
|
+
skip_install = False
|
|
278
|
+
extras =
|
|
279
|
+
tests
|
|
280
|
+
deps =
|
|
281
|
+
-r requirements-docs.txt
|
|
282
|
+
commands =
|
|
283
|
+
python -VV
|
|
284
|
+
sphinx-build -b html -d "{env:READTHEDOCS_OUTPUT}"/doctrees/ docs "{env:READTHEDOCS_OUTPUT}"/html/
|
|
285
|
+
|
|
274
286
|
[testenv:docs]
|
|
275
287
|
basepython = python3.9
|
|
276
288
|
skip_install = False
|
|
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.2.3 → plone_api-2.2.5}/src/plone/api/profiles/testfixture/types/Dexterity_Folder.xml
RENAMED
|
File without changes
|
{plone_api-2.2.3 → plone_api-2.2.5}/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
|