diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8622555..c703bce 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,39 +6,24 @@ 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"] + plone-version: ["6.1", "6.0"] exclude: - - 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: 5.2 + plone-version: 6.1 steps: # git checkout - uses: actions/checkout@v2 # python setup - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} cache: "pip" - - # python cache - - uses: actions/cache@v1 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- + cache-dependency-path: "**/requirements.txt" # python install - - run: pip install virtualenv - - run: pip install wheel - name: pip install run: pip install -r requirements-${{ matrix.plone-version }}.txt diff --git a/.meta.toml b/.meta.toml index 2ca393b..d870133 100644 --- a/.meta.toml +++ b/.meta.toml @@ -14,4 +14,4 @@ jobs = [ ] [pyproject] -dependencies_ignores = "['plone.app.redirector']" +dependencies_ignores = "['plone.app.layout', 'plone.app.redirector', 'plone.base', 'Products.CMFPlone']" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d63a1c8..7be8a0b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -66,7 +66,7 @@ repos: hooks: - id: pyroma - repo: https://github.com/mgedmin/check-python-versions - rev: "0.22.0" + rev: "0.22.1" hooks: - id: check-python-versions args: ['--only', 'setup.py,pyproject.toml'] diff --git a/Makefile b/Makefile index e1eb2a8..4a77f7b 100644 --- a/Makefile +++ b/Makefile @@ -32,29 +32,6 @@ bin/buildout: bin/pip bin/python bin/pip: python$(version) -m venv . || virtualenv --python=python$(version) . -py2: - virtualenv --python=python2 . - bin/pip install --upgrade pip - bin/pip install -r requirements.txt - -.PHONY: Build Plone 5.2 with Python 2 -build-plone-5.2-py: py2 ## Build Plone 5.2 with Python 2 - bin/pip install --upgrade pip - bin/pip install -r requirements.txt - bin/buildout -c plone-5.2.x.cfg - -.PHONY: Build Plone 5.2 -build-plone-5.2: .installed.cfg ## Build Plone 5.2 - bin/pip install --upgrade pip - bin/pip install -r requirements.txt - bin/buildout -c plone-5.2.x.cfg - -.PHONY: Build Plone 5.2 Performance -build-plone-5.2-performance: .installed.cfg ## Build Plone 5.2 - bin/pip install --upgrade pip - bin/pip install -r requirements.txt - bin/buildout -c plone-5.2.x-performance.cfg - build-plone-6.0: ## Build Plone 6.0 python$(version) -m venv . bin/pip install --upgrade pip diff --git a/README.rst b/README.rst index f6923eb..021f77a 100644 --- a/README.rst +++ b/README.rst @@ -180,7 +180,7 @@ Named services can be registered by providing a 'name' attribute in the service = 3.2 / Zope >= 4.0a1 / Plone 5.2 - return - - # Patch the forward mapping (code -> reason) - status_reasons.update(PERMANENT_REDIRECT) - - # Update the reverse mapping - status_codes = getattr(scope, "status_codes", {}) - key, val = PERMANENT_REDIRECT.items()[0] - - status_codes["".join(val.split(" ")).lower()] = key - status_codes[val.lower()] = key - status_codes[key] = key - status_codes[str(key)] = key diff --git a/src/plone/rest/patches.zcml b/src/plone/rest/patches.zcml index a26791d..2b90ff8 100644 --- a/src/plone/rest/patches.zcml +++ b/src/plone/rest/patches.zcml @@ -14,14 +14,4 @@ preserveOriginal="true" /> - - diff --git a/src/plone/rest/testing.py b/src/plone/rest/testing.py index bcd4eeb..95e4d12 100644 --- a/src/plone/rest/testing.py +++ b/src/plone/rest/testing.py @@ -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 @@ -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", ) diff --git a/src/plone/rest/testing.zcml b/src/plone/rest/testing.zcml index 2033039..c3f0295 100644 --- a/src/plone/rest/testing.zcml +++ b/src/plone/rest/testing.zcml @@ -54,42 +54,42 @@ diff --git a/src/plone/rest/tests/test_traversal.py b/src/plone/rest/tests/test_traversal.py index 43ee632..a7be671 100644 --- a/src/plone/rest/tests/test_traversal.py +++ b/src/plone/rest/tests/test_traversal.py @@ -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.base.interfaces import INavigationRoot from plone.rest.service import Service from plone.rest.testing import PLONE_REST_INTEGRATION_TESTING from Products.SiteAccess.VirtualHostMonster import VirtualHostMonster diff --git a/tox.ini b/tox.ini index c30d780..081d87a 100644 --- a/tox.ini +++ b/tox.ini @@ -100,7 +100,7 @@ set_env = ## deps = zope.testrunner - -c https://dist.plone.org/release/6.0-dev/constraints.txt + -c https://dist.plone.org/release/6.1-dev/constraints.txt ## # Specify additional deps in .meta.toml: @@ -143,7 +143,7 @@ set_env = deps = coverage zope.testrunner - -c https://dist.plone.org/release/6.0-dev/constraints.txt + -c https://dist.plone.org/release/6.1-dev/constraints.txt commands = coverage run --branch --source plone.rest {envbindir}/zope-testrunner --quiet --all --test-path={toxinidir}/src -s plone.rest {posargs} @@ -160,7 +160,7 @@ deps = twine build towncrier - -c https://dist.plone.org/release/6.0-dev/constraints.txt + -c https://dist.plone.org/release/6.1-dev/constraints.txt commands = # fake version to not have to install the package @@ -188,7 +188,7 @@ allowlist_externals = deps = pipdeptree pipforester - -c https://dist.plone.org/release/6.0-dev/constraints.txt + -c https://dist.plone.org/release/6.1-dev/constraints.txt commands = # Generate the full dependency tree