plone.api 2.1.0__tar.gz → 2.2.0__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.1.0 → plone_api-2.2.0}/CHANGES.rst +27 -3
- {plone.api-2.1.0 → plone_api-2.2.0}/PKG-INFO +46 -11
- plone_api-2.2.0/pyproject.toml +177 -0
- plone_api-2.2.0/setup.cfg +23 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/setup.py +25 -13
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone/api/configure.zcml +2 -1
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone/api/content.py +3 -3
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone/api/env.py +1 -1
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone/api/portal.py +2 -2
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone/api/profiles/testfixture/metadata.xml +1 -1
- plone_api-2.2.0/src/plone/api/profiles/testfixture/types/Dexterity_Folder.xml +62 -0
- plone_api-2.2.0/src/plone/api/profiles/testfixture/types/Dexterity_Item.xml +62 -0
- plone_api-2.2.0/src/plone/api/profiles/testfixture/types.xml +11 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone/api/relation.py +10 -10
- plone_api-2.2.0/src/plone/api/testing.zcml +21 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone/api/tests/Dexterity_Folder.xml +2 -2
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone/api/tests/Dexterity_Item.xml +2 -2
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone/api/tests/test_content.py +1 -1
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone/api/tests/test_doctests.py +1 -1
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone/api/tests/test_env.py +5 -4
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone/api/tests/test_group.py +1 -1
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone/api/tests/test_portal.py +1 -1
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone/api/tests/test_user.py +1 -1
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone/api/user.py +13 -2
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone/api/validation.py +1 -1
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone.api.egg-info/PKG-INFO +46 -11
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone.api.egg-info/requires.txt +17 -5
- plone_api-2.2.0/tox.ini +317 -0
- plone.api-2.1.0/pyproject.toml +0 -30
- plone.api-2.1.0/setup.cfg +0 -50
- plone.api-2.1.0/src/plone/api/profiles/testfixture/types/Dexterity_Folder.xml +0 -40
- plone.api-2.1.0/src/plone/api/profiles/testfixture/types/Dexterity_Item.xml +0 -40
- plone.api-2.1.0/src/plone/api/profiles/testfixture/types.xml +0 -5
- plone.api-2.1.0/src/plone/api/testing.zcml +0 -17
- plone.api-2.1.0/tox.ini +0 -208
- {plone.api-2.1.0 → plone_api-2.2.0}/CONTRIBUTING.rst +0 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/LICENSE +0 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/MANIFEST.in +0 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/README.md +0 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/docs/about.md +0 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/docs/content.md +0 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/docs/env.md +0 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/docs/group.md +0 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/docs/index.md +0 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/docs/portal.md +0 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/docs/relation.md +0 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/docs/user.md +0 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone/__init__.py +0 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone/api/__init__.py +0 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone/api/exc.py +0 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone/api/group.py +0 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone/api/tests/__init__.py +0 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone/api/tests/base.py +0 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone/api/tests/doctests/about.md +0 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone/api/tests/doctests/content.md +0 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone/api/tests/doctests/env.md +0 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone/api/tests/doctests/group.md +0 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone/api/tests/doctests/portal.md +0 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone/api/tests/doctests/relation.md +0 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone/api/tests/doctests/user.md +0 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone/api/tests/test_relation.py +0 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone/api/tests/test_validation.py +0 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone.api.egg-info/SOURCES.txt +0 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone.api.egg-info/dependency_links.txt +0 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone.api.egg-info/namespace_packages.txt +0 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone.api.egg-info/not-zip-safe +0 -0
- {plone.api-2.1.0 → plone_api-2.2.0}/src/plone.api.egg-info/top_level.txt +0 -0
|
@@ -8,6 +8,30 @@ Changelog
|
|
|
8
8
|
|
|
9
9
|
.. towncrier release notes start
|
|
10
10
|
|
|
11
|
+
2.2.0 (2024-05-06)
|
|
12
|
+
------------------
|
|
13
|
+
|
|
14
|
+
New features:
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
- Report if a permission does not exist
|
|
18
|
+
when calling `api.user.has_permission`.
|
|
19
|
+
[gforcada] (#515)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
Bug fixes:
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
- In relation.create: Fix edge case where existing RelationList value is None. @davisagli (#535)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
Internal:
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
- Update configuration files.
|
|
32
|
+
[plone devs] (cfffba8c)
|
|
33
|
+
|
|
34
|
+
|
|
11
35
|
2.1.0 (2024-02-22)
|
|
12
36
|
------------------
|
|
13
37
|
|
|
@@ -84,8 +108,8 @@ Bug fixes:
|
|
|
84
108
|
|
|
85
109
|
|
|
86
110
|
- Do not run GitHub Actions tests twice.
|
|
87
|
-
Only run GitHub Actions tests when
|
|
88
|
-
opening a pull request
|
|
111
|
+
Only run GitHub Actions tests when committing directly against master or main or
|
|
112
|
+
opening a pull request against master or main. This avoids to run the same test
|
|
89
113
|
suite for the same environment twice.
|
|
90
114
|
[thet] (#0)
|
|
91
115
|
- Mockup TinyMCE settings: Remove unused AtD related views.
|
|
@@ -474,7 +498,7 @@ Bug fixes:
|
|
|
474
498
|
- Simplify the ``plone.api.content.delete`` method.
|
|
475
499
|
[thet]
|
|
476
500
|
|
|
477
|
-
- content.copy with safe_id=False should raise it's own
|
|
501
|
+
- content.copy with safe_id=False should raise it's own exception. Fixes #340
|
|
478
502
|
[jaroel]
|
|
479
503
|
|
|
480
504
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: plone.api
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.2.0
|
|
4
4
|
Summary: A Plone API.
|
|
5
5
|
Home-page: https://github.com/plone/plone.api
|
|
6
6
|
Author: Plone Foundation
|
|
@@ -22,24 +22,37 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
22
22
|
Classifier: Programming Language :: Python :: 3.10
|
|
23
23
|
Classifier: Programming Language :: Python :: 3.11
|
|
24
24
|
Requires-Python: >=3.8
|
|
25
|
+
Description-Content-Type: text/x-rst
|
|
25
26
|
License-File: LICENSE
|
|
26
27
|
Requires-Dist: Products.statusmessages
|
|
28
|
+
Requires-Dist: Products.PlonePAS
|
|
29
|
+
Requires-Dist: Products.CMFPlone
|
|
27
30
|
Requires-Dist: decorator
|
|
28
31
|
Requires-Dist: plone.app.uuid
|
|
32
|
+
Requires-Dist: plone.app.dexterity
|
|
33
|
+
Requires-Dist: plone.app.intid
|
|
34
|
+
Requires-Dist: plone.app.layout
|
|
29
35
|
Requires-Dist: plone.app.linkintegrity
|
|
36
|
+
Requires-Dist: plone.dexterity
|
|
37
|
+
Requires-Dist: plone.i18n
|
|
38
|
+
Requires-Dist: plone.registry
|
|
30
39
|
Requires-Dist: plone.uuid
|
|
31
40
|
Requires-Dist: setuptools
|
|
32
41
|
Requires-Dist: zope.globalrequest
|
|
42
|
+
Requires-Dist: Products.CMFCore
|
|
43
|
+
Requires-Dist: z3c.relationfield
|
|
44
|
+
Requires-Dist: zc.relation
|
|
45
|
+
Requires-Dist: Zope
|
|
46
|
+
Requires-Dist: zope.intid
|
|
33
47
|
Provides-Extra: test
|
|
34
|
-
Requires-Dist:
|
|
48
|
+
Requires-Dist: borg.localrole; extra == "test"
|
|
35
49
|
Requires-Dist: manuel>=1.11.2; extra == "test"
|
|
36
|
-
Requires-Dist: plone.app.
|
|
37
|
-
Requires-Dist: plone.app.
|
|
50
|
+
Requires-Dist: plone.app.contenttypes; extra == "test"
|
|
51
|
+
Requires-Dist: plone.app.textfield; extra == "test"
|
|
38
52
|
Requires-Dist: plone.app.testing; extra == "test"
|
|
53
|
+
Requires-Dist: plone.testing; extra == "test"
|
|
39
54
|
Requires-Dist: plone.indexer; extra == "test"
|
|
40
55
|
Requires-Dist: plone.registry; extra == "test"
|
|
41
|
-
Requires-Dist: z3c.relationfield; extra == "test"
|
|
42
|
-
Requires-Dist: zope.testrunner; extra == "test"
|
|
43
56
|
|
|
44
57
|
# plone.api
|
|
45
58
|
|
|
@@ -88,7 +101,6 @@ Code Coverage
|
|
|
88
101
|
is measured at [Coveralls.io](https://coveralls.io/github/plone/plone.api).
|
|
89
102
|
|
|
90
103
|
|
|
91
|
-
|
|
92
104
|
Changelog
|
|
93
105
|
=========
|
|
94
106
|
|
|
@@ -99,6 +111,30 @@ Changelog
|
|
|
99
111
|
|
|
100
112
|
.. towncrier release notes start
|
|
101
113
|
|
|
114
|
+
2.2.0 (2024-05-06)
|
|
115
|
+
------------------
|
|
116
|
+
|
|
117
|
+
New features:
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
- Report if a permission does not exist
|
|
121
|
+
when calling `api.user.has_permission`.
|
|
122
|
+
[gforcada] (#515)
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
Bug fixes:
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
- In relation.create: Fix edge case where existing RelationList value is None. @davisagli (#535)
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
Internal:
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
- Update configuration files.
|
|
135
|
+
[plone devs] (cfffba8c)
|
|
136
|
+
|
|
137
|
+
|
|
102
138
|
2.1.0 (2024-02-22)
|
|
103
139
|
------------------
|
|
104
140
|
|
|
@@ -175,8 +211,8 @@ Bug fixes:
|
|
|
175
211
|
|
|
176
212
|
|
|
177
213
|
- Do not run GitHub Actions tests twice.
|
|
178
|
-
Only run GitHub Actions tests when
|
|
179
|
-
opening a pull request
|
|
214
|
+
Only run GitHub Actions tests when committing directly against master or main or
|
|
215
|
+
opening a pull request against master or main. This avoids to run the same test
|
|
180
216
|
suite for the same environment twice.
|
|
181
217
|
[thet] (#0)
|
|
182
218
|
- Mockup TinyMCE settings: Remove unused AtD related views.
|
|
@@ -565,7 +601,7 @@ Bug fixes:
|
|
|
565
601
|
- Simplify the ``plone.api.content.delete`` method.
|
|
566
602
|
[thet]
|
|
567
603
|
|
|
568
|
-
- content.copy with safe_id=False should raise it's own
|
|
604
|
+
- content.copy with safe_id=False should raise it's own exception. Fixes #340
|
|
569
605
|
[jaroel]
|
|
570
606
|
|
|
571
607
|
|
|
@@ -1157,7 +1193,6 @@ Fixes:
|
|
|
1157
1193
|
[davisagli, fulv, iElectric, jcerjak, jonstahl, kcleong, mauritsvanrees,
|
|
1158
1194
|
wamdam, witsch, zupo]
|
|
1159
1195
|
|
|
1160
|
-
|
|
1161
1196
|
License
|
|
1162
1197
|
=======
|
|
1163
1198
|
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# Generated from:
|
|
2
|
+
# https://github.com/plone/meta/tree/main/config/default
|
|
3
|
+
# See the inline comments on how to expand/tweak this configuration file
|
|
4
|
+
[build-system]
|
|
5
|
+
requires = ["setuptools>=68.2"]
|
|
6
|
+
|
|
7
|
+
[tool.towncrier]
|
|
8
|
+
directory = "news/"
|
|
9
|
+
filename = "CHANGES.rst"
|
|
10
|
+
title_format = "{version} ({project_date})"
|
|
11
|
+
underlines = ["-", ""]
|
|
12
|
+
|
|
13
|
+
[[tool.towncrier.type]]
|
|
14
|
+
directory = "breaking"
|
|
15
|
+
name = "Breaking changes:"
|
|
16
|
+
showcontent = true
|
|
17
|
+
|
|
18
|
+
[[tool.towncrier.type]]
|
|
19
|
+
directory = "feature"
|
|
20
|
+
name = "New features:"
|
|
21
|
+
showcontent = true
|
|
22
|
+
|
|
23
|
+
[[tool.towncrier.type]]
|
|
24
|
+
directory = "bugfix"
|
|
25
|
+
name = "Bug fixes:"
|
|
26
|
+
showcontent = true
|
|
27
|
+
|
|
28
|
+
[[tool.towncrier.type]]
|
|
29
|
+
directory = "internal"
|
|
30
|
+
name = "Internal:"
|
|
31
|
+
showcontent = true
|
|
32
|
+
|
|
33
|
+
[[tool.towncrier.type]]
|
|
34
|
+
directory = "documentation"
|
|
35
|
+
name = "Documentation:"
|
|
36
|
+
showcontent = true
|
|
37
|
+
|
|
38
|
+
[[tool.towncrier.type]]
|
|
39
|
+
directory = "tests"
|
|
40
|
+
name = "Tests"
|
|
41
|
+
showcontent = true
|
|
42
|
+
|
|
43
|
+
##
|
|
44
|
+
# Add extra configuration options in .meta.toml:
|
|
45
|
+
# [pyproject]
|
|
46
|
+
# towncrier_extra_lines = """
|
|
47
|
+
# extra_configuration
|
|
48
|
+
# """
|
|
49
|
+
##
|
|
50
|
+
|
|
51
|
+
[tool.isort]
|
|
52
|
+
profile = "plone"
|
|
53
|
+
|
|
54
|
+
##
|
|
55
|
+
# Add extra configuration options in .meta.toml:
|
|
56
|
+
# [pyproject]
|
|
57
|
+
# isort_extra_lines = """
|
|
58
|
+
# extra_configuration
|
|
59
|
+
# """
|
|
60
|
+
##
|
|
61
|
+
|
|
62
|
+
[tool.black]
|
|
63
|
+
target-version = ["py38"]
|
|
64
|
+
|
|
65
|
+
##
|
|
66
|
+
# Add extra configuration options in .meta.toml:
|
|
67
|
+
# [pyproject]
|
|
68
|
+
# black_extra_lines = """
|
|
69
|
+
# extra_configuration
|
|
70
|
+
# """
|
|
71
|
+
##
|
|
72
|
+
|
|
73
|
+
[tool.codespell]
|
|
74
|
+
ignore-words-list = "discreet,manuel"
|
|
75
|
+
skip = "*.po,"
|
|
76
|
+
##
|
|
77
|
+
# Add extra configuration options in .meta.toml:
|
|
78
|
+
# [pyproject]
|
|
79
|
+
# codespell_ignores = "foo,bar"
|
|
80
|
+
# codespell_skip = "*.po,*.map,package-lock.json"
|
|
81
|
+
##
|
|
82
|
+
|
|
83
|
+
[tool.dependencychecker]
|
|
84
|
+
Zope = [
|
|
85
|
+
# Zope own provided namespaces
|
|
86
|
+
'App', 'OFS', 'Products.Five', 'Products.OFSP', 'Products.PageTemplates',
|
|
87
|
+
'Products.SiteAccess', 'Shared', 'Testing', 'ZPublisher', 'ZTUtils',
|
|
88
|
+
'Zope2', 'webdav', 'zmi',
|
|
89
|
+
# ExtensionClass own provided namespaces
|
|
90
|
+
'ExtensionClass', 'ComputedAttribute', 'MethodObject',
|
|
91
|
+
# Zope dependencies
|
|
92
|
+
'AccessControl', 'Acquisition', 'AuthEncoding', 'beautifulsoup4', 'BTrees',
|
|
93
|
+
'cffi', 'Chameleon', 'DateTime', 'DocumentTemplate',
|
|
94
|
+
'MultiMapping', 'multipart', 'PasteDeploy', 'Persistence', 'persistent',
|
|
95
|
+
'pycparser', 'python-gettext', 'pytz', 'RestrictedPython', 'roman',
|
|
96
|
+
'soupsieve', 'transaction', 'waitress', 'WebOb', 'WebTest', 'WSGIProxy2',
|
|
97
|
+
'z3c.pt', 'zc.lockfile', 'ZConfig', 'zExceptions', 'ZODB', 'zodbpickle',
|
|
98
|
+
'zope.annotation', 'zope.browser', 'zope.browsermenu', 'zope.browserpage',
|
|
99
|
+
'zope.browserresource', 'zope.cachedescriptors', 'zope.component',
|
|
100
|
+
'zope.configuration', 'zope.container', 'zope.contentprovider',
|
|
101
|
+
'zope.contenttype', 'zope.datetime', 'zope.deferredimport',
|
|
102
|
+
'zope.deprecation', 'zope.dottedname', 'zope.event', 'zope.exceptions',
|
|
103
|
+
'zope.filerepresentation', 'zope.globalrequest', 'zope.hookable',
|
|
104
|
+
'zope.i18n', 'zope.i18nmessageid', 'zope.interface', 'zope.lifecycleevent',
|
|
105
|
+
'zope.location', 'zope.pagetemplate', 'zope.processlifetime', 'zope.proxy',
|
|
106
|
+
'zope.ptresource', 'zope.publisher', 'zope.schema', 'zope.security',
|
|
107
|
+
'zope.sequencesort', 'zope.site', 'zope.size', 'zope.structuredtext',
|
|
108
|
+
'zope.tal', 'zope.tales', 'zope.testbrowser', 'zope.testing',
|
|
109
|
+
'zope.traversing', 'zope.viewlet'
|
|
110
|
+
]
|
|
111
|
+
'Products.CMFCore' = [
|
|
112
|
+
'docutils', 'five.localsitemanager', 'Missing', 'Products.BTreeFolder2',
|
|
113
|
+
'Products.GenericSetup', 'Products.MailHost', 'Products.PythonScripts',
|
|
114
|
+
'Products.StandardCacheManagers', 'Products.ZCatalog', 'Record',
|
|
115
|
+
'zope.sendmail', 'Zope'
|
|
116
|
+
]
|
|
117
|
+
'plone.base' = [
|
|
118
|
+
'plone.batching', 'plone.registry', 'plone.schema','plone.z3cform',
|
|
119
|
+
'Products.CMFCore', 'Products.CMFDynamicViewFTI',
|
|
120
|
+
]
|
|
121
|
+
python-dateutil = ['dateutil']
|
|
122
|
+
ignore-packages = ['Products.PrintingMailHost', 'plone.app.iterate',]
|
|
123
|
+
|
|
124
|
+
##
|
|
125
|
+
# Add extra configuration options in .meta.toml:
|
|
126
|
+
# [pyproject]
|
|
127
|
+
# dependencies_ignores = "['zestreleaser.towncrier']"
|
|
128
|
+
# dependencies_mappings = [
|
|
129
|
+
# "gitpython = ['git']",
|
|
130
|
+
# "pygithub = ['github']",
|
|
131
|
+
# ]
|
|
132
|
+
##
|
|
133
|
+
|
|
134
|
+
[tool.check-manifest]
|
|
135
|
+
ignore = [
|
|
136
|
+
".editorconfig",
|
|
137
|
+
".flake8",
|
|
138
|
+
".meta.toml",
|
|
139
|
+
".pre-commit-config.yaml",
|
|
140
|
+
"dependabot.yml",
|
|
141
|
+
"mx.ini",
|
|
142
|
+
"tox.ini",
|
|
143
|
+
".editorconfig",
|
|
144
|
+
"*.cfg",
|
|
145
|
+
"constraints_plone52.txt",
|
|
146
|
+
"constraints_plone60.txt",
|
|
147
|
+
"constraints.txt",
|
|
148
|
+
"fix-converted-myst.py",
|
|
149
|
+
"Makefile",
|
|
150
|
+
"netlify.toml",
|
|
151
|
+
"requirements-docs.txt",
|
|
152
|
+
"requirements.txt",
|
|
153
|
+
|
|
154
|
+
]
|
|
155
|
+
|
|
156
|
+
##
|
|
157
|
+
# Add extra configuration options in .meta.toml:
|
|
158
|
+
# [pyproject]
|
|
159
|
+
# check_manifest_ignores = """
|
|
160
|
+
# "*.map.js",
|
|
161
|
+
# "*.pyc",
|
|
162
|
+
# """
|
|
163
|
+
# check_manifest_extra_lines = """
|
|
164
|
+
# ignore-bad-ideas = [
|
|
165
|
+
# "some/test/file/PKG-INFO",
|
|
166
|
+
# ]
|
|
167
|
+
# """
|
|
168
|
+
##
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
##
|
|
172
|
+
# Add extra configuration options in .meta.toml:
|
|
173
|
+
# [pyproject]
|
|
174
|
+
# extra_lines = """
|
|
175
|
+
# _your own configuration lines_
|
|
176
|
+
# """
|
|
177
|
+
##
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[coverage:run]
|
|
2
|
+
branch = True
|
|
3
|
+
source =
|
|
4
|
+
src
|
|
5
|
+
omit =
|
|
6
|
+
*.rst
|
|
7
|
+
*/doctests/*
|
|
8
|
+
*/tests/*
|
|
9
|
+
|
|
10
|
+
[coverage:report]
|
|
11
|
+
precision = 2
|
|
12
|
+
omit =
|
|
13
|
+
*.rst
|
|
14
|
+
*/doctests/*
|
|
15
|
+
*/tests/*
|
|
16
|
+
|
|
17
|
+
[coverage:html]
|
|
18
|
+
directory = _build/coverage
|
|
19
|
+
|
|
20
|
+
[egg_info]
|
|
21
|
+
tag_build =
|
|
22
|
+
tag_date = 0
|
|
23
|
+
|
|
@@ -1,24 +1,22 @@
|
|
|
1
|
+
from pathlib import Path
|
|
1
2
|
from setuptools import find_packages
|
|
2
3
|
from setuptools import setup
|
|
3
4
|
|
|
4
|
-
import os
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
def read(*rnames):
|
|
8
|
-
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
|
|
9
5
|
|
|
6
|
+
version = "2.2.0"
|
|
10
7
|
|
|
11
8
|
long_description = (
|
|
12
|
-
|
|
9
|
+
f"{Path('README.md').read_text()}\n"
|
|
10
|
+
f"{Path('CHANGES.rst').read_text()}\n"
|
|
11
|
+
f"{Path('LICENSE').read_text()}"
|
|
13
12
|
)
|
|
14
13
|
|
|
15
|
-
version = "2.1.0"
|
|
16
|
-
|
|
17
14
|
setup(
|
|
18
15
|
name="plone.api",
|
|
19
16
|
version=version,
|
|
20
17
|
description="A Plone API.",
|
|
21
18
|
long_description=long_description,
|
|
19
|
+
long_description_content_type="text/x-rst",
|
|
22
20
|
author="Plone Foundation",
|
|
23
21
|
author_email="plone-developers@lists.sourceforge.net",
|
|
24
22
|
license="GPL version 2",
|
|
@@ -32,26 +30,40 @@ setup(
|
|
|
32
30
|
python_requires=">=3.8",
|
|
33
31
|
install_requires=[
|
|
34
32
|
"Products.statusmessages",
|
|
33
|
+
"Products.PlonePAS",
|
|
34
|
+
"Products.CMFPlone",
|
|
35
35
|
"decorator",
|
|
36
36
|
"plone.app.uuid",
|
|
37
|
+
"plone.app.dexterity",
|
|
38
|
+
"plone.app.intid",
|
|
39
|
+
"plone.app.layout",
|
|
37
40
|
"plone.app.linkintegrity",
|
|
41
|
+
"plone.dexterity",
|
|
42
|
+
"plone.i18n",
|
|
43
|
+
"plone.registry",
|
|
38
44
|
"plone.uuid",
|
|
39
45
|
"setuptools",
|
|
40
46
|
"zope.globalrequest",
|
|
47
|
+
"Products.CMFCore",
|
|
48
|
+
"z3c.relationfield",
|
|
49
|
+
"zc.relation",
|
|
50
|
+
"Zope",
|
|
51
|
+
"zope.intid",
|
|
41
52
|
],
|
|
42
53
|
extras_require={
|
|
43
54
|
"test": [
|
|
44
|
-
"
|
|
55
|
+
"borg.localrole",
|
|
45
56
|
"manuel>=1.11.2",
|
|
46
|
-
"plone.app.
|
|
47
|
-
"plone.app.
|
|
57
|
+
"plone.app.contenttypes",
|
|
58
|
+
"plone.app.textfield",
|
|
48
59
|
"plone.app.testing",
|
|
60
|
+
"plone.testing",
|
|
49
61
|
"plone.indexer",
|
|
50
62
|
"plone.registry",
|
|
51
|
-
"z3c.relationfield",
|
|
52
|
-
"zope.testrunner",
|
|
53
63
|
],
|
|
54
64
|
},
|
|
65
|
+
# Get more strings from
|
|
66
|
+
# https://pypi.org/classifiers/
|
|
55
67
|
classifiers=[
|
|
56
68
|
"Development Status :: 5 - Production/Stable",
|
|
57
69
|
"Environment :: Web Environment",
|
|
@@ -34,7 +34,7 @@ def create(
|
|
|
34
34
|
id=None,
|
|
35
35
|
title=None,
|
|
36
36
|
safe_id=False,
|
|
37
|
-
**kwargs # NOQA: C816, S101
|
|
37
|
+
**kwargs, # NOQA: C816, S101
|
|
38
38
|
):
|
|
39
39
|
"""Create a new content item.
|
|
40
40
|
|
|
@@ -127,7 +127,7 @@ def get(path=None, UID=None):
|
|
|
127
127
|
if path:
|
|
128
128
|
site = portal.get()
|
|
129
129
|
site_absolute_path = "/".join(site.getPhysicalPath())
|
|
130
|
-
if not path.startswith("{
|
|
130
|
+
if not path.startswith(f"{site_absolute_path}"):
|
|
131
131
|
path = "{site_path}{relative_path}".format(
|
|
132
132
|
site_path=site_absolute_path,
|
|
133
133
|
relative_path=path,
|
|
@@ -297,7 +297,7 @@ def delete(obj=None, objects=None, check_linkintegrity=True):
|
|
|
297
297
|
breaches = linkintegrity_view.get_breaches(objects)
|
|
298
298
|
if breaches:
|
|
299
299
|
raise LinkIntegrityNotificationException(
|
|
300
|
-
"Linkintegrity-breaches: {}"
|
|
300
|
+
f"Linkintegrity-breaches: {breaches}",
|
|
301
301
|
)
|
|
302
302
|
|
|
303
303
|
for obj_ in objects:
|
|
@@ -280,7 +280,7 @@ def get_registry_record(name=None, interface=None, default=MISSING):
|
|
|
280
280
|
records = registry.forInterface(interface, check=False)
|
|
281
281
|
_marker = object()
|
|
282
282
|
if getattr(records, name, _marker) != _marker:
|
|
283
|
-
return registry["{}.{}"
|
|
283
|
+
return registry[f"{interface.__identifier__}.{name}"]
|
|
284
284
|
|
|
285
285
|
if default is not MISSING:
|
|
286
286
|
return default
|
|
@@ -307,7 +307,7 @@ def get_registry_record(name=None, interface=None, default=MISSING):
|
|
|
307
307
|
|
|
308
308
|
# Show all records that 'look like' name.
|
|
309
309
|
# We don't dump the whole list, because it 1500+ items.
|
|
310
|
-
msg = "Cannot find a record with name '{name}'"
|
|
310
|
+
msg = f"Cannot find a record with name '{name}'"
|
|
311
311
|
records = [key for key in registry.records.keys() if name in key]
|
|
312
312
|
if records:
|
|
313
313
|
msg = (
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<object xmlns:i18n="http://xml.zope.org/namespaces/i18n"
|
|
3
|
+
meta_type="Dexterity FTI"
|
|
4
|
+
name="Dexterity Folder"
|
|
5
|
+
>
|
|
6
|
+
<property name="title">Dexterity Folder</property>
|
|
7
|
+
<property name="description" />
|
|
8
|
+
<property name="content_icon" />
|
|
9
|
+
<property name="link_target" />
|
|
10
|
+
<property name="immediate_view">view</property>
|
|
11
|
+
<property name="global_allow">True</property>
|
|
12
|
+
<property name="filter_content_types">False</property>
|
|
13
|
+
<property name="allowed_content_types" />
|
|
14
|
+
<property name="allow_discussion">False</property>
|
|
15
|
+
<property name="default_view">view</property>
|
|
16
|
+
<property name="view_methods">
|
|
17
|
+
<element value="view" />
|
|
18
|
+
</property>
|
|
19
|
+
<property name="default_view_fallback">False</property>
|
|
20
|
+
<property name="add_permission">cmf.AddPortalContent</property>
|
|
21
|
+
<property name="klass">plone.dexterity.content.Container</property>
|
|
22
|
+
<property name="behaviors">
|
|
23
|
+
<element value="plone.app.dexterity.behaviors.metadata.IDublinCore" />
|
|
24
|
+
</property>
|
|
25
|
+
<property name="schema" />
|
|
26
|
+
<property name="model_source" />
|
|
27
|
+
<property name="model_file">plone.api.tests:Dexterity_Folder.xml</property>
|
|
28
|
+
<alias from="(Default)"
|
|
29
|
+
to="(dynamic view)"
|
|
30
|
+
/>
|
|
31
|
+
<alias from="edit"
|
|
32
|
+
to="@@edit"
|
|
33
|
+
/>
|
|
34
|
+
<alias from="sharing"
|
|
35
|
+
to="@@sharing"
|
|
36
|
+
/>
|
|
37
|
+
<alias from="view"
|
|
38
|
+
to="(selected layout)"
|
|
39
|
+
/>
|
|
40
|
+
<action action_id="view"
|
|
41
|
+
category="object"
|
|
42
|
+
condition_expr=""
|
|
43
|
+
icon_expr=""
|
|
44
|
+
link_target=""
|
|
45
|
+
title="View"
|
|
46
|
+
url_expr="string:${object_url}"
|
|
47
|
+
visible="True"
|
|
48
|
+
>
|
|
49
|
+
<permission value="View" />
|
|
50
|
+
</action>
|
|
51
|
+
<action action_id="edit"
|
|
52
|
+
category="object"
|
|
53
|
+
condition_expr=""
|
|
54
|
+
icon_expr=""
|
|
55
|
+
link_target=""
|
|
56
|
+
title="Edit"
|
|
57
|
+
url_expr="string:${object_url}/edit"
|
|
58
|
+
visible="True"
|
|
59
|
+
>
|
|
60
|
+
<permission value="Modify portal content" />
|
|
61
|
+
</action>
|
|
62
|
+
</object>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<object xmlns:i18n="http://xml.zope.org/namespaces/i18n"
|
|
3
|
+
meta_type="Dexterity FTI"
|
|
4
|
+
name="Dexterity Item"
|
|
5
|
+
>
|
|
6
|
+
<property name="title">Dexterity Item</property>
|
|
7
|
+
<property name="description" />
|
|
8
|
+
<property name="content_icon" />
|
|
9
|
+
<property name="link_target" />
|
|
10
|
+
<property name="immediate_view">view</property>
|
|
11
|
+
<property name="global_allow">True</property>
|
|
12
|
+
<property name="filter_content_types">True</property>
|
|
13
|
+
<property name="allowed_content_types" />
|
|
14
|
+
<property name="allow_discussion">False</property>
|
|
15
|
+
<property name="default_view">view</property>
|
|
16
|
+
<property name="view_methods">
|
|
17
|
+
<element value="view" />
|
|
18
|
+
</property>
|
|
19
|
+
<property name="default_view_fallback">False</property>
|
|
20
|
+
<property name="add_permission">cmf.AddPortalContent</property>
|
|
21
|
+
<property name="klass">plone.dexterity.content.Item</property>
|
|
22
|
+
<property name="behaviors">
|
|
23
|
+
<element value="plone.app.dexterity.behaviors.metadata.IDublinCore" />
|
|
24
|
+
</property>
|
|
25
|
+
<property name="schema" />
|
|
26
|
+
<property name="model_source" />
|
|
27
|
+
<property name="model_file">plone.api.tests:Dexterity_Item.xml</property>
|
|
28
|
+
<alias from="(Default)"
|
|
29
|
+
to="(dynamic view)"
|
|
30
|
+
/>
|
|
31
|
+
<alias from="edit"
|
|
32
|
+
to="@@edit"
|
|
33
|
+
/>
|
|
34
|
+
<alias from="sharing"
|
|
35
|
+
to="@@sharing"
|
|
36
|
+
/>
|
|
37
|
+
<alias from="view"
|
|
38
|
+
to="(selected layout)"
|
|
39
|
+
/>
|
|
40
|
+
<action action_id="view"
|
|
41
|
+
category="object"
|
|
42
|
+
condition_expr=""
|
|
43
|
+
icon_expr=""
|
|
44
|
+
link_target=""
|
|
45
|
+
title="View"
|
|
46
|
+
url_expr="string:${object_url}"
|
|
47
|
+
visible="True"
|
|
48
|
+
>
|
|
49
|
+
<permission value="View" />
|
|
50
|
+
</action>
|
|
51
|
+
<action action_id="edit"
|
|
52
|
+
category="object"
|
|
53
|
+
condition_expr=""
|
|
54
|
+
icon_expr=""
|
|
55
|
+
link_target=""
|
|
56
|
+
title="Edit"
|
|
57
|
+
url_expr="string:${object_url}/edit"
|
|
58
|
+
visible="True"
|
|
59
|
+
>
|
|
60
|
+
<permission value="Modify portal content" />
|
|
61
|
+
</action>
|
|
62
|
+
</object>
|