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

Fix DeprecationWarnings. #184

Merged
merged 6 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from 4 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
12 changes: 10 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,25 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.12", "3.11", "3.10", "3.9", "3.8"]
plone-version: ["6.0", "5.2"]
python-version: ["3.13", "3.12", "3.11", "3.10", "3.9", "3.8"]
plone-version: ["6.1", "6.0", "5.2"]
exclude:
- python-version: 3.13
plone-version: 5.2
- python-version: 3.12
plone-version: 5.2
- python-version: 3.11
plone-version: 5.2
- python-version: 3.10
plone-version: 5.2
- python-version: 3.9
plone-version: 6.1
- python-version: 3.9
plone-version: 5.2
- python-version: 3.8
plone-version: 6.1
- python-version: 3.8
plone-version: 6.0
steps:
# git checkout
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .meta.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs = [
]

[pyproject]
dependencies_ignores = "['plone.app.redirector']"
dependencies_ignores = "['plone.app.layout', 'plone.app.redirector', 'plone.base', 'Products.CMFPlone']"
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ Named services can be registered by providing a 'name' attribute in the service
<plone:service
method="GET"
accept="application/json"
for="Products.CMFPlone.interfaces.IPloneSiteRoot"
for="plone.base.interfaces.IPloneSiteRoot"
factory=".service.Search"
name="search"
permission="zope2.View"
Expand Down Expand Up @@ -256,7 +256,7 @@ defines a policy for the site root.
.. code-block:: XML

<plone:CORSPolicy
for="Products.CMFPlone.interfaces.IPloneSiteRoot"
for="plone.base.interfaces.IPloneSiteRoot"
layer="myproduct.interfaces.IMyBrowserLayer"
allow_origin="*"
allow_methods="GET"
Expand Down
1 change: 1 addition & 0 deletions news/4090.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix DeprecationWarnings. [maurits]
2 changes: 1 addition & 1 deletion plone-6.0.x.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[buildout]
extends =
https://dist.plone.org/release/6.0.9/versions.cfg
https://dist.plone.org/release/6.0.14/versions.cfg
base.cfg
4 changes: 4 additions & 0 deletions plone-6.1.x.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[buildout]
extends =
https://dist.plone.org/release/6.1.0b1/versions.cfg
base.cfg
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Zope = [
'Products.CMFCore', 'Products.CMFDynamicViewFTI',
]
python-dateutil = ['dateutil']
ignore-packages = ['plone.app.redirector']
ignore-packages = ['plone.app.layout', 'plone.app.redirector', 'plone.base', 'Products.CMFPlone']

##
# Add extra configuration options in .meta.toml:
Expand Down
2 changes: 1 addition & 1 deletion requirements-6.0.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-r https://dist.plone.org/release/6.0.9/requirements.txt
-r https://dist.plone.org/release/6.0.14/requirements.txt
1 change: 1 addition & 0 deletions requirements-6.1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-r https://dist.plone.org/release/6.1.0b1/requirements.txt
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ def read(*rnames):
"Framework :: Plone",
"Framework :: Plone :: 5.2",
"Framework :: Plone :: 6.0",
"Framework :: Plone :: 6.1",
"Framework :: Plone :: Core",
"Framework :: Zope2",
"Framework :: Zope :: 4",
"Framework :: Zope :: 5",
"License :: OSI Approved :: GNU General Public License (GPL)",
"Operating System :: OS Independent",
"Programming Language :: Python",
Expand All @@ -37,6 +39,7 @@ def read(*rnames):
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Software Development :: Libraries :: Python Modules",
],
Expand All @@ -57,14 +60,12 @@ def read(*rnames):
"requests",
"BTrees",
"plone.app.contenttypes[test]",
"plone.app.layout",
"plone.app.redirector",
"plone.app.textfield",
"plone.namedfile",
"plone.testing",
"z3c.relationfield",
"zope.intid",
"plone.base",
]
),
install_requires=[
Expand Down
6 changes: 6 additions & 0 deletions src/plone/rest/bbb.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
try:
from plone.base.interfaces import INavigationRoot # noqa
from plone.base.interfaces import IPloneSiteRoot # noqa
except ImportError:
from plone.app.layout.navigation.interfaces import INavigationRoot # noqa
from Products.CMFPlone.interfaces import IPloneSiteRoot # noqa
5 changes: 3 additions & 2 deletions src/plone/rest/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from plone.app.testing import IntegrationTesting
from plone.app.testing import PloneSandboxLayer
from plone.rest.service import Service
from plone.testing import z2
from plone.testing import zope
from zope.configuration import xmlconfig


Expand All @@ -22,7 +22,8 @@ def setUpZope(self, app, configurationContext):
bases=(PLONE_REST_FIXTURE,), name="PloneRestLayer:Integration"
)
PLONE_REST_FUNCTIONAL_TESTING = FunctionalTesting(
bases=(PLONE_REST_FIXTURE, z2.ZSERVER_FIXTURE), name="PloneRestLayer:Functional"
bases=(PLONE_REST_FIXTURE, zope.WSGI_SERVER_FIXTURE),
name="PloneRestLayer:Functional",
)


Expand Down
12 changes: 6 additions & 6 deletions src/plone/rest/testing.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -54,42 +54,42 @@
<plone:service
method="GET"
factory=".demo.Get"
for="Products.CMFPlone.interfaces.IPloneSiteRoot"
for="plone.rest.bbb.IPloneSiteRoot"
permission="zope2.View"
/>

<plone:service
method="POST"
factory=".demo.Post"
for="Products.CMFPlone.interfaces.IPloneSiteRoot"
for="plone.rest.bbb.IPloneSiteRoot"
permission="cmf.AddPortalContent"
/>

<plone:service
method="PUT"
factory=".demo.Put"
for="Products.CMFPlone.interfaces.IPloneSiteRoot"
for="plone.rest.bbb.IPloneSiteRoot"
permission="cmf.ModifyPortalContent"
/>

<plone:service
method="DELETE"
factory=".demo.Delete"
for="Products.CMFPlone.interfaces.IPloneSiteRoot"
for="plone.rest.bbb.IPloneSiteRoot"
permission="zope2.DeleteObjects"
/>

<plone:service
method="PATCH"
factory=".demo.Patch"
for="Products.CMFPlone.interfaces.IPloneSiteRoot"
for="plone.rest.bbb.IPloneSiteRoot"
permission="cmf.ModifyPortalContent"
/>

<plone:service
method="OPTIONS"
factory=".demo.Options"
for="Products.CMFPlone.interfaces.IPloneSiteRoot"
for="plone.rest.bbb.IPloneSiteRoot"
permission="zope2.View"
/>

Expand Down
2 changes: 1 addition & 1 deletion src/plone/rest/tests/test_traversal.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from base64 import b64encode
from plone.app.layout.navigation.interfaces import INavigationRoot
from plone.app.testing import setRoles
from plone.app.testing import SITE_OWNER_NAME
from plone.app.testing import SITE_OWNER_PASSWORD
from plone.app.testing import TEST_USER_ID
from plone.rest.bbb import INavigationRoot
from plone.rest.service import Service
from plone.rest.testing import PLONE_REST_INTEGRATION_TESTING
from Products.SiteAccess.VirtualHostMonster import VirtualHostMonster
Expand Down
Loading